| 199 | return modules |
| 200 | |
| 201 | def runTests(testIters, modules, tests): |
| 202 | cwd = os.getcwd() |
| 203 | testCmdline = 'ant test-nocompile -Dtests.dups=%d -Dtests.maxfailures=%d -Dtests.class="%s" -Dtests.showOutput=onerror %s %s' |
| 204 | for module in modules: |
| 205 | moduleTests = list(modules[module]) |
| 206 | testList = '|'.join(map(lambda t: '*.%s' % t, moduleTests)) |
| 207 | numTests = len(moduleTests) |
| 208 | params = tests[moduleTests[0]] # Assumption: all tests in this module have the same cmdline params |
| 209 | os.chdir(module) |
| 210 | code = run('ant compile-test') |
| 211 | try: |
| 212 | if 0 != code: |
| 213 | raise RuntimeError("ERROR: Compile failed in %s/ with code %d. See above." % (module, code)) |
| 214 | run(testCmdline % (testIters, testIters * numTests, testList, antOptions, params)) |
| 215 | finally: |
| 216 | os.chdir(cwd) |
| 217 | |
| 218 | def printAndMoveReports(testIters, newSubDir, location): |
| 219 | failures = {} |