diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-05-28 22:00:00 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-06-04 23:58:29 +0200 |
commit | e340f6eccc9d6d8f0a11c56c312570060c245946 (patch) | |
tree | a94a473f864e6483fa8d19ef7202295a5628e047 /testsuite/tests/driver | |
parent | d0063e8975672714a6ae33f7e8175421c6b5d5c5 (diff) | |
download | haskell-e340f6eccc9d6d8f0a11c56c312570060c245946.tar.gz |
Testsuite: add/fix cleanup for certain tests
* extra_clean argument should be a list
Add an assert to prevent regressions.
* properly clean package conf direcories
They are directories now, which was causing problems.
* properly clean write_interface_* tests
We were getting these errors:
[Errno 21] Is a directory: './driver/write_interface_oneshot'
[Errno 39] Directory not empty: './driver/write_interface_oneshot'
[Errno 21] Is a directory: './driver/write_interface_make'
[Errno 39] Directory not empty: './driver/write_interface_make'
* outputdir() is better than -outputdir, as it knows how to (pre)clean
itself.
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r-- | testsuite/tests/driver/Makefile | 8 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index dafb76ec8c..d463ebfb73 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -578,14 +578,14 @@ T2182: .PHONY: write_interface_oneshot write_interface_oneshot: $(RM) -rf write_interface_oneshot/A011.hi - "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_oneshot -fno-code -fwrite-interface -c A011.hs - test -f write_interface_oneshot/A011.hi + "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_oneshot_hidir -fno-code -fwrite-interface -c A011.hs + test -f write_interface_oneshot_hidir/A011.hi .PHONY: write_interface_make write_interface_make: $(RM) -rf write_interface_make/A011.hi - "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_make -fno-code -fwrite-interface --make A011.hs - test -f write_interface_make/A011.hi + "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_make_hidir -fno-code -fwrite-interface --make A011.hs + test -f write_interface_make_hidir/A011.hi .PHONY: T9938 T9938: diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 8d4fcf5256..5d936d764f 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -405,8 +405,15 @@ def build_T9050(name, way): return simple_build(name + '.cmm', way, '-outputdir=. ', 0, '', 0, 0, 0) test('T9050', normal, build_T9050, []) -test('write_interface_oneshot', normal, run_command, ['$MAKE -s --no-print-directory write_interface_oneshot']) -test('write_interface_make', normal, run_command, ['$MAKE -s --no-print-directory write_interface_make']) +test('write_interface_oneshot', + extra_clean(['write_interface_oneshot_hidir/*']), + run_command, + ['$MAKE -s --no-print-directory write_interface_oneshot']) + +test('write_interface_make', + extra_clean(['write_interface_make_hidir/*']), + run_command, + ['$MAKE -s --no-print-directory write_interface_make']) test('T9776', normal, compile_fail, ['-frule-check']) |