[commit: ghc] master: testsuite: Make T3234 more robust (91a82de)

git at git.haskell.org git at git.haskell.org
Thu May 31 02:06:08 UTC 2018


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

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

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

commit 91a82de011d3bc1783f849168d90268bc24ceeee
Author: roland <rsx at bluewin.ch>
Date:   Sat May 19 18:21:42 2018 +0200

    testsuite: Make T3234 more robust
    
    Just look for the rule firing that we want to see instead of matching on
    the entire dump.
    
    Fixes #15088.


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

91a82de011d3bc1783f849168d90268bc24ceeee
 testsuite/tests/simplCore/should_compile/Makefile  |  4 ++
 .../tests/simplCore/should_compile/T3234.stderr    | 71 ----------------------
 .../tests/simplCore/should_compile/T3234.stdout    |  1 +
 testsuite/tests/simplCore/should_compile/all.T     |  6 +-
 4 files changed, 8 insertions(+), 74 deletions(-)

diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 1f1bf25..5f077b2 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -13,6 +13,10 @@ T13468:
         # Expecting no output from the grep, hence "-"
         # If the case branch is not eliminated, we get a patError
 
+T3234:
+	$(RM) -f T3234.o T3234.hi
+	'$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl-stats T3234.hs | grep 'fold/build'
+
 T3990:
 	$(RM) -f T3990.o T3990.hi
 	'$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl T3990.hs | grep 'test_case'
diff --git a/testsuite/tests/simplCore/should_compile/T3234.stderr b/testsuite/tests/simplCore/should_compile/T3234.stderr
deleted file mode 100644
index 223650a..0000000
--- a/testsuite/tests/simplCore/should_compile/T3234.stderr
+++ /dev/null
@@ -1,71 +0,0 @@
-
-==================== FloatOut stats: ====================
-2 Lets floated to top level; 0 Lets floated elsewhere; from 1 Lambda groups
-
-
-
-==================== FloatOut stats: ====================
-0 Lets floated to top level; 0 Lets floated elsewhere; from 0 Lambda groups
-
-
-
-==================== Grand total simplifier statistics ====================
-Total ticks:     52
-
-18 PreInlineUnconditionally
-  1 g
-  1 xs
-  1 ys
-  1 c
-  1 n
-  1 a
-  1 a
-  1 g
-  1 h
-  1 n
-  1 k
-  1 z
-  1 g
-  1 c
-  1 n
-  1 lvl
-  1 lvl
-  1 lvl
-1 PostInlineUnconditionally 1 c
-1 UnfoldingDone 1 GHC.Base.build
-5 RuleFired
-  1 ++
-  1 augment/build
-  1 fold/build
-  1 unpack
-  1 unpack-list
-2 LetFloatFromLet 2
-25 BetaReduction
-  1 a
-  1 g
-  1 a
-  1 xs
-  1 ys
-  1 b
-  1 c
-  1 n
-  1 a
-  1 b
-  1 a
-  1 a
-  1 g
-  1 h
-  1 b
-  1 c
-  1 n
-  1 b
-  1 a
-  1 k
-  1 z
-  1 g
-  1 a
-  1 c
-  1 n
-10 SimplifierDone 10
-
-
diff --git a/testsuite/tests/simplCore/should_compile/T3234.stdout b/testsuite/tests/simplCore/should_compile/T3234.stdout
new file mode 100644
index 0000000..725c379
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T3234.stdout
@@ -0,0 +1 @@
+  1 fold/build
\ No newline at end of file
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 9a3b8f9..1bc42af 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -44,9 +44,9 @@ test('T3016', when(fast(), skip), compile, [''])
 test('T1647', normal, compile, ['-fdicts-strict -dcore-lint'])
 
 test('T3234',
-     only_ways(['optasm']),
-     compile,
-     ['-ddump-simpl-stats -dsuppress-uniques'])
+     normal,
+     run_command,
+     ['$MAKE -s --no-print-directory T3234'])
 
 test('T3717', only_ways(['optasm']),
               compile,



More information about the ghc-commits mailing list