From: Christian Hofstaedtler Date: Fri, 7 Feb 2014 01:52:26 +0000 (+0100) Subject: API tests: Add '--wait' option X-Git-Tag: rec-3.6.0-rc1~189^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f8fa6d4d836ba7008ad44491094d550815eb3eb;p=thirdparty%2Fpdns.git API tests: Add '--wait' option Keeps daemon process alive after testing. --- diff --git a/regression-tests.api/runtests.py b/regression-tests.api/runtests.py index ce9551fb99..92c5de1911 100755 --- a/regression-tests.api/runtests.py +++ b/regression-tests.api/runtests.py @@ -26,6 +26,10 @@ ACL_LIST_TPL = """ ::1 """ +wait = ('--wait' in sys.argv) +if wait: + sys.argv.remove('--wait') + daemon = (len(sys.argv) == 2) and sys.argv[1] or None if daemon not in ('authoritative', 'recursor'): print "Usage: ./runtests (authoritative|recursor)" @@ -96,6 +100,9 @@ try: except subprocess.CalledProcessError as ex: rc = ex.returncode finally: + if wait: + print "Waiting as requested, press ENTER to stop." + raw_input() pdns.terminate() pdns.wait()