Commit 82f7f182 authored by thomie's avatar thomie

Testsuite: delete TEST_HC_OPTS_NO_RECOMP

The previous commits removed `-fforce-recomp` from TEST_HC_OPTS, so
TEST_HC_OPTS_NO_RECOMP = TEST_HC_OPTS.
parent 3b49f8fa
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ002:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) A.hs
$(CP) A.hi A.old.hi
$(RM) A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) A.hs
diff A.hi A.old.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ003:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O -dinitial-unique=0 -dunique-increment=1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=0 -dunique-increment=1 A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ007:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ008:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ009:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ010:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ011:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ012:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ013:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ014:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ015:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ016:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ017:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ018:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ019:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777215 -dunique-increment=-1 -O A.hs
diff A.hi A.normal.hi
......@@ -2,12 +2,10 @@ TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ006:
$(RM) spec-inline-determ.hi spec-inline-determ.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O2 spec-inline-determ.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -O2 spec-inline-determ.hs
$(CP) spec-inline-determ.hi spec-inline-determ.old.hi
$(RM) spec-inline-determ.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777206 -dunique-increment=-1 -O2 spec-inline-determ.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777206 -dunique-increment=-1 -O2 spec-inline-determ.hs
diff spec-inline-determ.hi spec-inline-determ.old.hi
......@@ -2,12 +2,10 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
determ005:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=0 -dunique-increment=1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=0 -dunique-increment=1 -O A.hs
$(CP) A.hi A.old.hi
$(RM) A.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -dinitial-unique=16777206 -dunique-increment=-1 -O A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -dinitial-unique=16777206 -dunique-increment=-1 -O A.hs
diff A.hi A.old.hi
This diff is collapsed.
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
LOCAL_PKGCONF=local.package.conf
clean:
......@@ -34,7 +30,7 @@ prep:
cd p1 && ./setup build -v0
prep.%:
cd $* && "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -o setup Setup.hs
cd $* && "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -o setup Setup.hs
cd $* && ./setup configure $(CABAL_MINIMAL_BUILD) -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
cd $* && ./setup build -v0
cd $* && ./setup register -v0 --inplace
......
......@@ -2,18 +2,14 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Test recompilation bug #1959, which failed in 6.8.1 (and earlier)
compile ::
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c -O E.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c -O D.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c -O -funfolding-use-threshold=0 C.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c -O B.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) E.o D.o C.o B.o -o prog
'$(TEST_HC)' $(TEST_HC_OPTS) -c -O E.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c -O D.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c -O -funfolding-use-threshold=0 C.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c -O B.hs
'$(TEST_HC)' $(TEST_HC_OPTS) E.o D.o C.o B.o -o prog
clean ::
rm -f *.o *.hi E.hs
......
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -16,12 +12,12 @@ clean:
# bug #437
T437: clean
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -main-is Test.main Test.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -main-is Test2.main Test2.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -main-is Test.main Test.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -main-is Test2.main Test2.hs
./Test
./Test2
sleep 1
# Test that changing the main function name forces recomp of Test2
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -main-is Test2.doit Test2.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -main-is Test2.doit Test2.hs
./Test2
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -17,9 +13,9 @@ clean:
T5147: clean
cp B1.hs B.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -v0 A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 A.hs
sleep 1
cp B2.hs B.hs
if '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -v0 A.hs; then exit 1; else exit 0; fi
if '$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 A.hs; then exit 1; else exit 0; fi
# Reverse the sense of the error; we *expect*
# the compilation to fail, and then we want to succeed
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -17,6 +13,6 @@ clean:
recomp001: clean
cp B1.hs B.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -v0 C.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 C.hs
cp B2.hs B.hs
-'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -v0 C.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 C.hs
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -15,6 +11,6 @@ clean:
# Only the first invocation should print any "Compiling" messages
recomp002: clean
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make Q.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make Q.hs
echo Middle >&2
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make Q.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make Q.hs
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
OBJSUFFIX = .o
# Test that adding a new module that shadows a package module causes
......@@ -14,9 +10,9 @@ recomp003:
$(RM) A.hi A$(OBJSUFFIX) out
$(RM) -rf Data
mkdir Data
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c A.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c A.hs
echo "module Data.Char where" > Data/Char.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c Data/Char.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -c Data/Char.hs
# Should now recompile A.hs, because Char is now a home module:
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -c A.hs 2>err
'$(TEST_HC)' $(TEST_HC_OPTS) -c A.hs 2>err
@if grep NOT err; then false; fi
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
EXECUTABLE = MainX$(exeext)
CLEAN_FILES = c.c c.o MainX.o MainX.hi $(EXECUTABLE)
......@@ -17,13 +13,13 @@ recomp004:
$(RM) $(CLEAN_FILES)
$(CP) c1.c c.c
$(CP) Main.hs MainX.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -c c.c -o c.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 --make MainX.hs c.o -o $(EXECUTABLE)
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c c.c -o c.o
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make MainX.hs c.o -o $(EXECUTABLE)
./$(EXECUTABLE)
$(CP) c2.c c.c
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 -c c.c -o c.o
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c c.c -o c.o
# Hack to make sure c.o is really newer
touch -t 01010000 MainX.hs MainX.hi MainX.o c.c $(EXECUTABLE)
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 --make MainX.hs c.o -o $(EXECUTABLE)
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make MainX.hs c.o -o $(EXECUTABLE)
./$(EXECUTABLE)
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
clean:
rm -f *.o*
rm -f *.hi*
......@@ -13,8 +9,8 @@ clean:
recomp005: clean
cp C1.hs C.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make E.hs -O
'$(TEST_HC)' $(TEST_HC_OPTS) --make E.hs -O
sleep 1
cp C2.hs C.hs
# Should recompile E, because C is now an orphan
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make E.hs -O
'$(TEST_HC)' $(TEST_HC_OPTS) --make E.hs -O
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
OBJSUFFIX = .o
# Test that changing the fixity of a type synonym operator forces recompilation
......@@ -13,8 +9,8 @@ OBJSUFFIX = .o
recomp006:
$(RM) A.hi A$(OBJSUFFIX)
cp B1.hs B.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make A.hs 1>out 2>err
'$(TEST_HC)' $(TEST_HC_OPTS) --make A.hs 1>out 2>err
sleep 1
cp B2.hs B.hs
# This should fail
if '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make A.hs; then false; fi
if '$(TEST_HC)' $(TEST_HC_OPTS) --make A.hs; then false; fi
......@@ -2,21 +2,17 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
Main.o : B.hi
B.o : A.hi
%.o : %.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -O -c $< -o $@
'$(TEST_HC)' $(TEST_HC_OPTS) -O -c $< -o $@
# magic .hi rule: see rules/hi-rule.mk in the GHC source tree
%.hi : %.o ;
prog : A.o B.o Main.o
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -o prog A.o B.o Main.o
'$(TEST_HC)' $(TEST_HC_OPTS) -o prog A.o B.o Main.o
clean :
$(RM) *.hi *.o prog
......
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -18,9 +14,9 @@ clean:
recomp009: clean
cp Sub1.hs Sub.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) $(ghcThWayFlags) -v0 --make Main.hs
'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 --make Main.hs
./Main
sleep 1
cp Sub2.hs Sub.hs
-'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) $(ghcThWayFlags) -v0 --make Main.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) $(ghcThWayFlags) -v0 --make Main.hs
./Main
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -17,10 +13,10 @@ clean:
recomp010: clean
cp X1.hs X.hs
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -O Main.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -O Main.hs
./Main
sleep 1
cp X2.hs X.hs
rm X.o
-'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -O Main.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -O Main.hs
./Main
......@@ -2,10 +2,6 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
# Recompilation tests
clean:
......@@ -16,17 +12,17 @@ clean:
recomp011: clean
echo "main = putStrLn x" >A.hsinc
echo "x = show 42" >B.hsinc
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -O Main.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -O Main.hs
./Main
sleep 1
echo "x = show 43" >B.hsinc
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -O Main.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -O Main.hs
./Main
sleep 1
echo "main = putStrLn (x ++ x)" >A.hsinc
'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make -O Main.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -O Main.hs
sleep 1