Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Set delay between tests. #6

Open
moo-im-a-cow opened this issue Apr 11, 2018 · 0 comments
Open

[Feature request] Set delay between tests. #6

moo-im-a-cow opened this issue Apr 11, 2018 · 0 comments

Comments

@moo-im-a-cow
Copy link

Hi
I submitted a pull request (#4 ) for this, but there were problems with it and i dont have time in my life right now to fix them, so im making these issues.

This is about the first half of the pull request

I would like to be able to change the delay between tests using an environment variable (from the docker run command)

cap5min.sh

if [[ $delay =~ '^[0-9]+$']] ; then
  delay=5
fi
sec=60
time=$((sec*delay))# $delay is in minutes, $time is in seconds

 while :
 do
    echo "Running test...."
    ./capture.sh
    echo "Waiting $delay minutes..."
    sleep $time
 done

as with my other issue (#5 ), the problem is the if statement at the top.
this if statement needs to return true if $delay is a number 1 or more
(need to first check that it is a number then check if it is 1 or more)
if it is not a number above or equal to 1, we set it to 5.
then multiply it by 60 to convert to seconds for the sleep command
(but the echo command uses the minutes value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant