Commit da728988 authored by Duncan Coutts's avatar Duncan Coutts Committed by Edward Z. Yang
Browse files

Change testsuite to not use old-style file package databases

Now uses ghc-pkg init. The file-style databases are no longer supported.
parent 01461ce8
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment