Commit 24d70dae authored by pcapriotti's avatar pcapriotti
Browse files

Rename package-conf flags to package-db.

parent 37a28207
...@@ -97,7 +97,7 @@ def _reqlib( opts, lib ): ...@@ -97,7 +97,7 @@ def _reqlib( opts, lib ):
if have_subprocess: if have_subprocess:
# By preference we use subprocess, as the alternative uses # By preference we use subprocess, as the alternative uses
# /dev/null which mingw doesn't have. # /dev/null which mingw doesn't have.
p = subprocess.Popen([config.ghc_pkg, '--no-user-package-conf', 'describe', lib], p = subprocess.Popen([config.ghc_pkg, '--no-user-package-db', 'describe', lib],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
# read from stdout and stderr to avoid blocking due to # read from stdout and stderr to avoid blocking due to
...@@ -1672,7 +1672,7 @@ def if_verbose_dump( n, f ): ...@@ -1672,7 +1672,7 @@ def if_verbose_dump( n, f ):
# Guess flags suitable for the compiler. # Guess flags suitable for the compiler.
def guess_compiler_flags(): def guess_compiler_flags():
if config.compiler_type == 'ghc': if config.compiler_type == 'ghc':
return ['-fforce-recomp', '-dcore-lint', '-no-user-package-conf'] return ['-fforce-recomp', '-dcore-lint', '-no-user-package-db']
elif config.compiler_type == 'nhc': elif config.compiler_type == 'nhc':
return ['-an-nhc-specific-flag'] return ['-an-nhc-specific-flag']
else: else:
......
...@@ -27,7 +27,7 @@ CONFIG = $(CONFIGDIR)/$(COMPILER) ...@@ -27,7 +27,7 @@ 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 # in nested Makefiles
TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-conf -rtsopts $(EXTRA_HC_OPTS) TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts $(EXTRA_HC_OPTS)
RUNTEST_OPTS = RUNTEST_OPTS =
......
...@@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk ...@@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk include $(TOP)/mk/test.mk
PKGCONF01=local01.package.conf PKGCONF01=local01.package.conf
LOCAL_GHC_PKG01 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF01) LOCAL_GHC_PKG01 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF01)
STRIP_PKGROOT=sed 's/^pkgroot: .*$$/pkgroot: /' STRIP_PKGROOT=sed 's/^pkgroot: .*$$/pkgroot: /'
...@@ -49,7 +49,7 @@ ghcpkg01 : ...@@ -49,7 +49,7 @@ ghcpkg01 :
if $(LOCAL_GHC_PKG01) register test3.pkg; then false; else true; fi if $(LOCAL_GHC_PKG01) register test3.pkg; then false; else true; fi
PKGCONF03=local03.package.conf PKGCONF03=local03.package.conf
LOCAL_GHC_PKG03 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF03) LOCAL_GHC_PKG03 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF03)
ghcpkg03 : ghcpkg03 :
@rm -rf $(PKGCONF03) @rm -rf $(PKGCONF03)
...@@ -67,7 +67,7 @@ ghcpkg03 : ...@@ -67,7 +67,7 @@ ghcpkg03 :
$(LOCAL_GHC_PKG03) update --force test.pkg $(LOCAL_GHC_PKG03) update --force test.pkg
PKGCONF04=local04.package.conf PKGCONF04=local04.package.conf
LOCAL_GHC_PKG04 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF04) LOCAL_GHC_PKG04 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF04)
# Test that importing a module exposed by two packages reports a conflict # Test that importing a module exposed by two packages reports a conflict
ghcpkg04 : ghcpkg04 :
...@@ -77,13 +77,13 @@ ghcpkg04 : ...@@ -77,13 +77,13 @@ ghcpkg04 :
$(LOCAL_GHC_PKG04) update --force test5.pkg >/dev/null 2>&1 $(LOCAL_GHC_PKG04) update --force test5.pkg >/dev/null 2>&1
$(LOCAL_GHC_PKG04) expose testpkg-1.2.3.4 >/dev/null 2>&1 $(LOCAL_GHC_PKG04) expose testpkg-1.2.3.4 >/dev/null 2>&1
@: # testpkg-1.2.3.4 and newtestpkg-2.0 are both exposed now @: # testpkg-1.2.3.4 and newtestpkg-2.0 are both exposed now
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONF04) -c ghcpkg04.hs || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONF04) -c ghcpkg04.hs || true
# Test stacking of package.confs (also #2441) # Test stacking of package.confs (also #2441)
PKGCONF05a=local05a.package.conf PKGCONF05a=local05a.package.conf
PKGCONF05b=local05b.package.conf PKGCONF05b=local05b.package.conf
LOCAL_GHC_PKG05a = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF05a) LOCAL_GHC_PKG05a = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF05a)
LOCAL_GHC_PKG05b = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF05a) -f $(PKGCONF05b) LOCAL_GHC_PKG05b = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF05a) -f $(PKGCONF05b)
ghcpkg05 : ghcpkg05 :
rm -rf $(PKGCONF05a) $(PKGCONF05b) rm -rf $(PKGCONF05a) $(PKGCONF05b)
...@@ -101,7 +101,7 @@ ghcpkg05 : ...@@ -101,7 +101,7 @@ ghcpkg05 :
# Test for #2330: reject duplicate dependencies # Test for #2330: reject duplicate dependencies
PKGCONF06=local06.package.conf PKGCONF06=local06.package.conf
LOCAL_GHC_PKG06 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF06) LOCAL_GHC_PKG06 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF06)
ghcpkg06 : ghcpkg06 :
rm -rf $(PKGCONF06) rm -rf $(PKGCONF06)
...@@ -111,25 +111,25 @@ ghcpkg06 : ...@@ -111,25 +111,25 @@ ghcpkg06 :
$(LOCAL_GHC_PKG06) register --force testdup.pkg $(LOCAL_GHC_PKG06) register --force testdup.pkg
PKGCONF1750=local1750.package.conf PKGCONF1750=local1750.package.conf
LOCAL_GHC_PKG1750 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF1750) LOCAL_GHC_PKG1750 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF1750)
1750: 1750:
rm -rf $(PKGCONF1750) 1750.hs 1750.o 1750.hi 1750.out rm -rf $(PKGCONF1750) 1750.hs 1750.o 1750.hi 1750.out
$(LOCAL_GHC_PKG1750) init $(PKGCONF1750) $(LOCAL_GHC_PKG1750) init $(PKGCONF1750)
$(LOCAL_GHC_PKG1750) register --force 1750A.pkg >1750.out 2>&1 $(LOCAL_GHC_PKG1750) register --force 1750A.pkg >1750.out 2>&1
$(LOCAL_GHC_PKG1750) register --force 1750B.pkg >1750.out 2>&1 $(LOCAL_GHC_PKG1750) register --force 1750B.pkg >1750.out 2>&1
GHC_PACKAGE_PATH=$(PKGCONF1750) '$(GHC_PKG)' --no-user-package-conf list GHC_PACKAGE_PATH=$(PKGCONF1750) '$(GHC_PKG)' --no-user-package-db list
# GHC_PACKAGE_PATH trick is to make this work with 6.8.2 which doesn't have # GHC_PACKAGE_PATH trick is to make this work with 6.8.2 which doesn't have
# the patch "Change the command-line semantics for query commands" to # the patch "Change the command-line semantics for query commands" to
# ghc-pkg # ghc-pkg
echo "main = return ()" >1750.hs echo "main = return ()" >1750.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONF1750) -package 1750A 1750.hs || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONF1750) -package 1750A 1750.hs || true
PKGCONFSHADOW1=localshadow1.package.conf PKGCONFSHADOW1=localshadow1.package.conf
PKGCONFSHADOW2=localshadow2.package.conf PKGCONFSHADOW2=localshadow2.package.conf
LOCAL_GHC_PKGSHADOW1 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONFSHADOW1) LOCAL_GHC_PKGSHADOW1 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFSHADOW1)
LOCAL_GHC_PKGSHADOW2 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONFSHADOW2) LOCAL_GHC_PKGSHADOW2 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFSHADOW2)
LOCAL_GHC_PKGSHADOW3 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONFSHADOW1) -f $(PKGCONFSHADOW2) LOCAL_GHC_PKGSHADOW3 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFSHADOW1) -f $(PKGCONFSHADOW2)
# Test package shadowing behaviour. # Test package shadowing behaviour.
# #
...@@ -152,18 +152,18 @@ shadow: ...@@ -152,18 +152,18 @@ shadow:
# shadowdep-1-XXX to be unavailable: # shadowdep-1-XXX to be unavailable:
# #
@echo "should FAIL:" @echo "should FAIL:"
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONFSHADOW1) -package-conf $(PKGCONFSHADOW2) -package shadowdep -c shadow.hs -fno-code || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONFSHADOW1) -package-db $(PKGCONFSHADOW2) -package shadowdep -c shadow.hs -fno-code || true
# #
# Reversing the order of the package.conf files should fix the problem: # Reversing the order of the package.conf files should fix the problem:
# #
@echo "should SUCCEED:" @echo "should SUCCEED:"
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONFSHADOW2) -package-conf $(PKGCONFSHADOW1) -package shadowdep -c shadow.hs -fno-code || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONFSHADOW2) -package-db $(PKGCONFSHADOW1) -package shadowdep -c shadow.hs -fno-code || true
# #
# We can also fix the problem by using an explicit -package-id flag to # We can also fix the problem by using an explicit -package-id flag to
# specify a package we really want to use: # specify a package we really want to use:
# #
@echo "should SUCCEED:" @echo "should SUCCEED:"
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONFSHADOW1) -package-conf $(PKGCONFSHADOW2) -package-id shadowdep-1-XXX -c shadow.hs -fno-code '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(PKGCONFSHADOW1) -package-db $(PKGCONFSHADOW2) -package-id shadowdep-1-XXX -c shadow.hs -fno-code
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -172,7 +172,7 @@ shadow: ...@@ -172,7 +172,7 @@ shadow:
# of InstalledPackageInfo. # of InstalledPackageInfo.
PACKAGE_CONF_ghcpkg02 = package.conf.ghcpkg02 PACKAGE_CONF_ghcpkg02 = package.conf.ghcpkg02
GHC_PKG_ghcpkg02 = '$(GHC_PKG)' --no-user-package-conf --global-conf=$(PACKAGE_CONF_ghcpkg02) GHC_PKG_ghcpkg02 = '$(GHC_PKG)' --no-user-package-db --global-package-db=$(PACKAGE_CONF_ghcpkg02)
ghcpkg02: ghcpkg02:
rm -rf $(PACKAGE_CONF_ghcpkg02) rm -rf $(PACKAGE_CONF_ghcpkg02)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
This funny module was reduced from a failing build of stage2 using This funny module was reduced from a failing build of stage2 using
the new code generator and the linear register allocator, with this bug: the new code generator and the linear register allocator, with this bug:
"inplace/bin/ghc-stage1" -fPIC -dynamic -H32m -O -Wall -H64m -O0 -package-name ghc-7.1.20110414 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/../libffi/build/include -Icompiler/stage2 -Icompiler/../libraries/base/cbits -Icompiler/../libraries/base/include -Icompiler/. -Icompiler/parser -Icompiler/utils -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.11.0 -package array-0.3.0.2 -package base-4.3.1.0 -package bin-package-db-0.0.0.0 -package bytestring-0.9.1.10 -package containers-0.4.0.0 -package directory-1.1.0.0 -package filepath-1.2.0.0 -package hoopl-3.8.7.0 -package hpc-0.5.0.6 -package old-time-1.0.0.6 -package process-1.0.1.4 -package template-haskell-2.5.0.0 -package unix-2.4.1.0 -Wall -fno-warn-name-shadowing -fno-warn-orphans -XHaskell98 -XNondecreasingIndentation -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRank2Types -XScopedTypeVariables -XDeriveDataTypeable -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2 -O -DGHC_DEFAULT_NEW_CODEGEN -no-user-package-conf -rtsopts -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -c compiler/main/DriverPipeline.hs -o compiler/stage2/build/DriverPipeline.dyn_o -fforce-recomp -dno-debug-output -fno-warn-unused-binds "inplace/bin/ghc-stage1" -fPIC -dynamic -H32m -O -Wall -H64m -O0 -package-name ghc-7.1.20110414 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/../libffi/build/include -Icompiler/stage2 -Icompiler/../libraries/base/cbits -Icompiler/../libraries/base/include -Icompiler/. -Icompiler/parser -Icompiler/utils -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.11.0 -package array-0.3.0.2 -package base-4.3.1.0 -package bin-package-db-0.0.0.0 -package bytestring-0.9.1.10 -package containers-0.4.0.0 -package directory-1.1.0.0 -package filepath-1.2.0.0 -package hoopl-3.8.7.0 -package hpc-0.5.0.6 -package old-time-1.0.0.6 -package process-1.0.1.4 -package template-haskell-2.5.0.0 -package unix-2.4.1.0 -Wall -fno-warn-name-shadowing -fno-warn-orphans -XHaskell98 -XNondecreasingIndentation -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRank2Types -XScopedTypeVariables -XDeriveDataTypeable -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2 -O -DGHC_DEFAULT_NEW_CODEGEN -no-user-package-db -rtsopts -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build -hisuf dyn_hi -osuf dyn_o -hcsuf dyn_hc -c compiler/main/DriverPipeline.hs -o compiler/stage2/build/DriverPipeline.dyn_o -fforce-recomp -dno-debug-output -fno-warn-unused-binds
ghc-stage1: panic! (the 'impossible' happened) ghc-stage1: panic! (the 'impossible' happened)
(GHC version 7.1.20110414 for x86_64-unknown-linux): (GHC version 7.1.20110414 for x86_64-unknown-linux):
......
...@@ -12,10 +12,10 @@ T3007: ...@@ -12,10 +12,10 @@ T3007:
$(MAKE) clean $(MAKE) clean
echo '[]' > package.conf echo '[]' > package.conf
cd A && '$(TEST_HC)' -v0 --make Setup cd A && '$(TEST_HC)' -v0 --make Setup
cd A && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-option=--global-conf=../package.conf --ghc-option=-package-conf../package.conf 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 cd A && ./Setup build -v0
cd A && ./Setup register --inplace -v0 cd A && ./Setup register --inplace -v0
cd B && '$(TEST_HC)' -v0 --make Setup cd B && '$(TEST_HC)' -v0 --make Setup
cd B && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-option=--global-conf=../package.conf --ghc-option=-package-conf../package.conf cd B && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-option=--global-package-db=../package.conf --ghc-option=-package-db../package.conf
cd B && ./Setup build -v0 cd B && ./Setup build -v0
...@@ -17,7 +17,7 @@ recomp007: ...@@ -17,7 +17,7 @@ recomp007:
"$(TEST_HC)" -v0 --make Setup.hs "$(TEST_HC)" -v0 --make Setup.hs
$(MAKE) prep.a1 $(MAKE) prep.a1
$(MAKE) prep.b $(MAKE) prep.b
"$(GHC_PKG)" unregister --package-conf=$(LOCAL_PKGCONF) a-1.0 "$(GHC_PKG)" unregister --package-db=$(LOCAL_PKGCONF) a-1.0
$(MAKE) prep.a2 $(MAKE) prep.a2
cd b && ../Setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF) cd b && ../Setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
cd b && ../Setup build cd b && ../Setup build
......
...@@ -2,7 +2,7 @@ TOP=../../.. ...@@ -2,7 +2,7 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk include $(TOP)/mk/test.mk
LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF) LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF)
# Test 1: ghci -Ldir -lfoo # Test 1: ghci -Ldir -lfoo
# with dir/libfoo.a # with dir/libfoo.a
...@@ -63,12 +63,11 @@ ghcilink004 : ...@@ -63,12 +63,11 @@ ghcilink004 :
echo 'library-dirs: $${pkgroot}' >>$(PKG004) echo 'library-dirs: $${pkgroot}' >>$(PKG004)
echo 'extra-libraries: foo' >>$(PKG004) echo 'extra-libraries: foo' >>$(PKG004)
echo '[]' >$(LOCAL_PKGCONF004) echo '[]' >$(LOCAL_PKGCONF004)
'$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF004) register $(PKG004) -v0 '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF004) register $(PKG004) -v0
# #
"$(TEST_HC)" -c f.c -o dir004/foo.o "$(TEST_HC)" -c f.c -o dir004/foo.o
"$(AR)" cqs dir004/libfoo.a dir004/foo.o "$(AR)" cqs dir004/libfoo.a dir004/foo.o
echo "test" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-conf $(LOCAL_PKGCONF004) -package test TestLink.hs echo "test" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-db $(LOCAL_PKGCONF004) -package test TestLink.hs
# Test 5: # Test 5:
# package P # package P
...@@ -91,11 +90,11 @@ ghcilink005 : ...@@ -91,11 +90,11 @@ ghcilink005 :
echo 'library-dirs: $${pkgroot}' >>$(PKG005) echo 'library-dirs: $${pkgroot}' >>$(PKG005)
echo 'extra-libraries: foo' >>$(PKG005) echo 'extra-libraries: foo' >>$(PKG005)
echo '[]' >$(LOCAL_PKGCONF005) echo '[]' >$(LOCAL_PKGCONF005)
'$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF005) register $(PKG005) -v0 '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF005) register $(PKG005) -v0
# #
"$(TEST_HC)" -c -dynamic f.c -o dir005/foo.o "$(TEST_HC)" -c -dynamic f.c -o dir005/foo.o
"$(TEST_HC)" -shared -o dir005/$(call DLL,foo) dir005/foo.o "$(TEST_HC)" -shared -o dir005/$(call DLL,foo) dir005/foo.o
echo "test" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-conf $(LOCAL_PKGCONF005) -package test TestLink.hs echo "test" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-db $(LOCAL_PKGCONF005) -package test TestLink.hs
# Test 6: # Test 6:
# package P # package P
...@@ -114,7 +113,7 @@ ghcilink006 : ...@@ -114,7 +113,7 @@ ghcilink006 :
echo "id: test-XXX" >>$(PKG006) echo "id: test-XXX" >>$(PKG006)
echo "extra-libraries: stdc++" >>$(PKG006) echo "extra-libraries: stdc++" >>$(PKG006)
echo "[]" >$(LOCAL_PKGCONF006) echo "[]" >$(LOCAL_PKGCONF006)
'$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF006) register $(PKG006) -v0 '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF006) register $(PKG006) -v0
# #
echo ":q" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-conf $(LOCAL_PKGCONF006) -package test echo ":q" | "$(TEST_HC)" --interactive -ignore-dot-ghci -v0 -package-db $(LOCAL_PKGCONF006) -package test
...@@ -13,7 +13,7 @@ plugins01: ...@@ -13,7 +13,7 @@ plugins01:
# Suggestions to make this better gratefully recieved. # Suggestions to make this better gratefully recieved.
(cd simple-plugin; make package) (cd simple-plugin; make package)
$(RM) plugins01.hi plugins01.o $(RM) plugins01.hi plugins01.o
"$(TEST_HC)" $(HC_OPTS) --make -v0 plugins01.hs -package-conf simple-plugin/local.package.conf -fplugin Simple.Plugin -fplugin-opt Simple.Plugin:Irrelevant_Option -package simple-plugin "$(TEST_HC)" $(HC_OPTS) --make -v0 plugins01.hs -package-db simple-plugin/local.package.conf -fplugin Simple.Plugin -fplugin-opt Simple.Plugin:Irrelevant_Option -package simple-plugin
./plugins01 ./plugins01
clean: clean:
......
...@@ -6,8 +6,8 @@ setTestOpts(f) ...@@ -6,8 +6,8 @@ setTestOpts(f)
setTestOpts(compose(alone, if_compiler_lt('ghc', '7.1', skip))) setTestOpts(compose(alone, if_compiler_lt('ghc', '7.1', skip)))
test('plugins01', normal, run_command, ['$MAKE -s --no-print-directory plugins01']) test('plugins01', normal, run_command, ['$MAKE -s --no-print-directory plugins01'])
test('plugins02', normal, compile_fail, ['-package-conf simple-plugin/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin']) test('plugins02', normal, compile_fail, ['-package-db simple-plugin/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin'])
test('plugins03', normal, compile_fail, ['-package-conf simple-plugin/local.package.conf -fplugin Simple.NonExistantPlugin -package simple-plugin']) test('plugins03', normal, compile_fail, ['-package-db simple-plugin/local.package.conf -fplugin Simple.NonExistantPlugin -package simple-plugin'])
test('plugins04', extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']), multimod_compile_fail, ['plugins04', '-package ghc -fplugin HomePackagePlugin']) test('plugins04', extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']), multimod_compile_fail, ['plugins04', '-package ghc -fplugin HomePackagePlugin'])
test('plugins05', test('plugins05',
......
...@@ -16,7 +16,7 @@ include $(TOP)/mk/test.mk ...@@ -16,7 +16,7 @@ include $(TOP)/mk/test.mk
# using the supplied Cabal configuration. # using the supplied Cabal configuration.
LOCAL_PKGCONF=local.package.conf LOCAL_PKGCONF=local.package.conf
LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF) LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF)
rn.prog006: rn.prog006:
rm -f A.hi A.o B/C.hi B/C.o Main.hi Main.o pkg.conf rm -f A.hi A.o B/C.hi B/C.o Main.hi Main.o pkg.conf
...@@ -31,9 +31,9 @@ rn.prog006: ...@@ -31,9 +31,9 @@ rn.prog006:
echo "exposed-modules: B.C" >>pkg.conf echo "exposed-modules: B.C" >>pkg.conf
echo "[]" >$(LOCAL_PKGCONF) echo "[]" >$(LOCAL_PKGCONF)
$(LOCAL_GHC_PKG) register pkg.conf -v0 $(LOCAL_GHC_PKG) register pkg.conf -v0
'$(TEST_HC)' $(TEST_HC_OPTS) -c -package-conf $(LOCAL_PKGCONF) -package test -fforce-recomp A.hs -i '$(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 # The -i clears the search path, so A.hs will find B.C from package test
-'$(TEST_HC)' $(TEST_HC_OPTS) -c -package-conf $(LOCAL_PKGCONF) -package test -fforce-recomp Main.hs -'$(TEST_HC)' $(TEST_HC_OPTS) -c -package-db $(LOCAL_PKGCONF) -package test -fforce-recomp Main.hs
# No -i when compiling Main, so a from-scratch search would find a home-pkg module B.C # No -i when compiling Main, so a from-scratch search would find a home-pkg module B.C
# However, A.hi remembers that B.C came from package test, so all is ok. # However, A.hi remembers that B.C came from package test, so all is ok.
...@@ -18,7 +18,7 @@ PREFIX := $(abspath install) ...@@ -18,7 +18,7 @@ PREFIX := $(abspath install)
$(eval $(call canonicalise,PREFIX)) $(eval $(call canonicalise,PREFIX))
PKGCONF = local.db PKGCONF = local.db
LGHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f '$(PKGCONF)' LGHC_PKG = '$(GHC_PKG)' --no-user-package-db -f '$(PKGCONF)'
safePkg01: safePkg01:
'$(MAKE)' cleanSafePkg01 '$(MAKE)' cleanSafePkg01
......
...@@ -24,13 +24,13 @@ test('ImpSafe01', normal, compile_fail, ['-fpackage-trust -distrust base']) ...@@ -24,13 +24,13 @@ test('ImpSafe01', normal, compile_fail, ['-fpackage-trust -distrust base'])
# Succeed since we don't enable package trust # Succeed since we don't enable package trust
test('ImpSafe02', normal, compile, ['-distrust base']) test('ImpSafe02', normal, compile, ['-distrust base'])
test('ImpSafeOnly01', [normal, alone], compile, ['-package-conf local.db -trust base']) test('ImpSafeOnly01', [normal, alone], compile, ['-package-db local.db -trust base'])
test('ImpSafeOnly02', [normal, alone], compile, ['-package-conf local.db -trust base -trust safePkg01']) test('ImpSafeOnly02', [normal, alone], compile, ['-package-db local.db -trust base -trust safePkg01'])
# Fail since we enable package trust # Fail since we enable package trust
test('ImpSafeOnly03', [normal, alone], compile_fail, ['-fpackage-trust -package-conf local.db -trust base']) test('ImpSafeOnly03', [normal, alone], compile_fail, ['-fpackage-trust -package-db local.db -trust base'])
# Succeed since we don't enable package trust # Succeed since we don't enable package trust
test('ImpSafeOnly04', [normal, alone], compile, ['-package-conf local.db -trust base']) test('ImpSafeOnly04', [normal, alone], compile, ['-package-db local.db -trust base'])
...@@ -16,15 +16,15 @@ clean: ...@@ -16,15 +16,15 @@ clean:
bug1465: bug1465:
$(MAKE) clean $(MAKE) clean
$(MAKE) prep $(MAKE) prep
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(LOCAL_PKGCONF) -c C.hs || exit 0 '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(LOCAL_PKGCONF) -c C.hs || exit 0
$(MAKE) clean $(MAKE) clean
prep: prep:
echo "[]" >$(LOCAL_PKGCONF) echo "[]" >$(LOCAL_PKGCONF)
$(MAKE) prep.v1 $(MAKE) prep.v1
$(MAKE) prep.v2 $(MAKE) prep.v2
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(LOCAL_PKGCONF) -c -package $(PKG)-1.0 B1.hs '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(LOCAL_PKGCONF) -c -package $(PKG)-1.0 B1.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(LOCAL_PKGCONF) -c -package $(PKG)-2.0 B2.hs '$(TEST_HC)' $(TEST_HC_OPTS) -package-db $(LOCAL_PKGCONF) -c -package $(PKG)-2.0 B2.hs
prep.%: prep.%:
cd $* && '$(TEST_HC)' -v0 --make -o setup Setup.hs cd $* && '$(TEST_HC)' -v0 --make -o setup Setup.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