summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-02-13 11:41:47 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2021-03-21 21:04:42 -0400
commit0cbdba2768d84a0f6832ae5cf9ea1e98efd739da (patch)
treec233ed1c8673782cfabae7bf0437606c6ead46a7 /testsuite/driver/testlib.py
parentadbaa9a9e3d952d21be74178e2e4405e0777d456 (diff)
downloadhaskell-0cbdba2768d84a0f6832ae5cf9ea1e98efd739da.tar.gz
[ci/arm/darwin/testsuite] Forwards ports from GHC-8.10
This is a set of forward ports (cherry-picks) from 8.10 - a7d22795ed [ci] Add support for building on aarch64-darwin - 5109e87e13 [testlib/driver] denoise - 307d34945b [ci] default value for CONFIGURE_ARGS - 10a18cb4e0 [testsuite] mark ghci056 as fragile - 16c13d5acf [ci] Default value for MAKE_ARGS - ab571457b9 [ci/build] Copy config.sub around - 251892b98f [ci/darwin] bump nixpkgs rev - 5a6c36ecb4 [testsuite/darwin] fix conc059 - aae95ef0c9 [ci] add timing info - 3592d1104c [Aarch64] No div-by-zero; disable test. - 57671071ad [Darwin] mark stdc++ tests as broken - 33c4d49754 [testsuite] filter out superfluous dylib warnings - 4bea83afec [ci/nix-shell] Add Foundation and Security - 6345530062 [testsuite/json2] Fix failure with LLVM backends - c3944bc89d [ci/nix-shell] [Darwin] Stop the ld warnings about libiconv. - b821fcc714 [testsuite] static001 is not broken anymore. - f7062e1b0c [testsuite/arm64] fix section_alignment - 820b076698 [darwin] stop the DYLD_LIBRARY_PATH madness - 07b1af0362 [ci/nix-shell] uniquify NIX_LDFLAGS{_FOR_TARGET} As well as a few additional fixups needed to make this block compile: - Fixup all.T - Set CROSS_TARGET, BROKEN_TESTS, XZ, RUNTEST_ARGS, default value. - [ci] shell.nix bump happy
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index b5d2744e58..3c82a7de2f 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1809,9 +1809,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),
@@ -2236,9 +2237,14 @@ def normalise_errmsg(s: str) -> str:
# and not understood by older binutils (ar, ranlib, ...)
s = modify_lines(s, lambda l: re.sub('^(.+)warning: (.+): unsupported GNU_PROPERTY_TYPE \(5\) type: 0xc000000(.*)$', '', l))
- # 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 .* 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)
+ # ignore superfluous dylibs passed to the linker.
+ s = re.sub('ld: warning: .*, ignoring unexpected dylib file\n','',s)
+ # ignore LLVM Version mismatch garbage; this will just break tests.
+ s = re.sub('You are using an unsupported version of LLVM!.*\n','',s)
+ s = re.sub('Currently only [\.0-9]+ is supported. System LLVM version: [\.0-9]+.*\n','',s)
+ s = re.sub('We will try though\.\.\..*\n','',s)
return s
# normalise a .prof file, so that we can reasonably compare it against
@@ -2312,6 +2318,15 @@ 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)
+ # ignore superfluous dylibs passed to the linker.
+ s = re.sub('ld: warning: .*, ignoring unexpected dylib file\n','',s)
+ # ignore LLVM Version mismatch garbage; this will just break tests.
+ s = re.sub('You are using an unsupported version of LLVM!.*\n','',s)
+ s = re.sub('Currently only [\.0-9]+ is supported. System LLVM version: [\.0-9]+.*\n','',s)
+ s = re.sub('We will try though\.\.\..*\n','',s)
+
return s
def normalise_asm( s: str ) -> str: