Changes in tests/pybin/settings.py [64cf022:abec2f8]
- File:
-
- 1 edited
-
tests/pybin/settings.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
r64cf022 rabec2f8 23 23 class Architecture: 24 24 KnownArchitectures = { 25 'x64' : 'x64',26 'x86-64' : 'x64',27 'x86_64' : 'x64',28 'x86' : 'x86',29 'aarch64' : 'arm',30 'i386' : 'x86',31 'i486' : 'x86',32 'i686' : 'x86',33 'Intel 80386' : 'x86',34 'arm' : 'arm',35 'ARM' : 'arm',25 'x64' : 'x64', 26 'x86-64' : 'x64', 27 'x86_64' : 'x64', 28 'x86' : 'x86', 29 'aarch64' : 'arm', 30 'i386' : 'x86', 31 'i486' : 'x86', 32 'i686' : 'x86', 33 'Intel 80386' : 'x86', 34 'arm' : 'arm', 35 'ARM' : 'arm', 36 36 } 37 37 … … 77 77 print("updated to %s" % self.target) 78 78 79 def filter(self, tests): 80 return [test for test in tests if not test.arch or self.target == test.arch] 79 def match(self, arch): 81 80 return True if not arch else self.target == arch 82 81 83 @ staticmethod84 def make_canonical( arch):82 @classmethod 83 def make_canonical(_, arch): 85 84 return Architecture.KnownArchitectures[arch] 86 85 … … 105 104 self.total = Timeouts.check(tg) 106 105 107 @ staticmethod108 def check( value):106 @classmethod 107 def check(_, value): 109 108 if value < 1: 110 109 print("Timeouts must be at least 1 second", file=sys.stderr) … … 114 113 115 114 def init( options ): 116 global all_arch117 global all_debug118 global all_install119 115 global arch 120 116 global archive 121 global continue_122 117 global debug 118 global distcc 123 119 global dry_run 124 120 global generating … … 127 123 global output_width 128 124 global timeout 129 global timeout2gdb130 125 131 all_arch = [Architecture(o) for o in list(dict.fromkeys(options.arch ))] if options.arch else [Architecture(None)] 132 all_debug = [Debug(o) for o in list(dict.fromkeys(options.debug ))] 133 all_install = [Install(o) for o in list(dict.fromkeys(options.install))] 126 arch = Architecture(options.arch) 134 127 archive = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None 135 continue_ = options.continue_128 debug = Debug(options.debug) 136 129 dry_run = options.dry_run # must be called before tools.config_hash() 130 distcc = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash() 137 131 generating = options.regenerate_expected 132 install = Install(options.install) 138 133 make = ['make'] 139 134 output_width = 24 140 135 timeout = Timeouts(options.timeout, options.global_timeout) 141 timeout2gdb = options.timeout_with_gdb142 136 143 137 # if we distribute, distcc errors will fail tests, use log file for distcc … … 152 146 153 147 def validate(): 154 """Validate the current configuration and update globals"""155 156 global distcc157 distcc = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()158 148 errf = os.path.join(BUILDDIR, ".validate.err") 159 149 make_ret, out = tools.make( ".validate", error_file = errf, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL )
Note:
See TracChangeset
for help on using the changeset viewer.