Changes in src/tests/test.py [871b664:23c2b8d3]
- File:
-
- 1 edited
-
src/tests/test.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/test.py
r871b664 r23c2b8d3 32 32 return re.search("ELF\s([0-9]+)-bit", out).group(1) 33 33 34 def listTestsFolder(folder) : 35 path = ('./.expect/%s/' % folder) if folder else './.expect/' 36 subpath = "%s/" % folder if folder else ""34 # reads the directory ./.expect and indentifies the tests 35 def listTests(): 36 machineType = getMachineType() 37 37 38 38 # tests directly in the .expect folder will always be processed 39 return map(lambda fname: Test(fname, subpath +fname),40 [splitext(f)[0] for f in listdir( path)39 generic_list = map(lambda fname: Test(fname, fname), 40 [splitext(f)[0] for f in listdir('./.expect') 41 41 if not f.startswith('.') and f.endswith('.txt') 42 42 ]) 43 43 44 # reads the directory ./.expect and indentifies the tests45 def listTests( concurrent ):46 machineType = getMachineType()47 48 # tests directly in the .expect folder will always be processed49 generic_list = listTestsFolder( "" )50 51 44 # tests in the machineType folder will be ran only for the corresponding compiler 52 typed_list = listTestsFolder( machineType )53 54 # tests in the concurrent folder will be ran only if concurrency is enabled55 concurrent_list = listTestsFolder( "concurrent" ) if concurrent else []45 typed_list = map(lambda fname: Test( fname, "%s/%s" % (machineType, fname) ), 46 [splitext(f)[0] for f in listdir("./.expect/%s" % machineType) 47 if not f.startswith('.') and f.endswith('.txt') 48 ]) 56 49 57 50 # append both lists to get 58 return generic_list + typed_list + concurrent_list;51 return generic_list + typed_list 59 52 60 53 # helper functions to run terminal commands … … 201 194 sys.stderr.flush() 202 195 return test_failed 203 196 204 197 except KeyboardInterrupt: 205 198 test_failed = True … … 250 243 parser = argparse.ArgumentParser(description='Script which runs cforall tests') 251 244 parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no') 252 parser.add_argument('--concurrent', help='Run concurrent tests', type=yes_no, default='no')253 245 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 254 246 parser.add_argument('--list', help='List all test available', action='store_true') … … 269 261 270 262 # fetch the liest of all valid tests 271 allTests = listTests( options.concurrent)263 allTests = listTests() 272 264 273 265 # if user wants all tests than no other treatement of the test list is required
Note:
See TracChangeset
for help on using the changeset viewer.