Changeset 5c4a473 for tests/pybin
- Timestamp:
- Aug 15, 2019, 10:31:53 AM (6 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:
- 6daaee3
- Parents:
- d65f92c (diff), 3c7f01b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- tests/pybin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
rd65f92c r5c4a473 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) … … 118 121 global timeout 119 122 global output_width 123 <<<<<<< HEAD 120 124 global distcc 125 ======= 126 global archive 127 >>>>>>> master 121 128 122 129 dry_run = options.dry_run … … 128 135 timeout = Timeouts(options.timeout, options.global_timeout) 129 136 output_width = 24 137 <<<<<<< HEAD 130 138 distcc = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash() 139 ======= 140 archive = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None 141 >>>>>>> master 131 142 132 143 if distribute and not os.environ.get('DISTCC_LOG'): -
tests/pybin/tools.py
rd65f92c r5c4a473 2 2 import argparse 3 3 import contextlib 4 import datetime 4 5 import fileinput 5 6 import multiprocessing … … 289 290 return out.strip() 290 291 292 # get pretty string for time of day 293 def pretty_now(): 294 ts = time.time() 295 print(ts, file=sys.stderr) 296 return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H:%M:%S') 297 291 298 # check if arguments is yes or no 292 299 def yes_no(string): … … 320 327 return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output_file=subprocess.PIPE) 321 328 329 def core_archive(dst, name, exe): 330 # Get the files to copy 331 core = os.path.join(os.getcwd(), "core" ) 332 333 # Uncomment if we want timestamps on coredumps 334 # dst = os.path.join(dst, "%s_%s" % (name, pretty_now())) 335 336 # make a directory for this test 337 mkdir(os.path.join(dst, "dir")) 338 339 # moves the files 340 mv( core, os.path.join(dst, "core" ) ) 341 mv( exe , os.path.join(dst, name ) ) 342 343 # return explanatory test 344 return "Archiving %s (executable and core) to %s" % (os.path.relpath(exe, settings.BUILDDIR), os.path.relpath(dst, settings.original_path)) 345 322 346 class Timed: 323 347 def __enter__(self):
Note:
See TracChangeset
for help on using the changeset viewer.