From c42e450c8852561037a778df48b21116dd8b5a0a Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 16 Aug 2011 08:27:38 +0000 Subject: Re #1344 (automated test): make sure run_continuous.py returns correct exit code git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3704 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/automated/run_continuous.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'tests') diff --git a/tests/automated/run_continuous.py b/tests/automated/run_continuous.py index efa245fb..07e45abc 100755 --- a/tests/automated/run_continuous.py +++ b/tests/automated/run_continuous.py @@ -111,29 +111,29 @@ if __name__ == "__main__": utc = time.gmtime(None) if utc.tm_mday != day or rc != 0 or FORCE: - group = "" - if utc.tm_mday != day: - day = utc.tm_mday - group = "Nightly" + SUFFIX - elif rc != 0: - group = "Continuous" + SUFFIX - else: - group = "Experimental" + SUFFIX + group = "" + if utc.tm_mday != day: + day = utc.tm_mday + group = "Nightly" + SUFFIX + elif rc != 0: + group = "Continuous" + SUFFIX + else: + group = "Experimental" + SUFFIX + if DELAY > 0: print "Will run %s after %f s.." % (group, DELAY) time.sleep(DELAY) - rc = run_scenarios(scenarios, group) - # Sleep even if something does change - msg = str(datetime.datetime.now()) + \ - ": done running " + group + \ - "tests, will check again in " + str(INTERVAL) + "s.." + rc = run_scenarios(scenarios, group) + msg = str(datetime.datetime.now()) + \ + ": done running " + group + \ + "tests, will check again in " + str(INTERVAL) + "s.." + if ONCE: + sys.exit(0) else: # Nothing changed msg = str(datetime.datetime.now()) + \ ": No update, will check again in " + str(INTERVAL) + "s.." - - - if ONCE: - sys.exit(0) + if ONCE: + sys.exit(1) print msg time.sleep(INTERVAL) -- cgit v1.2.3