summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2011-08-16 08:27:38 +0000
committerBenny Prijono <bennylp@teluu.com>2011-08-16 08:27:38 +0000
commitc42e450c8852561037a778df48b21116dd8b5a0a (patch)
treefbb39694c953d1d5094b8cb61ead11c60ab60804 /tests
parent9ef33751fdd4f46b6c16e4690f043ea1f5d3c75c (diff)
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
Diffstat (limited to 'tests')
-rwxr-xr-xtests/automated/run_continuous.py34
1 files changed, 17 insertions, 17 deletions
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)