[Git][ghc/ghc][wip/slowtest] testsuite: Fix omit_ways usage

Ben Gamari gitlab at gitlab.haskell.org
Sun Apr 7 04:07:41 UTC 2019



Ben Gamari pushed to branch wip/slowtest at Glasgow Haskell Compiler / GHC


Commits:
93eb36bb by Ben Gamari at 2019-04-07T04:07:10Z
testsuite: Fix omit_ways usage

omit_ways expects a list but this was broken in several cases.

- - - - -


7 changed files:

- testsuite/driver/testlib.py
- testsuite/tests/concurrent/should_run/all.T
- testsuite/tests/lib/integer/all.T
- testsuite/tests/programs/barton-mangler-bug/test.T
- testsuite/tests/rts/all.T
- testsuite/tests/typecheck/should_run/all.T
- testsuite/tests/utils/should_run/all.T


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -275,6 +275,7 @@ def omit_ways( ways ):
     return lambda name, opts, w=ways: _omit_ways( name, opts, w )
 
 def _omit_ways( name, opts, ways ):
+    assert ways.__class__ is list
     opts.omit_ways += ways
 
 # -----


=====================================
testsuite/tests/concurrent/should_run/all.T
=====================================
@@ -239,7 +239,7 @@ test('conc067', ignore_stdout, compile_and_run, [''])
 
 # omit threaded2, the behaviour of this test is non-deterministic with more
 # than one CPU.
-test('conc068', [ omit_ways('threaded2'), exit_code(1) ], compile_and_run, [''])
+test('conc068', [ omit_ways(['threaded2']), exit_code(1) ], compile_and_run, [''])
 
 test('setnumcapabilities001',
      [ only_ways(['threaded1','threaded2']),


=====================================
testsuite/tests/lib/integer/all.T
=====================================
@@ -1,8 +1,8 @@
 test('integerBits', normal, compile_and_run, [''])
 test('integerConversions', normal, compile_and_run, [''])
 # skip ghci as it doesn't support unboxed tuples
-test('integerGmpInternals', [reqlib('integer-gmp'), omit_ways('ghci')], compile_and_run, [''])
-test('plusMinusInteger', [omit_ways('ghci')], compile_and_run, [''])
+test('integerGmpInternals', [reqlib('integer-gmp'), omit_ways(['ghci'])], compile_and_run, [''])
+test('plusMinusInteger', [omit_ways(['ghci'])], compile_and_run, [''])
 test('integerConstantFolding', normal, makefile_test, ['integerConstantFolding'])
 test('fromToInteger', [], makefile_test, ['fromToInteger'])
 test('IntegerConversionRules', [], makefile_test, ['IntegerConversionRules'])


=====================================
testsuite/tests/programs/barton-mangler-bug/test.T
=====================================
@@ -8,7 +8,7 @@ test('barton-mangler-bug',
                    'Plot.hi',              'Plot.o',
                    'PlotExample.hi',       'PlotExample.o',
                    'TypesettingTricks.hi', 'TypesettingTricks.o']),
-      omit_ways('debug') # Fails for debug way due to annotation linting timeout
+      omit_ways(['debug']) # Fails for debug way due to annotation linting timeout
       ],
      multimod_compile_and_run, ['Main', ''])
 


=====================================
testsuite/tests/rts/all.T
=====================================
@@ -93,7 +93,7 @@ test('stack002', [extra_files(['stack001.hs']),
 
 # run this test with very small stack chunks to exercise the stack
 # overflow/underflow machinery.
-test('stack003', [ omit_ways('ghci'), # uses unboxed tuples
+test('stack003', [ omit_ways(['ghci']), # uses unboxed tuples
                    extra_run_opts('500000 +RTS -kc1k -kb100 -K96m -RTS') ],
                  compile_and_run, [''])
 


=====================================
testsuite/tests/typecheck/should_run/all.T
=====================================
@@ -96,7 +96,7 @@ test('T6117', normal, compile_and_run, [''])
 test('T5751', normal, compile_and_run, [''])
 test('T5913', normal, compile_and_run, [''])
 test('T7748', normal, compile_and_run, [''])
-test('T7861', [omit_ways('debug'), exit_code(1)], compile_and_run, [''])
+test('T7861', [omit_ways(['debug']), exit_code(1)], compile_and_run, [''])
 test('TcTypeNatSimpleRun', normal, compile_and_run, [''])
 test('TcTypeSymbolSimpleRun', normal, compile_and_run, [''])
 test('T8119', normal, ghci_script, ['T8119.script'])


=====================================
testsuite/tests/utils/should_run/all.T
=====================================
@@ -1,6 +1,6 @@
 test('T14854',
      [only_ways(threaded_ways),
-      omit_ways('ghci'),
+      omit_ways(['ghci']),
       reqlib('random'),
       ignore_stderr],
      compile_and_run,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/93eb36bb102541c93f6d8c7d71d0b075bc83eb5a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/93eb36bb102541c93f6d8c7d71d0b075bc83eb5a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190407/c4bb50cc/attachment-0001.html>


More information about the ghc-commits mailing list