I've prepared two patches fixing some test failures.

The first passes '-ignore-dot-ghci' to all tests, not only the ghci way, which 
deals with forgetting to pass the flag when the test is invoked with '--
interactive' from a makefile, as was the case with T8333.

The second removes the now-obsolete pragma setting '-fno-warn-amp' from 
spec001.

I didn't notice the trailing whitespace that was also removed in time, sorry, 
but I hope the clutter from that is not too bad.

Kindly revise the patches, please.
>From f4ccb957acdf1108aa60d0d2cf8074cc05a9901f Mon Sep 17 00:00:00 2001
From: Daniel Fischer <[email protected]>
Date: Fri, 25 Apr 2014 00:07:43 +0200
Subject: [PATCH 1/2] Pass '-ignore-dot-ghci' to all tests, as suggested by SPJ
 in http://www.haskell.org/pipermail/ghc-devs/2014-April/004726.html

The flag was set for the ghci way, but T8333 passed '--interactive' without
'-ignore-dot-ghci' on the command line in the makefile, making the test
fail if the .ghci file produces output (as mine does), or if it loads
modules which aren't present in a validate build.

Passing it always doesn't hurt, and prevents forgetting it in
'--interactive' invocations.
---
 testsuite/config/ghc |  4 ++--
 testsuite/mk/test.mk | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 947f558..73f5db0 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -92,7 +92,7 @@ config.way_flags = lambda name : {
     'prof'         : ['-prof', '-static', '-auto-all', '-fasm'],
     'profasm'      : ['-O', '-prof', '-static', '-auto-all'],
     'profthreaded' : ['-O', '-prof', '-static', '-auto-all', '-threaded'],
-    'ghci'         : ['--interactive', '-v0', '-ignore-dot-ghci', '+RTS', '-I0.1', '-RTS'],
+    'ghci'         : ['--interactive', '-v0', '+RTS', '-I0.1', '-RTS'],
     'extcore'      : ['-fext-core'],
     'optextcore'   : ['-O', '-fext-core'],
     'threaded1'    : ['-threaded', '-debug'],
@@ -116,7 +116,7 @@ config.way_flags = lambda name : {
     'dynllvm'          : ['-O', '-dynamic', '-fllvm']
    }
 
-config.way_rts_flags = { 
+config.way_rts_flags = {
     'normal'       : [],
     'g1'           : ['-G1'],
     'optasm'       : [],
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 0cc3f21..46c3c5c 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -25,9 +25,9 @@ COMPILER     = ghc
 CONFIGDIR    = $(TOP)/config
 CONFIG       = $(CONFIGDIR)/$(COMPILER)
 
-# TEST_HC_OPTS is passed to every invocation of TEST_HC 
+# TEST_HC_OPTS is passed to every invocation of TEST_HC
 # in nested Makefiles
-TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS)
+TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbFlag) -rtsopts -ignore-dot-ghci $(EXTRA_HC_OPTS)
 
 RUNTEST_OPTS =
 
@@ -207,23 +207,23 @@ RUNTEST_OPTS +=  \
 ifeq "$(list_broken)" "YES"
 set_list_broken = -e config.list_broken=True
 else
-set_list_broken = 
+set_list_broken =
 endif
 
 ifeq "$(fast)" "YES"
 setfast = -e config.fast=1
 else
-setfast = 
+setfast =
 endif
 
 ifeq "$(accept)" "YES"
 setaccept = -e config.accept=1
 else
-setaccept = 
+setaccept =
 endif
 
-TESTS	     = 
-TEST	     = 
+TESTS	     =
+TEST	     =
 WAY =
 
 .PHONY: all boot test verbose accept fast
-- 
1.8.1.4

>From 6d348ed020abeef384e8c64f6c526b802df198fb Mon Sep 17 00:00:00 2001
From: Daniel Fischer <[email protected]>
Date: Fri, 25 Apr 2014 00:17:51 +0200
Subject: [PATCH 2/2] Remove pragma setting '-fno-warn-amp'.

The flag is deprecated, and the deprecation warning makes the test fail.
Without the flag, the test passes, as it should, HEAD is AMP-compliant,
as far as I know.
---
 testsuite/tests/simplCore/should_compile/spec001.hs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/testsuite/tests/simplCore/should_compile/spec001.hs b/testsuite/tests/simplCore/should_compile/spec001.hs
index f4b4dd0..5a6fb03 100644
--- a/testsuite/tests/simplCore/should_compile/spec001.hs
+++ b/testsuite/tests/simplCore/should_compile/spec001.hs
@@ -1,6 +1,5 @@
 {-# LANGUAGE CPP, UnboxedTuples, MagicHash, StandaloneDeriving, DeriveDataTypeable #-}
 {-# OPTIONS_GHC -O #-}
-{-# OPTIONS_GHC -fno-warn-amp #-}
 
 -- In GHC 6.4, compiling this module gave a Core Lint failure following the
 -- specialier, because a function was floated out that had a RULE that
-- 
1.8.1.4

_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to