[commit: ghc] master: Update tests for #12870 to pass with a slow run of the testsuite. (fdec06a)

git at git.haskell.org git at git.haskell.org
Mon Mar 19 16:41:41 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fdec06a201f81467badb9e2a5d43b4a85564dff9/ghc

>---------------------------------------------------------------

commit fdec06a201f81467badb9e2a5d43b4a85564dff9
Author: Andreas Klebinger <klebinger.andreas at gmx.at>
Date:   Mon Mar 19 12:06:54 2018 -0400

    Update tests for #12870 to pass with a slow run of the testsuite.
    
    Test Plan: make slow
    
    Reviewers: bgamari, erikd, simonmar
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #12870
    
    Differential Revision: https://phabricator.haskell.org/D4486


>---------------------------------------------------------------

fdec06a201f81467badb9e2a5d43b4a85564dff9
 testsuite/tests/rts/flags/Makefile   |  3 ---
 testsuite/tests/rts/flags/T12870.hs  |  3 ++-
 testsuite/tests/rts/flags/T12870g.hs |  3 ++-
 testsuite/tests/rts/flags/all.T      | 39 +++++++++++++++++++++---------------
 4 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/testsuite/tests/rts/flags/Makefile b/testsuite/tests/rts/flags/Makefile
index 6190047..9101fbd 100644
--- a/testsuite/tests/rts/flags/Makefile
+++ b/testsuite/tests/rts/flags/Makefile
@@ -1,6 +1,3 @@
 TOP=../../..
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/test.mk
-
-T1791:
-	'$(TEST_HC)' T1791.hs -o T1791 -O -rtsopts
diff --git a/testsuite/tests/rts/flags/T12870.hs b/testsuite/tests/rts/flags/T12870.hs
index 8d536d5..69086cd 100644
--- a/testsuite/tests/rts/flags/T12870.hs
+++ b/testsuite/tests/rts/flags/T12870.hs
@@ -1,4 +1,5 @@
-module T12870 where
+--We check if RTS arguments are properly filtered/passed along
+--by outputting them to stdout.
 
 import System.Environment
 
diff --git a/testsuite/tests/rts/flags/T12870g.hs b/testsuite/tests/rts/flags/T12870g.hs
index e409349..3efd633 100644
--- a/testsuite/tests/rts/flags/T12870g.hs
+++ b/testsuite/tests/rts/flags/T12870g.hs
@@ -1,4 +1,5 @@
-module T12870g where
+--We check the generation count as a way to verify an RTS argument
+--was actually parsed and accepted by the RTS.
 
 import GHC.RTS.Flags (getGCFlags, generations)
 
diff --git a/testsuite/tests/rts/flags/all.T b/testsuite/tests/rts/flags/all.T
index 33a28e5..548fcd8 100644
--- a/testsuite/tests/rts/flags/all.T
+++ b/testsuite/tests/rts/flags/all.T
@@ -1,44 +1,51 @@
 #Standard handling of RTS arguments
 test('T12870a',
-    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs'])],
+    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
+        omit_ways(['ghci'])],
     multimod_compile_and_run,
-    ['T12870', '-rtsopts -main-is T12870'])
+    ['T12870', '-rtsopts'])
 
 test('T12870b',
     [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
-        exit_code(1), ignore_stderr],
+        exit_code(1), ignore_stderr, omit_ways(['ghci'])],
     multimod_compile_and_run,
-    ['T12870', '-rtsopts=none -main-is T12870'])
+    ['T12870', '-rtsopts=none'])
 
 test('T12870c',
     [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
-    exit_code(1)],
+        exit_code(1), omit_ways(['ghci'])],
     multimod_compile_and_run,
-    ['T12870', '-rtsopts=some -main-is T12870'])
+    ['T12870', '-rtsopts=some'])
 
 test('T12870d',
-    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs'])],
+    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
+        omit_ways(['ghci'])],
     multimod_compile_and_run,
-    ['T12870', '-main-is T12870'])
+    ['T12870', ''])
 
 #RTS options should be passed along to the program
 test('T12870e',
-    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs'])],
+    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
+        omit_ways(['ghci', 'threaded2'])],
     multimod_compile_and_run,
-    ['T12870', '-rtsopts=ignore -main-is T12870'])
+    ['T12870', '-rtsopts=ignore'])
+
 test('T12870f',
-    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs'])],
+    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
+        omit_ways(['ghci', 'threaded2'])],
     multimod_compile_and_run,
-    ['T12870', '-rtsopts=ignoreAll -main-is T12870'])
+    ['T12870', '-rtsopts=ignoreAll'])
 
 #Check handling of env variables
 test('T12870g',
-    [extra_files(['T12870g.hs']), cmd_prefix('GHCRTS=-G7 '), extra_files(['T12870g.hs'])],
+    [extra_files(['T12870g.hs']), cmd_prefix('GHCRTS=-G7 '), extra_files(['T12870g.hs']),
+        omit_ways(['ghci'])],
     multimod_compile_and_run,
-    ['T12870g', '-rtsopts -main-is T12870g -with-rtsopts="-G3"'])
+    ['T12870g', '-rtsopts -with-rtsopts="-G3"'])
 
 test('T12870h',
-    [extra_files(['T12870g.hs']), cmd_prefix('GHCRTS=-G7 '), extra_files(['T12870g.hs'])],
+    [extra_files(['T12870g.hs']), cmd_prefix('GHCRTS=-G7 '), extra_files(['T12870g.hs']),
+        omit_ways(['ghci'])],
     multimod_compile_and_run,
-    ['T12870g', '-rtsopts=ignoreAll -main-is T12870g -with-rtsopts="-G3"'])
+    ['T12870g', '-rtsopts=ignoreAll -with-rtsopts="-G3"'])
 



More information about the ghc-commits mailing list