diff options
Diffstat (limited to 'patches/packages-haskell-ghc-9.14.1-testsuite-skip-test-flag.diff')
| -rw-r--r-- | patches/packages-haskell-ghc-9.14.1-testsuite-skip-test-flag.diff | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/patches/packages-haskell-ghc-9.14.1-testsuite-skip-test-flag.diff b/patches/packages-haskell-ghc-9.14.1-testsuite-skip-test-flag.diff new file mode 100644 index 0000000..5702f01 --- /dev/null +++ b/patches/packages-haskell-ghc-9.14.1-testsuite-skip-test-flag.diff @@ -0,0 +1,50 @@ +diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py +index 36bc6a454a87..8d4a2a10c1b8 100644 +--- a/testsuite/driver/runtests.py ++++ b/testsuite/driver/runtests.py +@@ -79,6 +79,7 @@ def get_compiler_info() -> TestConfig: + parser.add_argument("--unexpected-output-dir", help="directory in which to place unexpected output") + parser.add_argument("--target-wrapper", help="wrapper executable to use when executing binaries compiled for the target") + parser.add_argument("--only", action="append", help="just this test (can be give multiple --only= flags)") ++parser.add_argument("--skip", action="append", help="skip this test (can be given multiple --skip= flags)") + parser.add_argument("--way", action="append", help="just this way") + parser.add_argument("--skipway", action="append", help="skip this way") + parser.add_argument("--threads", type=int, help="threads to run simultaneously") +@@ -135,6 +136,9 @@ def get_compiler_info() -> TestConfig: + config.only = args.only + config.run_only_some_tests = True + ++if args.skip: ++ config.skip = set(args.skip) ++ + if args.way: + for way in args.way: + if way not in all_ways: +diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py +index b41a7e084dec..bff8e7d5d695 100644 +--- a/testsuite/driver/testglobals.py ++++ b/testsuite/driver/testglobals.py +@@ -31,6 +31,9 @@ def __init__(self): + self.run_only_some_tests = False + self.only = set() + ++ # Skip these tests ++ self.skip = set() ++ + # Don't fail on out-of-tolerance stat failures + self.ignore_perf_increases = False + self.ignore_perf_decreases = False +diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py +index c74f5d4346c9..97631734ac7e 100644 +--- a/testsuite/driver/testlib.py ++++ b/testsuite/driver/testlib.py +@@ -1526,6 +1526,9 @@ def test(name: TestName, + # report on any tests we couldn't find and error out. + config.only.remove(name) + ++ if name in config.skip: ++ return ++ + # Make a deep copy of the default_testopts, as we need our own copy + # of any dictionaries etc inside it. Otherwise, if one test modifies + # them, all tests will see the modified version! |
