Misc (re #1110): undo accidental checkin of run_continuous.py in previous commit

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3296 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/tests/automated/run_continuous.py b/tests/automated/run_continuous.py
index f4da9ab..c26d868 100755
--- a/tests/automated/run_continuous.py
+++ b/tests/automated/run_continuous.py
@@ -7,25 +7,28 @@
 
 INTERVAL = 300
 DELAY = 0
-CMDLINE = ""
 
-def run_cmdline(group):
-	cmdline = CMDLINE + " --group " + group
-	return os.system(cmdline)
+def run_scenarios(scenarios, group):
+	# Run each scenario
+	rc = 0
+	for scenario in scenarios:
+		argv = []
+		argv.append("ccdash.py")
+		argv.append("scenario")
+		argv.append(scenario)
+		argv.append("--group")
+		argv.append(group)
+		thisrc = ccdash.main(argv)
+		if rc==0 and thisrc:
+			rc = thisrc
+	return rc
 
 
 def usage():
 	print """Periodically monitor working directory for Continuous and Nightly builds
 
 Usage:
-  run_continuous.py [options] "cmdline"
-
-where:
-  cmdline is command to be executed to perform the test. Typically, this is
-  a script that calls configure.py and run_scenario.py for each scenario to
-  be performed. See perform_test.sh.sample and perform_test.bat.sample for
-  sample scripts. Note that the cmdline will be called with added group
-  argument (e.g. --group Nightly).
+  run_continuous.py [options] scenario1.xml [scenario2.xml ...]
 
 options:
   These are options which will be processed by run_continuous.py:
@@ -43,7 +46,8 @@
 	if len(sys.argv)<=1 or sys.argv[1]=="-h" or sys.argv[1]=="--h" or sys.argv[1]=="--help" or sys.argv[1]=="/h":
 		usage()
 
-	# Check args
+	# Splice list
+	scenarios = []
 	i = 1
 	while i < len(sys.argv):
 		if sys.argv[i]=="--delay":
@@ -54,14 +58,17 @@
 			DELAY = float(sys.argv[i]) * 60
 			print "Delay is set to %f minute(s)" % (DELAY / 60)
 		else:
-			if CMDLINE:
-				print "Error: cmdline already specified"
+			# Check if scenario exists
+			scenario = sys.argv[i]
+			if not os.path.exists(scenario):
+				print "Error: file " + scenario + " does not exist"
 				sys.exit(1)
-			CMDLINE = sys.argv[i]
+			scenarios.append(scenario)
+			print "Scenario %s added" % (scenario)
 		i = i + 1
 
-	if not CMDLINE:
-		print "Error: cmdline is needed"
+	if len(scenarios) < 1:
+		print "Error: scenario is required"
 		sys.exit(1)
 
 	# Current date
@@ -92,7 +99,7 @@
 					group = "Experimental"
 				print "Will run %s after %f s.." % (group, DELAY)
 				time.sleep(DELAY)
-				rc = run_cmdline(group)
+				rc = run_scenarios(scenarios, group)
 				# Sleep even if something does change
 				print str(datetime.datetime.now()) + \
 					  ": done running " + group + \