summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-04-02 15:04:53 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-05 20:46:21 -0400
commit403bf88c568199d8d2a272a041faba96a47a5276 (patch)
tree43021ba47a3578631c71a58716dceab3dc85cfcf /testsuite
parentbfe8ef8e577a41ce9f29cb5f7879368f5e4b5897 (diff)
downloadhaskell-403bf88c568199d8d2a272a041faba96a47a5276.tar.gz
Revert "[ci/arm/darwin/testsuite] Forwards ports from GHC-8.10"
This reverts commit 0cbdba2768d84a0f6832ae5cf9ea1e98efd739da.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/driver/cpu_features.py5
-rw-r--r--testsuite/driver/runtests.py7
-rw-r--r--testsuite/driver/testlib.py31
-rw-r--r--testsuite/tests/concurrent/should_run/conc059_c.c2
-rw-r--r--testsuite/tests/driver/all.T11
-rw-r--r--testsuite/tests/ghci/linking/all.T21
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
-rw-r--r--testsuite/tests/rts/all.T5
-rw-r--r--testsuite/tests/rts/linker/all.T2
9 files changed, 28 insertions, 57 deletions
diff --git a/testsuite/driver/cpu_features.py b/testsuite/driver/cpu_features.py
index 6e32d3b445..7b4340b61c 100644
--- a/testsuite/driver/cpu_features.py
+++ b/testsuite/driver/cpu_features.py
@@ -29,9 +29,7 @@ def get_cpu_features():
return flags
elif config.os == 'darwin':
- # 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')
+ out = subprocess.check_output(['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:
@@ -68,3 +66,4 @@ if __name__ == '__main__':
import sys
config.os = sys.argv[1]
print(get_cpu_features())
+
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index ac0d4f7100..d4425b5da5 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -266,7 +266,7 @@ def format_path(path):
# On Windows we need to set $PATH to include the paths to all the DLLs
# in order for the dynamic library tests to work.
-if windows:
+if windows or darwin:
pkginfo = getStdout([config.ghc_pkg, 'dump'])
topdir = config.libdir
if windows:
@@ -284,9 +284,12 @@ if windows:
if path.startswith('"'):
path = re.sub('^"(.*)"$', '\\1', path)
path = re.sub('\\\\(.)', '\\1', path)
-
+ if windows:
path = format_path(path)
ghc_env['PATH'] = os.pathsep.join([path, ghc_env.get("PATH", "")])
+ else:
+ # darwin
+ ghc_env['DYLD_LIBRARY_PATH'] = os.pathsep.join([path, ghc_env.get("DYLD_LIBRARY_PATH", "")])
testopts_local.x = TestOptions()
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 55be360d66..e8cb264ab5 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1794,10 +1794,9 @@ def interpreter_run(name: TestName,
# check the exit code
if exit_code != getTestOpts().exit_code:
- 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)
+ 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),
@@ -2222,16 +2221,9 @@ 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))
- 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)
- # ignore warning about strip invalidating signatures
- s = re.sub('.*strip: changes being made to the file will invalidate the code signature in.*\n','',s)
+ # 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))
+
return s
# normalise a .prof file, so that we can reasonably compare it against
@@ -2305,17 +2297,6 @@ 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)
- # ignore warning about strip invalidating signatures
- s = re.sub('.*strip: changes being made to the file will invalidate the code signature in.*\n','',s)
-
return s
def normalise_asm( s: str ) -> str:
diff --git a/testsuite/tests/concurrent/should_run/conc059_c.c b/testsuite/tests/concurrent/should_run/conc059_c.c
index 89532caf4c..58cb595073 100644
--- a/testsuite/tests/concurrent/should_run/conc059_c.c
+++ b/testsuite/tests/concurrent/should_run/conc059_c.c
@@ -5,8 +5,6 @@
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
-// stdlib is needed for exit()
-#include <stdlib.h>
#if mingw32_HOST_OS
#include <windows.h>
#else
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index ad2a477f74..94ecb3006c 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -121,8 +121,7 @@ else:
only_darwin = skip
test('static001', [extra_files(['Static001.hs']),
- only_darwin,
- when(arch('x86_64'), expect_broken(8127))],
+ only_darwin, expect_broken(8127)],
makefile_test, ['static001'])
test('dynHelloWorld',
@@ -261,12 +260,8 @@ test('T12955', normal, makefile_test, [])
test('T12971', [when(opsys('mingw32'), fragile(17945)), ignore_stdout], makefile_test, [])
test('json', normal, compile_fail, ['-ddump-json'])
-
-# json2 test is sensitive to the LLVM not supported ouput from GHC. ANd the error
-# won't tell. It looks unrelated and is annoying to debug. Hence we disable the
-# warning to prevent spurious errors.
-test('json2', normalise_version('base','ghc-prim'), compile, ['-ddump-types -ddump-json -Wno-unsupported-llvm-version'])
-test('T16167', exit_code(1), run_command,
+test('json2', normalise_version('base','ghc-prim'), compile, ['-ddump-types -ddump-json'])
+test('T16167', exit_code(1), run_command,
['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs'])
test('T13604', [], makefile_test, [])
test('T13604a', [], makefile_test, [])
diff --git a/testsuite/tests/ghci/linking/all.T b/testsuite/tests/ghci/linking/all.T
index 09284b5cea..79ec5e5f98 100644
--- a/testsuite/tests/ghci/linking/all.T
+++ b/testsuite/tests/ghci/linking/all.T
@@ -11,12 +11,11 @@ test('ghcilink002', [extra_files(['TestLink.hs', 'f.c']),
makefile_test, ['ghcilink002'])
test('ghcilink003',
- [ unless(doing_ghci, skip),
- # libstdc++ is named differently on FreeBSD
- when(opsys('freebsd'), expect_broken(17739)),
- when(opsys('darwin'), fragile(16083))
- ], makefile_test, ['ghcilink003'])
-
+ [unless(doing_ghci, skip),
+ # libstdc++ is named differently on FreeBSD
+ when(opsys('freebsd'), expect_broken(17739))],
+ makefile_test,
+ ['ghcilink003'])
test('ghcilink004',
[extra_files(['TestLink.hs', 'f.c']),
@@ -32,11 +31,11 @@ test('ghcilink005',
makefile_test, ['ghcilink005'])
test('ghcilink006',
- [ unless(doing_ghci, skip),
- # libstdc++ is named differently on FreeBSD
- when(opsys('freebsd'), expect_broken(17739)),
- when(opsys('darwin'), fragile(16083))
- ], makefile_test, ['ghcilink006'])
+ [unless(doing_ghci, skip),
+ # libstdc++ is named differently on FreeBSD
+ when(opsys('freebsd'), expect_broken(17739))],
+ makefile_test,
+ ['ghcilink006'])
test('T3333',
[unless(doing_ghci, skip),
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index b3b2b20e60..64f87bc7e2 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -328,3 +328,4 @@ test('T19197', normal, ghci_script, ['T19197.script'])
test('T19158', normal, ghci_script, ['T19158.script'])
test('T19279', normal, ghci_script, ['T19279.script'])
test('T19310', normal, ghci_script, ['T19310.script'])
+
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 085e4b1f12..848314928a 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -53,11 +53,6 @@ test('divbyzero',
# behavior on division-by-zero (#10332).
omit_ways(llvm_ways),
when(not(have_ncg()), skip),
- # Aarch64 does not have div-by-zero exceptions for sdiv/udiv.
- # The only option would be to implement this in assembly with checks for
- # each devision. Neither gcc, nor llvm do this as of right now. Microsoft
- # apparently does so though?
- when(arch('aarch64'), skip),
# Apparently the output can be different on different
# Linux setups, so just ignore it. As long as we get
# the right exit code we're OK.
diff --git a/testsuite/tests/rts/linker/all.T b/testsuite/tests/rts/linker/all.T
index 7bf1d54762..e89a246165 100644
--- a/testsuite/tests/rts/linker/all.T
+++ b/testsuite/tests/rts/linker/all.T
@@ -12,7 +12,7 @@ test('unsigned_reloc_macho_x64',
test('section_alignment',
[
extra_files(['runner.c', 'section_alignment.c']),
- unless(opsys('darwin'), expect_broken(13624))
+ unless(opsys('darwin') and arch('x86_64'), expect_broken(13624))
],
run_command, ['$MAKE -s --no-print-directory section_alignment'])