diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2016-04-26 15:12:05 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2016-04-30 10:17:51 +0200 |
commit | c4259ff3defcac0d8f8075fd99884eef22e5d966 (patch) | |
tree | a47fe8799c795b555d1f118c906d13f2a46b5a67 /testsuite | |
parent | b725fe0a8d2a2ee3e6d95bb0ec345ee532381ee2 (diff) | |
download | haskell-c4259ff3defcac0d8f8075fd99884eef22e5d966.tar.gz |
Testsuite: make CLEANUP=1 the default (#9758)
Also move the `cleanup` setting from `default_testopts` to `config`. The
`cleanup` setting is the same for all tests, hence it belongs in
`config`.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D2148
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/config/ghc | 1 | ||||
-rw-r--r-- | testsuite/driver/testglobals.py | 3 | ||||
-rw-r--r-- | testsuite/driver/testlib.py | 2 | ||||
-rw-r--r-- | testsuite/mk/test.mk | 19 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal01/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal03/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal04/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal05/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal06/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal08/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/cabal09/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/cabal/sigcabal01/all.T | 4 |
12 files changed, 31 insertions, 26 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 26ce3bd832..595415ae7b 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -81,6 +81,7 @@ if (ghc_with_llvm == 1): config.run_ways.append('optllvm') config.in_tree_compiler = in_tree_compiler +config.cleanup = cleanup config.clean_only = clean_only config.way_flags = lambda name : { diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index 2c7f55100f..d1976923a0 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -207,9 +207,6 @@ class TestOptions: # expected exit code self.exit_code = 0 - # should we clean up after ourselves? - self.cleanup = '' - # extra files to clean afterward self.clean_files = [] diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index c69c874c8c..a7221847a7 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -694,7 +694,7 @@ def test_common_work (name, opts, func, args): if way not in do_ways: skiptest (name,way) - if getTestOpts().cleanup != '' and (config.clean_only or do_ways != []): + if config.cleanup and (config.clean_only or do_ways): pretest_cleanup(name) clean([name + suff for suff in [ '', '.exe', '.exe.manifest', '.genscript', diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk index 6d9a4c24cf..8198efbc8c 100644 --- a/testsuite/mk/test.mk +++ b/testsuite/mk/test.mk @@ -189,6 +189,14 @@ ifeq "$(SKIP_PERF_TESTS)" "YES" RUNTEST_OPTS += --skip-perf-tests endif +ifeq "$(CLEANUP)" "0" +RUNTEST_OPTS += -e cleanup=False +else ifeq "$(CLEANUP)" "NO" +RUNTEST_OPTS += -e cleanup=False +else +RUNTEST_OPTS += -e cleanup=True +endif + ifneq "$(CLEAN_ONLY)" "" RUNTEST_OPTS += -e clean_only=True else @@ -207,7 +215,6 @@ RUNTEST_OPTS += \ -e 'config.os="$(TargetOS_CPP)"' \ -e 'config.arch="$(TargetARCH_CPP)"' \ -e 'config.wordsize="$(WORDSIZE)"' \ - -e 'default_testopts.cleanup="$(CLEANUP)"' \ -e 'config.timeout=int($(TIMEOUT)) or config.timeout' \ -e 'config.exeext="$(exeext)"' \ -e 'config.top="$(TOP_ABS)"' @@ -326,15 +333,15 @@ list_broken: # From # https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html: # -# "The ‘-j’ option is a special case (see Parallel Execution). If you set -# it to some numeric value ‘N’ and your operating system supports it (most -# any UNIX system will; others typically won’t), the parent make and all the -# sub-makes will communicate to ensure that there are only ‘N’ jobs running +# "The '-j' option is a special case (see Parallel Execution). If you set +# it to some numeric value 'N' and your operating system supports it (most +# any UNIX system will; others typically won't), the parent make and all the +# sub-makes will communicate to ensure that there are only 'N' jobs running # at the same time between them all." # # In our scenario, the user will actually see the following warning [2]: # -# ‘warning: jobserver unavailable: using -j1. Add `+' to parent make rule.’ +# 'warning: jobserver unavailable: using -j1. Add '+' to parent make rule.' # # The problem is that topmake and submake don't know about eachother, since # python is in between. To let them communicate, we have to use the '+' diff --git a/testsuite/tests/cabal/cabal01/all.T b/testsuite/tests/cabal/cabal01/all.T index 5149805331..43485ead3d 100644 --- a/testsuite/tests/cabal/cabal01/all.T +++ b/testsuite/tests/cabal/cabal01/all.T @@ -13,10 +13,10 @@ if config.have_shared_libs: else: dyn = '--disable-shared' -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' def ignoreLdOutput(str): return re.sub('Creating library file: dist.build.libHStest-1.0-ghc[0-9.]*.dll.a\n', '', str) diff --git a/testsuite/tests/cabal/cabal03/all.T b/testsuite/tests/cabal/cabal03/all.T index 01d3882a84..b1b0561fc4 100644 --- a/testsuite/tests/cabal/cabal03/all.T +++ b/testsuite/tests/cabal/cabal03/all.T @@ -1,7 +1,7 @@ -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('cabal03', ignore_output, diff --git a/testsuite/tests/cabal/cabal04/all.T b/testsuite/tests/cabal/cabal04/all.T index b2794a5e10..e69b540f2a 100644 --- a/testsuite/tests/cabal/cabal04/all.T +++ b/testsuite/tests/cabal/cabal04/all.T @@ -13,10 +13,10 @@ if not config.compiler_profiled and config.have_shared_libs: else: dyn = '--disable-shared' -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('cabal04', normal, diff --git a/testsuite/tests/cabal/cabal05/all.T b/testsuite/tests/cabal/cabal05/all.T index 36dcbdf9de..d7d9ffb3e5 100644 --- a/testsuite/tests/cabal/cabal05/all.T +++ b/testsuite/tests/cabal/cabal05/all.T @@ -1,7 +1,7 @@ -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('cabal05', ignore_output, diff --git a/testsuite/tests/cabal/cabal06/all.T b/testsuite/tests/cabal/cabal06/all.T index edca288265..6568e074c3 100644 --- a/testsuite/tests/cabal/cabal06/all.T +++ b/testsuite/tests/cabal/cabal06/all.T @@ -1,7 +1,7 @@ -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('cabal06', normal, diff --git a/testsuite/tests/cabal/cabal08/all.T b/testsuite/tests/cabal/cabal08/all.T index fc4221a769..3aaf185828 100644 --- a/testsuite/tests/cabal/cabal08/all.T +++ b/testsuite/tests/cabal/cabal08/all.T @@ -1,7 +1,7 @@ -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('cabal08', normal, diff --git a/testsuite/tests/cabal/cabal09/all.T b/testsuite/tests/cabal/cabal09/all.T index 66bdb013db..6728c7749b 100644 --- a/testsuite/tests/cabal/cabal09/all.T +++ b/testsuite/tests/cabal/cabal09/all.T @@ -1,7 +1,7 @@ -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('cabal09', ignore_output, diff --git a/testsuite/tests/cabal/sigcabal01/all.T b/testsuite/tests/cabal/sigcabal01/all.T index 24c50b672a..4a1bad9956 100644 --- a/testsuite/tests/cabal/sigcabal01/all.T +++ b/testsuite/tests/cabal/sigcabal01/all.T @@ -1,7 +1,7 @@ -if default_testopts.cleanup != '': +if config.cleanup: cleanup = 'CLEANUP=1' else: - cleanup = '' + cleanup = 'CLEANUP=0' test('sigcabal01', expect_broken(10622), |