Sleep for n seconds before calling Wget Executable

This commit adds support for a new Environment Variable, SERVER_WAIT
which if set will cause the script to sleep for SERVER_WAIT seconds
before calling the wget executable. During this period, the custom
HTTP/HTTPS/FTP servers are all set up and running and can be used
for any other purposes. This feature is often used when a separate
executable must be used for testing apart from the one at src/wget
This commit is contained in:
Darshit Shah 2014-01-02 14:05:53 +05:30 committed by Giuseppe Scrivano
parent 7effa90359
commit b828a6e4a7
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-01-02 Darshit Shah <darnir@gmail.com>
* WgetTest.py (CommonMentods.exec_wget): Wait for n seconds before calling
the Wget executable.
2013-12-27 Darshit Shah <darnir@gmail.com>
* WgetTest.py: Add modeline

View File

@ -5,6 +5,7 @@ import sys
import traceback
import HTTPServer
import re
import time
from subprocess import call
from ColourTerm import printer
from difflib import unified_diff
@ -40,6 +41,8 @@ class CommonMethods:
cmd_line = self.get_cmd_line (options, urls, domain_list)
params = shlex.split (cmd_line)
print (params)
if os.getenv ("SERVER_WAIT"):
time.sleep (float (os.getenv ("SERVER_WAIT")))
try:
retcode = call (params)
except FileNotFoundError as filenotfound: