Changes in tests/pybin/settings.py [a45fc7b:8bdc1c36]
- File:
-
- 1 edited
-
tests/pybin/settings.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
ra45fc7b r8bdc1c36 1 from __future__ import print_function 2 1 3 import os 2 import subprocess3 4 import sys 4 from .import tools5 import tools 5 6 6 7 try : … … 38 39 def __init__(self, arch): 39 40 try: 40 canonical_host = Architecture.make _canonical( config.HOSTARCH )41 canonical_host = Architecture.makeCanonical( config.HOSTARCH ) 41 42 except KeyError: 42 43 print("Unkown host architecture %s" % config.HOSTARCH, file=sys.stderr) … … 45 46 if arch: 46 47 try: 47 arch = Architecture.make _canonical( arch )48 arch = Architecture.makeCanonical( arch ) 48 49 except KeyError: 49 50 print("Unkown architecture %s" % arch, file=sys.stderr) … … 76 77 77 78 @classmethod 78 def make _canonical(_, arch):79 def makeCanonical(_, arch): 79 80 return Architecture.KnownArchitectures[arch] 80 81 … … 83 84 def __init__(self, value): 84 85 self.string = "debug" if value else "no debug" 85 self.flags = """DEBUG_FLAGS= %s""" % ("-debug -O0" if value else "-nodebug -O2")86 self.flags = """DEBUG_FLAGS="%s" """ % ("-debug -O0" if value else "-nodebug -O2") 86 87 87 88 class Install: 88 89 def __init__(self, value): 89 90 self.string = "installed" if value else "in-tree" 90 self.flags = """INSTALL_FLAGS= %s""" % ("" if value else "-in-tree")91 self.flags = """INSTALL_FLAGS="%s" """ % ("" if value else "-in-tree") 91 92 92 93 class Timeouts: … … 111 112 global install 112 113 global timeout 113 global output_width114 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) 122 output_width = 24 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) 123 122 124 123 125 def update _make_cmd(force, jobs):124 def updateMakeCmd(force, jobs): 126 125 global make 127 126 128 make = ['make'] if not force else ['make', "-j%i" % jobs]127 make = "make" if not force else ("make -j%i" % jobs) 129 128 130 129 def validate(): 131 130 errf = os.path.join(BUILDDIR, ".validate.err") 132 make_ret, out = tools.make( ".validate", error_file = errf, output=subprocess.DEVNULL, error=subprocess.DEVNULL)131 make_ret, _ = tools.make( ".validate", error_file = errf, redirects = "2> /dev/null 1> /dev/null", ) 133 132 if make_ret != 0: 134 133 with open (errf, "r") as myfile: … … 140 139 141 140 tools.rm(errf) 142 143 def prep_output(tests):144 global output_width145 output_width = max(map(lambda t: len(t.target()), tests))
Note:
See TracChangeset
for help on using the changeset viewer.