ports/lang/ghc/patches/patch-testsuite_driver_testlib_py

35 lines
1.8 KiB
Text

Index: testsuite/driver/testlib.py
--- testsuite/driver/testlib.py.orig
+++ testsuite/driver/testlib.py
@@ -2062,6 +2062,13 @@ def compare_outputs(way: WayName,
actual_raw = read_no_crs(actual_path)
actual_str = normaliser(actual_raw)
+ # Strip OpenBSDs linker warnings about strcpy(3) & friends.
+ if config.os == 'openbsd':
+ actual_str = re.sub('.*: In function .*:\n+(.*:[0-9]+:[0-9]+:\n)?:? *warning: .* is .* misused, please use .*\n',
+ '', actual_str)
+ actual_str = re.sub('.*/libgmp\.so\.[0-9]*\.[0-9]*: warning: .* is .* misused, please use .*\n',
+ '', actual_str)
+
# See Note [Output comparison].
if whitespace_normaliser(expected_str) == whitespace_normaliser(actual_str):
return True
@@ -2078,7 +2085,7 @@ def compare_outputs(way: WayName,
if config.verbose >= 1 and _expect_pass(way):
# See Note [Output comparison].
- r = runCmd('diff -uw "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
+ r = runCmd('diff -auw "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
actual_normalised_path),
stdout=diff_file,
print_output=True)
@@ -2086,7 +2093,7 @@ def compare_outputs(way: WayName,
# If for some reason there were no non-whitespace differences,
# then do a full diff
if r == 0:
- r = runCmd('diff -u "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
+ r = runCmd('diff -au "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
actual_normalised_path),
stdout=diff_file,
print_output=True)