[commit: ghc] master: Testsuite: do not copy .hi/.o files to testdir (#12112) (df9611e)
git at git.haskell.org
git at git.haskell.org
Fri Jun 24 08:59:12 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/df9611ee5c056066fe88fe3ef2f64382cec8b741/ghc
>---------------------------------------------------------------
commit df9611ee5c056066fe88fe3ef2f64382cec8b741
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Fri Jun 24 10:41:48 2016 +0200
Testsuite: do not copy .hi/.o files to testdir (#12112)
>---------------------------------------------------------------
df9611ee5c056066fe88fe3ef2f64382cec8b741
testsuite/driver/testlib.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 0fc764b..41e0fce 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -674,6 +674,8 @@ def get_package_cache_timestamp():
except:
return 0.0
+do_not_copy = ('.hi', '.o', '.dyn_hi', '.dyn_o') # 12112
+
def test_common_work (name, opts, func, args):
try:
t.total_tests = t.total_tests+1
@@ -729,9 +731,10 @@ def test_common_work (name, opts, func, args):
# specify all other files that their test depends on (but
# this seems to be necessary for only about 10% of all
# tests).
- files = set((f for f in os.listdir(opts.srcdir)
- if f.startswith(name) and
- not f.endswith(testdir_suffix)))
+ files = set(f for f in os.listdir(opts.srcdir)
+ if f.startswith(name) and not f == name and
+ not f.endswith(testdir_suffix) and
+ not os.path.splitext(f)[1] in do_not_copy)
for filename in (opts.extra_files + extra_src_files.get(name, [])):
if filename.startswith('/'):
framework_fail(name, 'whole-test',
More information about the ghc-commits
mailing list