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/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/driver')
-rw-r--r-- | testsuite/driver/testlib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index fe9125b650..dbae8d7c79 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -264,6 +264,7 @@ def _extra_hc_opts( name, opts, v ): # ----- def extra_clean( files ): + assert not isinstance(files, str), files return lambda name, opts, v=files: _extra_clean(name, opts, v); def _extra_clean( name, opts, v ): @@ -751,6 +752,11 @@ def test_common_work (name, opts, func, args): def clean(strs): for str in strs: + if (str.endswith('.package.conf') or + str.startswith('package.conf.') and not str.endswith('/*')): + # Package confs are directories now. + str += '/*' + for name in glob.glob(in_testdir(str)): clean_full_path(name) |