- Timestamp:
- Aug 13, 2019, 4:38:27 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3221a2b
- Parents:
- 1118b8b
- Location:
- tests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile.am
r1118b8b rdcfedca 22 22 debug=yes 23 23 installed=no 24 archiveerrors= 24 25 25 26 INSTALL_FLAGS=-in-tree … … 56 57 #---------------------------------------------------------------------------------------------------------------- 57 58 all-local : 58 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}59 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 59 60 60 61 all-tests : 61 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program62 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 62 63 63 64 clean-local : -
tests/Makefile.in
r1118b8b rdcfedca 377 377 debug = yes 378 378 installed = no 379 archiveerrors = 379 380 INSTALL_FLAGS = -in-tree 380 381 DEBUG_FLAGS = -debug -O0 … … 770 771 #---------------------------------------------------------------------------------------------------------------- 771 772 all-local : 772 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test}773 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test} 773 774 774 775 all-tests : 775 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program776 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 776 777 777 778 clean-local : -
tests/pybin/settings.py
r1118b8b rdcfedca 4 4 from . import tools 5 5 6 global original_path 7 6 8 try : 9 original_path = os.getcwd() 7 10 testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0]))) 8 11 sys.path.append(testpath) … … 113 116 global timeout 114 117 global output_width 118 global archive 115 119 116 120 dry_run = options.dry_run … … 122 126 timeout = Timeouts(options.timeout, options.global_timeout) 123 127 output_width = 24 128 archive = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None 124 129 125 130 -
tests/pybin/tools.py
r1118b8b rdcfedca 2 2 import argparse 3 3 import contextlib 4 import datetime 4 5 import fileinput 5 6 import multiprocessing … … 273 274 ################################################################################ 274 275 276 def pretty_now(): 277 ts = time.time() 278 print(ts, file=sys.stderr) 279 return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H:%M:%S') 280 275 281 # check if arguments is yes or no 276 282 def yes_no(string): … … 304 310 return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output=subprocess.PIPE) 305 311 312 def core_archive(dst, name, exe): 313 # Get the files to copy 314 core = os.path.join(os.getcwd(), "core" ) 315 316 # Uncomment if we want timestamps on coredumps 317 # dst = os.path.join(dst, "%s_%s" % (name, pretty_now())) 318 319 # make a directory for this test 320 mkdir(os.path.join(dst, "dir")) 321 322 # moves the files 323 mv( core, os.path.join(dst, "core" ) ) 324 mv( exe , os.path.join(dst, name ) ) 325 326 # return explanatory test 327 return "Archiving %s (executable and core) to %s" % (os.path.relpath(exe, settings.BUILDDIR), os.path.relpath(dst, settings.original_path)) 328 306 329 class Timed: 307 330 def __enter__(self): -
tests/test.py
r1118b8b rdcfedca 91 91 parser.add_argument('--all', help='Run all test available', action='store_true') 92 92 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 93 parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='') 93 94 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int) 94 95 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') … … 179 180 error = error + info if error else info 180 181 182 if settings.archive: 183 error = error + '\n' + core_archive(settings.archive, test.target(), exe_file) 184 181 185 182 186 … … 295 299 # users may want to simply list the tests 296 300 if options.list_comp : 297 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected -- install --timeout --global-timeout -j --jobs ", end='')301 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout -j --jobs ", end='') 298 302 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 299 303
Note: See TracChangeset
for help on using the changeset viewer.