blob: 41656345b97922469d2a8329616bc58060a438da [file] [log] [blame]
Benny Prijonocc1ada52008-06-15 19:43:43 +00001# $Id$
Benny Prijono8c331df2008-06-13 15:32:08 +00002import os
3import sys
4
5# Initialize test list
6tests = []
7
8# Excluded tests (because they fail?)
9excluded_tests = [ "svn",
10 "pyc",
11 "scripts-call/150_srtp_1_2",
12 "scripts-call/150_srtp_2_1",
13 "scripts-call/300_ice_1_1"]
14
Benny Prijonocc1ada52008-06-15 19:43:43 +000015# Add basic tests
Benny Prijono8c331df2008-06-13 15:32:08 +000016for f in os.listdir("scripts-run"):
17 tests.append("mod_run.py scripts-run/" + f)
18
Benny Prijonocc1ada52008-06-15 19:43:43 +000019# Add basic call tests
Benny Prijono8c331df2008-06-13 15:32:08 +000020for f in os.listdir("scripts-call"):
21 tests.append("mod_call.py scripts-call/" + f)
22
Benny Prijonocc1ada52008-06-15 19:43:43 +000023# Add presence tests
24for f in os.listdir("scripts-pres"):
25 tests.append("mod_pres.py scripts-pres/" + f)
26
Benny Prijono8c331df2008-06-13 15:32:08 +000027# Filter-out excluded tests
28for pat in excluded_tests:
29 tests = [t for t in tests if t.find(pat)==-1]
30
31# Now run the tests
32for t in tests:
33 cmdline = "python run.py " + t
34 print "Running " + cmdline
35 ret = os.system(cmdline + " > output.log")
36 if ret != 0:
37 print "Test " + t + " failed."
38 print "Please see 'output.log' for the test log."
39 sys.exit(1)
40
41print "All tests completed successfully"