Changeset 3d5701e for tests/pybin/settings.py
- Timestamp:
- Feb 25, 2020, 1:17:33 PM (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:
- 7dc2e015
- Parents:
- 9fb8f01 (diff), dd9e1ca (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
r9fb8f01 r3d5701e 14 14 SRCDIR = os.path.abspath(config.SRCDIR) 15 15 BUILDDIR = os.path.abspath(config.BUILDDIR) 16 distribute = config.DISTRIBUTE 16 17 os.chdir(testpath) 17 18 … … 88 89 self.string = "debug" if value else "no debug" 89 90 self.flags = """DEBUG_FLAGS=%s""" % ("-debug -O0" if value else "-nodebug -O2") 91 self.path = "debug" if value else "nodebug" 90 92 91 93 class Install: 92 94 def __init__(self, value): 93 self.string = "installed" if value else "in-tree" 94 self.flags = """INSTALL_FLAGS=%s""" % ("" if value else "-in-tree") 95 if value: 96 distribute = False 97 98 self.string = "installed" if value else "in tree" 99 self.flags = """installed=%s""" % ("yes" if value else "no") 95 100 96 101 class Timeouts: … … 109 114 def init( options ): 110 115 global arch 116 global archive 117 global debug 118 global distcc 111 119 global dry_run 112 120 global generating 121 global install 113 122 global make 114 global debug 115 global install 123 global output_width 116 124 global timeout 117 global output_width118 global archive119 125 120 dry_run = options.dry_run 126 arch = Architecture(options.arch) 127 archive = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None 128 debug = Debug(options.debug) 129 dry_run = options.dry_run # must be called before tools.config_hash() 130 distcc = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash() 121 131 generating = options.regenerate_expected 132 install = Install(options.install) 122 133 make = ['make'] 123 debug = Debug(options.debug) 124 install = Install(options.install) 125 arch = Architecture(options.arch) 134 output_width = 24 126 135 timeout = Timeouts(options.timeout, options.global_timeout) 127 output_width = 24128 archive = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None129 136 137 # if we distribute, distcc errors will fail tests, use log file for distcc 138 # don't use "'DISTCC_LOG' not in os.environ" because it can be set to '' 139 if distribute and not os.environ.get('DISTCC_LOG'): 140 os.putenv('DISTCC_LOG', os.path.join(BUILDDIR, 'distcc_error.log')) 130 141 131 142 def update_make_cmd(force, jobs): … … 136 147 def validate(): 137 148 errf = os.path.join(BUILDDIR, ".validate.err") 138 make_ret, out = tools.make( ".validate", error_file = errf, output =subprocess.DEVNULL, error=subprocess.DEVNULL )149 make_ret, out = tools.make( ".validate", error_file = errf, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL ) 139 150 if make_ret != 0: 140 151 with open (errf, "r") as myfile:
Note:
See TracChangeset
for help on using the changeset viewer.