summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2014-08-27 16:33:20 +0100
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-08-29 15:03:33 +0100
commitda7289882610ccae3f16c74be7440d19c29ecd20 (patch)
tree2d374702f29d934ac872de47661c4bda2d4827fe
parent01461ce86f9d4bd3a4969b43aa9d237949ca3ce6 (diff)
downloadhaskell-da7289882610ccae3f16c74be7440d19c29ecd20.tar.gz
Change testsuite to not use old-style file package databases
Now uses ghc-pkg init. The file-style databases are no longer supported.
-rw-r--r--testsuite/tests/driver/T1372/Makefile4
-rw-r--r--testsuite/tests/driver/T3007/Makefile4
-rw-r--r--testsuite/tests/ghci/linking/Makefile6
-rw-r--r--testsuite/tests/plugins/simple-plugin/Makefile2
-rw-r--r--testsuite/tests/rename/prog006/Makefile3
-rw-r--r--testsuite/tests/simplCore/should_compile/T7702plugin/Makefile2
-rw-r--r--testsuite/tests/typecheck/bug1465/Makefile4
7 files changed, 13 insertions, 12 deletions
diff --git a/testsuite/tests/driver/T1372/Makefile b/testsuite/tests/driver/T1372/Makefile
index 91ef6d50c7..acd6b66d20 100644
--- a/testsuite/tests/driver/T1372/Makefile
+++ b/testsuite/tests/driver/T1372/Makefile
@@ -15,7 +15,7 @@ clean:
rm -f *.o *.hi
rm -f clean.out prep.out
rm -f p1/A.hs
- rm -f $(LOCAL_PKGCONF)
+ rm -rf $(LOCAL_PKGCONF)
T1372:
$(MAKE) clean
@@ -26,7 +26,7 @@ T1372:
$(MAKE) clean
prep:
- echo "[]" >$(LOCAL_PKGCONF)
+ "$(GHC_PKG)" init $(LOCAL_PKGCONF)
cp p1/A1.hs p1/A.hs
$(MAKE) prep.p1
$(MAKE) prep.p2
diff --git a/testsuite/tests/driver/T3007/Makefile b/testsuite/tests/driver/T3007/Makefile
index 716122578c..8b78a49261 100644
--- a/testsuite/tests/driver/T3007/Makefile
+++ b/testsuite/tests/driver/T3007/Makefile
@@ -6,11 +6,11 @@ clean:
rm -f A/Setup A/Setup.o A/Setup.hi
rm -f B/Setup B/Setup.o B/Setup.hi
rm -rf A/dist B/dist
- rm -f package.conf
+ rm -rf package.conf
T3007:
$(MAKE) clean
- echo '[]' > package.conf
+ '$(GHC_PKG)' init package.conf
cd A && '$(TEST_HC)' -v0 --make Setup
cd A && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-option=--global-package-db=../package.conf --ghc-option=-package-db../package.conf
cd A && ./Setup build -v0
diff --git a/testsuite/tests/ghci/linking/Makefile b/testsuite/tests/ghci/linking/Makefile
index 08c5158acc..5b8e23c66c 100644
--- a/testsuite/tests/ghci/linking/Makefile
+++ b/testsuite/tests/ghci/linking/Makefile
@@ -63,7 +63,7 @@ ghcilink004 :
echo 'key: test-1.0' >>$(PKG004)
echo 'library-dirs: $${pkgroot}' >>$(PKG004)
echo 'extra-libraries: foo' >>$(PKG004)
- echo '[]' >$(LOCAL_PKGCONF004)
+ '$(GHC_PKG)' init $(LOCAL_PKGCONF004)
'$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF004) register $(PKG004) -v0
#
"$(TEST_HC)" -c f.c -o dir004/foo.o
@@ -91,7 +91,7 @@ ghcilink005 :
echo 'key: test-1.0' >>$(PKG005)
echo 'library-dirs: $${pkgroot}' >>$(PKG005)
echo 'extra-libraries: foo' >>$(PKG005)
- echo '[]' >$(LOCAL_PKGCONF005)
+ '$(GHC_PKG)' init $(LOCAL_PKGCONF005)
'$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF005) register $(PKG005) -v0
#
"$(TEST_HC)" -c -dynamic f.c -o dir005/foo.o
@@ -115,7 +115,7 @@ ghcilink006 :
echo "id: test-XXX" >>$(PKG006)
echo "key: test-1.0" >>$(PKG006)
echo "extra-libraries: stdc++" >>$(PKG006)
- echo "[]" >$(LOCAL_PKGCONF006)
+ '$(GHC_PKG)' init $(LOCAL_PKGCONF006)
'$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF006) register $(PKG006) -v0
#
echo ":q" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-db $(LOCAL_PKGCONF006) -package test
diff --git a/testsuite/tests/plugins/simple-plugin/Makefile b/testsuite/tests/plugins/simple-plugin/Makefile
index 17588bf3fb..eb7cc6ab1d 100644
--- a/testsuite/tests/plugins/simple-plugin/Makefile
+++ b/testsuite/tests/plugins/simple-plugin/Makefile
@@ -13,7 +13,7 @@ package.%:
mkdir pkg.$*
"$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs
- echo "[]" > pkg.$*/local.package.conf
+ "$(GHC_PKG)" init pkg.$*/local.package.conf
pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
pkg.$*/setup build --distdir pkg.$*/dist -v0
diff --git a/testsuite/tests/rename/prog006/Makefile b/testsuite/tests/rename/prog006/Makefile
index 4124feccf0..e5d35e1798 100644
--- a/testsuite/tests/rename/prog006/Makefile
+++ b/testsuite/tests/rename/prog006/Makefile
@@ -36,7 +36,8 @@ rn.prog006:
echo "key: test-1.0" >>pkg.conf
echo "import-dirs: `./pwd`" >>pkg.conf
echo "exposed-modules: B.C" >>pkg.conf
- echo "[]" >$(LOCAL_PKGCONF)
+ rm -rf $(LOCAL_PKGCONF)
+ $(GHC_PKG) init $(LOCAL_PKGCONF)
$(LOCAL_GHC_PKG) register pkg.conf -v0
'$(TEST_HC)' $(TEST_HC_OPTS) -c -package-db $(LOCAL_PKGCONF) -package test -fforce-recomp A.hs -i
# The -i clears the search path, so A.hs will find B.C from package test
diff --git a/testsuite/tests/simplCore/should_compile/T7702plugin/Makefile b/testsuite/tests/simplCore/should_compile/T7702plugin/Makefile
index 42c56c9512..beba0dded8 100644
--- a/testsuite/tests/simplCore/should_compile/T7702plugin/Makefile
+++ b/testsuite/tests/simplCore/should_compile/T7702plugin/Makefile
@@ -13,7 +13,7 @@ package.%:
mkdir pkg.$*
"$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs
- echo "[]" > pkg.$*/local.package.conf
+ "$(GHC_PKG)" init pkg.$*/local.package.conf
pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf
pkg.$*/setup build --distdir pkg.$*/dist -v0
diff --git a/testsuite/tests/typecheck/bug1465/Makefile b/testsuite/tests/typecheck/bug1465/Makefile
index c082cb6084..78cdd518f2 100644
--- a/testsuite/tests/typecheck/bug1465/Makefile
+++ b/testsuite/tests/typecheck/bug1465/Makefile
@@ -11,7 +11,7 @@ clean:
rm -f v2/setup v2/Setup.o v2/Setup.hi
rm -rf v1/dist v2/dist
rm -f *.o *.hi
- rm -f $(LOCAL_PKGCONF)
+ rm -rf $(LOCAL_PKGCONF)
bug1465:
$(MAKE) clean
@@ -20,7 +20,7 @@ bug1465:
$(MAKE) clean
prep:
- echo "[]" >$(LOCAL_PKGCONF)
+ '$(GHC_PKG)' init $(LOCAL_PKGCONF)
$(MAKE) prep.v1
$(MAKE) prep.v2
'$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(LOCAL_PKGCONF) -c -package $(PKG)-1.0 B1.hs