Changeset 933f32f for tests/pybin/settings.py
- Timestamp:
- May 24, 2019, 10:19:41 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d908563
- Parents:
- 6a9d4b4 (diff), 292642a (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
r6a9d4b4 r933f32f 1 from __future__ import print_function2 3 1 import os 2 import subprocess 4 3 import sys 5 import tools4 from . import tools 6 5 7 6 try : … … 39 38 def __init__(self, arch): 40 39 try: 41 canonical_host = Architecture.make Canonical( config.HOSTARCH )40 canonical_host = Architecture.make_canonical( config.HOSTARCH ) 42 41 except KeyError: 43 42 print("Unkown host architecture %s" % config.HOSTARCH, file=sys.stderr) … … 46 45 if arch: 47 46 try: 48 arch = Architecture.make Canonical( arch )47 arch = Architecture.make_canonical( arch ) 49 48 except KeyError: 50 49 print("Unkown architecture %s" % arch, file=sys.stderr) … … 77 76 78 77 @classmethod 79 def make Canonical(_, arch):78 def make_canonical(_, arch): 80 79 return Architecture.KnownArchitectures[arch] 81 80 … … 84 83 def __init__(self, value): 85 84 self.string = "debug" if value else "no debug" 86 self.flags = """DEBUG_FLAGS= "%s"""" % ("-debug -O0" if value else "-nodebug -O2")85 self.flags = """DEBUG_FLAGS=%s""" % ("-debug -O0" if value else "-nodebug -O2") 87 86 88 87 class Install: 89 88 def __init__(self, value): 90 89 self.string = "installed" if value else "in-tree" 91 self.flags = """INSTALL_FLAGS= "%s"""" % ("" if value else "-in-tree")90 self.flags = """INSTALL_FLAGS=%s""" % ("" if value else "-in-tree") 92 91 93 92 class Timeouts: … … 112 111 global install 113 112 global timeout 113 global output_width 114 114 115 dry_run = options.dry_run 116 generating = options.regenerate_expected 117 make = 'make' 118 debug = Debug(options.debug) 119 install = Install(options.install) 120 arch = Architecture(options.arch) 121 timeout = Timeouts(options.timeout, options.global_timeout) 115 dry_run = options.dry_run 116 generating = options.regenerate_expected 117 make = ['make'] 118 debug = Debug(options.debug) 119 install = Install(options.install) 120 arch = Architecture(options.arch) 121 timeout = Timeouts(options.timeout, options.global_timeout) 122 output_width = 24 122 123 123 124 124 def update MakeCmd(force, jobs):125 def update_make_cmd(force, jobs): 125 126 global make 126 127 127 make = "make" if not force else ("make -j%i" % jobs)128 make = ['make'] if not force else ['make', "-j%i" % jobs] 128 129 129 130 def validate(): 130 131 errf = os.path.join(BUILDDIR, ".validate.err") 131 make_ret, _ = tools.make( ".validate", error_file = errf, redirects = "2> /dev/null 1> /dev/null",)132 make_ret, out = tools.make( ".validate", error_file = errf, output=subprocess.DEVNULL, error=subprocess.DEVNULL ) 132 133 if make_ret != 0: 133 134 with open (errf, "r") as myfile: … … 139 140 140 141 tools.rm(errf) 142 143 def prep_output(tests): 144 global output_width 145 output_width = max(map(lambda t: len(t.target()), tests))
Note:
See TracChangeset
for help on using the changeset viewer.