[commit: ghc] master: Suppress duplicate .T files (9a29b65)
git at git.haskell.org
git at git.haskell.org
Wed Dec 21 10:51:20 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9a29b65bda8aed4c5fdbff25866ddf2dd1583210/ghc
>---------------------------------------------------------------
commit 9a29b65bda8aed4c5fdbff25866ddf2dd1583210
Author: Gabor Greif <ggreif at gmail.com>
Date: Wed Dec 21 11:17:48 2016 +0100
Suppress duplicate .T files
As per http://stackoverflow.com/questions/7961363/removing-duplicates-in-lists
use the set() function to zap duplicates from the obtained list of .T files.
I am using
$ python3 --version
Python 3.5.1
and strangely findTFiles() returns some .T files twice:
-- BEFORE
Found 376 .T files...
...
====> Scanning ../../libraries/array/tests/all.T
====> Scanning ../../libraries/array/tests/all.T
*** framework failure for T2120(duplicate) There are multiple tests with this name
*** framework failure for largeArray(duplicate) There are multiple tests with this name
*** framework failure for array001(duplicate) There are multiple tests with this name
*** framework failure for T9220(duplicate) There are multiple tests with this name
*** framework failure for T229(duplicate) There are multiple tests with this name
...
-- AFTER
Found 365 .T files...
...
====> Scanning ../../libraries/array/tests/all.T
...
Even more strangely 'find' begs to differ:
$ find libraries testsuite/tests -name "*.T" | sort | uniq | wc -l
368
>---------------------------------------------------------------
9a29b65bda8aed4c5fdbff25866ddf2dd1583210
testsuite/driver/runtests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 28b393a..a30763c 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -255,7 +255,7 @@ print('Timeout is ' + str(config.timeout))
if config.rootdirs == []:
config.rootdirs = ['.']
-t_files = list(findTFiles(config.rootdirs))
+t_files = set(findTFiles(config.rootdirs))
print('Found', len(t_files), '.T files...')
More information about the ghc-commits
mailing list