diff options
Diffstat (limited to 'testsuite/driver')
-rw-r--r-- | testsuite/driver/cpu_features.py | 5 | ||||
-rw-r--r-- | testsuite/driver/testlib.py | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/testsuite/driver/cpu_features.py b/testsuite/driver/cpu_features.py index 7b4340b61c..6e32d3b445 100644 --- a/testsuite/driver/cpu_features.py +++ b/testsuite/driver/cpu_features.py @@ -29,7 +29,9 @@ def get_cpu_features(): return flags elif config.os == 'darwin': - out = subprocess.check_output(['sysctl', 'hw']).decode('UTF-8') + # we hardcode the sysctl path, otherwise we rely on /usr/sbin being in + # path. + out = subprocess.check_output(['/usr/sbin/sysctl', 'hw']).decode('UTF-8') features = set() def check_feature(darwin_name, our_name=None): if re.search(r'hw\.optional.%s:\s*1' % darwin_name, out) is not None: @@ -66,4 +68,3 @@ if __name__ == '__main__': import sys config.os = sys.argv[1] print(get_cpu_features()) - diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index f0a52bdefb..304059f430 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -1811,9 +1811,10 @@ def interpreter_run(name: TestName, # check the exit code if exit_code != getTestOpts().exit_code: - print('Wrong exit code for ' + name + '(' + way + ') (expected', getTestOpts().exit_code, ', actual', exit_code, ')') - dump_stdout(name) - dump_stderr(name) + if config.verbose >= 1 and _expect_pass(way): + print('Wrong exit code for ' + name + '(' + way + ') (expected', getTestOpts().exit_code, ', actual', exit_code, ')') + dump_stdout(name) + dump_stderr(name) message = format_bad_exit_code_message(exit_code) return failBecause(message, stderr=read_stderr(name), @@ -2240,7 +2241,8 @@ def normalise_errmsg(s: str) -> str: # filter out nix garbage, that just keeps on showing up as errors on darwin s = modify_lines(s, lambda l: re.sub('^(.+)\.dylib, ignoring unexpected dylib file$','', l)) - + s = re.sub('ld: warning: passed two min versions \(10.16.0, 10.12\) for platform macOS. Using 10.12.','',s) + s = re.sub('ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version','',s) return s # normalise a .prof file, so that we can reasonably compare it against @@ -2314,6 +2316,8 @@ def normalise_output( s: str ) -> str: # ghci outputs are pretty unstable with -fexternal-dynamic-refs, which is # requires for -fPIC s = re.sub(' -fexternal-dynamic-refs\n','',s) + s = re.sub('ld: warning: passed .* min versions \(.*\) for platform macOS. Using [\.0-9]+.','',s) + s = re.sub('ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version','',s) return s def normalise_asm( s: str ) -> str: |