Benny Prijono | 8c331df | 2008-06-13 15:32:08 +0000 | [diff] [blame^] | 1 | # $Id:$ |
| 2 | import os |
| 3 | import sys |
| 4 | |
| 5 | # Initialize test list |
| 6 | tests = [] |
| 7 | |
| 8 | # Excluded tests (because they fail?) |
| 9 | excluded_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 | |
| 15 | # Add all tests in "scripts-run" directory. |
| 16 | for f in os.listdir("scripts-run"): |
| 17 | tests.append("mod_run.py scripts-run/" + f) |
| 18 | |
| 19 | # Add all tests in "scripts-call" directory. |
| 20 | for f in os.listdir("scripts-call"): |
| 21 | tests.append("mod_call.py scripts-call/" + f) |
| 22 | |
| 23 | # Filter-out excluded tests |
| 24 | for pat in excluded_tests: |
| 25 | tests = [t for t in tests if t.find(pat)==-1] |
| 26 | |
| 27 | # Now run the tests |
| 28 | for t in tests: |
| 29 | cmdline = "python run.py " + t |
| 30 | print "Running " + cmdline |
| 31 | ret = os.system(cmdline + " > output.log") |
| 32 | if ret != 0: |
| 33 | print "Test " + t + " failed." |
| 34 | print "Please see 'output.log' for the test log." |
| 35 | sys.exit(1) |
| 36 | |
| 37 | print "All tests completed successfully" |