Commit 5a502c75 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Merge branch 'master' of http://darcs.haskell.org/testsuite

parents accd944a 11e13be0
......@@ -97,7 +97,7 @@ def _reqlib( opts, lib ):
if have_subprocess:
# By preference we use subprocess, as the alternative uses
# /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,
stderr=subprocess.PIPE)
# read from stdout and stderr to avoid blocking due to
......@@ -1672,7 +1672,7 @@ def if_verbose_dump( n, f ):
# Guess flags suitable for the compiler.
def guess_compiler_flags():
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':
return ['-an-nhc-specific-flag']
else:
......
......@@ -27,7 +27,7 @@ CONFIG = $(CONFIGDIR)/$(COMPILER)
# 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-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 =
......
......@@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
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: /'
......@@ -49,7 +49,7 @@ ghcpkg01 :
if $(LOCAL_GHC_PKG01) register test3.pkg; then false; else true; fi
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 :
@rm -rf $(PKGCONF03)
......@@ -67,7 +67,7 @@ ghcpkg03 :
$(LOCAL_GHC_PKG03) update --force test.pkg
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
ghcpkg04 :
......@@ -77,13 +77,13 @@ ghcpkg04 :
$(LOCAL_GHC_PKG04) update --force test5.pkg >/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
'$(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)
PKGCONF05a=local05a.package.conf
PKGCONF05b=local05b.package.conf
LOCAL_GHC_PKG05a = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF05a)
LOCAL_GHC_PKG05b = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF05a) -f $(PKGCONF05b)
LOCAL_GHC_PKG05a = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF05a)
LOCAL_GHC_PKG05b = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONF05a) -f $(PKGCONF05b)
ghcpkg05 :
rm -rf $(PKGCONF05a) $(PKGCONF05b)
......@@ -101,7 +101,7 @@ ghcpkg05 :
# Test for #2330: reject duplicate dependencies
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 :
rm -rf $(PKGCONF06)
......@@ -111,25 +111,25 @@ ghcpkg06 :
$(LOCAL_GHC_PKG06) register --force testdup.pkg
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:
rm -rf $(PKGCONF1750) 1750.hs 1750.o 1750.hi 1750.out
$(LOCAL_GHC_PKG1750) init $(PKGCONF1750)
$(LOCAL_GHC_PKG1750) register --force 1750A.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
# the patch "Change the command-line semantics for query commands" to
# ghc-pkg
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
PKGCONFSHADOW2=localshadow2.package.conf
LOCAL_GHC_PKGSHADOW1 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONFSHADOW1)
LOCAL_GHC_PKGSHADOW2 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONFSHADOW2)
LOCAL_GHC_PKGSHADOW3 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONFSHADOW1) -f $(PKGCONFSHADOW2)
LOCAL_GHC_PKGSHADOW1 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFSHADOW1)
LOCAL_GHC_PKGSHADOW2 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFSHADOW2)
LOCAL_GHC_PKGSHADOW3 = '$(GHC_PKG)' --no-user-package-db -f $(PKGCONFSHADOW1) -f $(PKGCONFSHADOW2)
# Test package shadowing behaviour.
#
......@@ -152,18 +152,18 @@ shadow:
# shadowdep-1-XXX to be unavailable:
#
@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:
#
@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
# specify a package we really want to use:
#
@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:
# of InstalledPackageInfo.
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:
rm -rf $(PACKAGE_CONF_ghcpkg02)
......
......@@ -4,7 +4,7 @@
This funny module was reduced from a failing build of stage2 using
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 version 7.1.20110414 for x86_64-unknown-linux):
......
......@@ -16,7 +16,7 @@ test('dsrun010', normal, compile_and_run, [''])
test('dsrun011', skip_if_fast, compile_and_run, [''])
test('dsrun012', skip_if_fast, compile_and_run, [''])
test('dsrun013', normal, compile_and_run, [''])
test('dsrun014', expect_broken_for(1257, ['ghci']), compile_and_run, [''])
test('dsrun014', normal, compile_and_run, ['-fobject-code'])
test('dsrun015', normal, compile_and_run, [''])
test('dsrun016', normal, compile_and_run, [''])
test('dsrun017', normal, compile_and_run, [''])
......
......@@ -12,10 +12,10 @@ T3007:
$(MAKE) clean
echo '[]' > package.conf
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 register --inplace -v0
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
......@@ -17,7 +17,7 @@ recomp007:
"$(TEST_HC)" -v0 --make Setup.hs
$(MAKE) prep.a1
$(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
cd b && ../Setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
cd b && ../Setup build
......
......@@ -2,7 +2,7 @@ TOP=../../..
include $(TOP)/mk/boilerplate.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
# with dir/libfoo.a
......@@ -63,12 +63,11 @@ ghcilink004 :
echo 'library-dirs: $${pkgroot}' >>$(PKG004)
echo 'extra-libraries: foo' >>$(PKG004)
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
"$(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:
# package P
......@@ -91,11 +90,11 @@ ghcilink005 :
echo 'library-dirs: $${pkgroot}' >>$(PKG005)
echo 'extra-libraries: foo' >>$(PKG005)
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)" -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:
# package P
......@@ -114,7 +113,7 @@ ghcilink006 :
echo "id: test-XXX" >>$(PKG006)
echo "extra-libraries: stdc++" >>$(PKG006)
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
module T6091 where
infixr 4 `foo`
foo :: Int -> Int -> Int
foo x y = x * y
foo :: Int -> Int -> Int -- Defined at T6091.hs:5:1
infixr 4 `foo`
......@@ -126,3 +126,4 @@ test('T5975b',
test('T6027ghci', normal, ghci_script, ['T6027ghci.script'])
test('T6007', normal, ghci_script, ['T6007.script'])
test('T6091', normal, ghci_script, ['T6091.script'])
......@@ -54,7 +54,7 @@ test('3676', expect_broken(3676), compile_and_run, [''])
test('4381', normal, compile_and_run, [''])
test('4383', normal, compile_and_run, [''])
test('add2', normal, compile_and_run, [''])
test('mul2', normal, compile_and_run, [''])
test('quotRem2', normal, compile_and_run, [''])
test('add2', normal, compile_and_run, ['-fobject-code'])
test('mul2', normal, compile_and_run, ['-fobject-code'])
test('quotRem2', normal, compile_and_run, ['-fobject-code'])
test('readRun001', normal, compile_and_run, [''])
test('readRun002', normal, compile_and_run, [''])
test('readRun003', normal, compile_and_run, [''])
test('readRun004', expect_broken_for(1257, ['ghci']), compile_and_run, [''])
test('readRun004', normal, compile_and_run, ['-fobject-code'])
test('T1344', normal, compile_and_run, [''])
test('operator', normal, compile_and_run, [''])
test('operator2', normal, compile_and_run, [''])
......@@ -50,7 +50,9 @@ if config.arch == 'i386':
else:
sse2_opts = ''
test('T4321', omit_ways(['ghci']), compile_and_run, ['-O ' + sse2_opts])
test('T4321',
[omit_ways(['ghci']), expect_broken(4321)],
compile_and_run, ['-O ' + sse2_opts])
test('T3736',
extra_clean(['T3736.speed.f32']),
......
......@@ -13,7 +13,7 @@ plugins01:
# Suggestions to make this better gratefully recieved.
(cd simple-plugin; make package)
$(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
clean:
......
......@@ -6,8 +6,8 @@ setTestOpts(f)
setTestOpts(compose(alone, if_compiler_lt('ghc', '7.1', skip)))
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('plugins03', normal, compile_fail, ['-package-conf simple-plugin/local.package.conf -fplugin Simple.NonExistantPlugin -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-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('plugins05',
......
......@@ -16,7 +16,7 @@ include $(TOP)/mk/test.mk
# using the supplied Cabal configuration.
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:
rm -f A.hi A.o B/C.hi B/C.o Main.hi Main.o pkg.conf
......@@ -31,9 +31,9 @@ rn.prog006:
echo "exposed-modules: B.C" >>pkg.conf
echo "[]" >$(LOCAL_PKGCONF)
$(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
-'$(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
# However, A.hi remembers that B.C came from package test, so all is ok.
......@@ -18,7 +18,7 @@ PREFIX := $(abspath install)
$(eval $(call canonicalise,PREFIX))
PKGCONF = local.db
LGHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f '$(PKGCONF)'
LGHC_PKG = '$(GHC_PKG)' --no-user-package-db -f '$(PKGCONF)'
safePkg01:
'$(MAKE)' cleanSafePkg01
......
......@@ -24,13 +24,13 @@ test('ImpSafe01', normal, compile_fail, ['-fpackage-trust -distrust base'])
# Succeed since we don't enable package trust
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
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
test('ImpSafeOnly04', [normal, alone], compile, ['-package-conf local.db -trust base'])
test('ImpSafeOnly04', [normal, alone], compile, ['-package-db local.db -trust base'])
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