diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-06-27 11:46:20 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-09 22:58:48 -0400 |
commit | d7423f1096b5415928ba1d1d621e066ef4e5b641 (patch) | |
tree | e2af0c2c313cc6601d671afd420d90316914dfea /testsuite/driver/testlib.py | |
parent | 7f8bf98ea5b726d3f874faf23d4934765ed1116b (diff) | |
download | haskell-d7423f1096b5415928ba1d1d621e066ef4e5b641.tar.gz |
Testsuite tweaks and refactoring
- Rename requires_th to req_th for consistency with other req functions
(e.g. req_interp, req_profiling etc.)
- req_th (previously requires_th) now checks for interpreter (via
req_interp). With this running TH tests are skipped when running the
test suite with stage=1.
- Test tweaks:
- T9360a, T9360b: Use req_interp
- recomp009, T13938, RAE_T32a: Use req_th
- Fix check-makefiles linter: it now looks for Makefiles instead of .T
files (which are actually Python files)
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r-- | testsuite/driver/testlib.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 2e87925fda..d220110a6b 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -184,6 +184,16 @@ def req_interp( name, opts ): if not config.have_interp: opts.expect = 'fail' +def req_th( name, opts ): + """ + Mark a test as requiring TemplateHaskell. In addition to having interpreter + support, currently this means that we don't run the test in the profasm when + when GHC is dynamically-linked since we can't load profiled objects in this + case. + """ + req_interp(name, opts) + return when(ghc_dynamic(), omit_ways(['profasm'])) + def req_smp( name, opts ): if not config.have_smp: opts.expect = 'fail' @@ -453,14 +463,6 @@ def unless(b: bool, f): def doing_ghci() -> bool: return 'ghci' in config.run_ways -def requires_th(name, opts): - """ - Mark a test as requiring TemplateHaskell. Currently this means - that we don't run the test in the profasm when when GHC is - dynamically-linked since we can't load profiled objects in this case. - """ - return when(ghc_dynamic(), omit_ways(['profasm'])) - def ghc_dynamic() -> bool: return config.ghc_dynamic |