Commit 126c7984 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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

parents 4f093d68 45475f0b
......@@ -35,6 +35,9 @@ if (ghc_with_native_codegen == 1):
config.compile_ways.append('optasm')
config.run_ways.append('optasm')
if (ghc_with_vanilla == 1):
config.have_vanilla = True
if (ghc_with_profiling == 1):
config.have_profiling = True
config.compile_ways.append('profasm')
......
......@@ -78,6 +78,9 @@ class TestConfig:
self.way_flags = {}
self.way_rts_flags = {}
# Do we have vanilla libraries?
self.have_vanilla = False
# Do we have profiling support?
self.have_profiling = False
......
......@@ -46,8 +46,15 @@ RUNTEST_OPTS += -e ghc_with_native_codegen=0
endif
HASKELL98_LIBDIR := $(shell "$(GHC_PKG)" field haskell98 library-dirs | sed 's/^[^:]*: *//')
HAVE_VANILLA := $(shell if [ -f $(subst \,/,$(HASKELL98_LIBDIR))/libHShaskell98-*.a ]; then echo YES; else echo NO; fi)
HAVE_PROFILING := $(shell if [ -f $(subst \,/,$(HASKELL98_LIBDIR))/libHShaskell98-*_p.a ]; then echo YES; else echo NO; fi)
ifeq "$(HAVE_VANILLA)" "YES"
RUNTEST_OPTS += -e ghc_with_vanilla=1
else
RUNTEST_OPTS += -e ghc_with_vanilla=0
endif
ifeq "$(HAVE_PROFILING)" "YES"
RUNTEST_OPTS += -e ghc_with_profiling=1
else
......@@ -82,8 +89,10 @@ endif
ifeq "$(GhcDynamicByDefault)" "YES"
RUNTEST_OPTS += -e ghc_dynamic_by_default=True
CABAL_MINIMAL_BUILD = --enable-shared --disable-library-vanilla
else
RUNTEST_OPTS += -e ghc_dynamic_by_default=False
CABAL_MINIMAL_BUILD = --enable-library-vanilla --disable-shared
endif
ifeq "$(GhcWithSMP)" "YES"
......
......@@ -28,7 +28,7 @@ cabal01:
# we get a warning if dynlibs are enabled by default that:
# Warning: -rtsopts and -with-rtsopts have no effect with -shared.
# so we filter the flag out
./setup configure -v0 --prefix=$(PREFIX) --with-compiler='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' --with-hc-pkg='$(GHC_PKG)' --package-db=local.db $(PROF)
./setup configure -v0 --prefix=$(PREFIX) --with-compiler='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' --with-hc-pkg='$(GHC_PKG)' --package-db=local.db $(VANILLA) $(PROF) $(DYN)
./setup build -v0
./setup copy -v0
echo install1:
......
setTestOpts(only_compiler_types(['ghc']))
if config.have_vanilla:
vanilla = '--enable-library-vanilla'
else:
vanilla = '--disable-library-vanilla'
if config.have_profiling:
prof = '--enable-library-profiling'
else:
prof = ''
prof = '--disable-library-profiling'
if config.have_shared_libs:
dyn = '--enable-shared'
else:
dyn = '--disable-shared'
if default_testopts.cleanup != '':
cleanup = 'CLEANUP=1'
......@@ -13,4 +23,4 @@ else:
test('cabal01',
normal,
run_command,
['$MAKE -s --no-print-directory cabal01 PROF=' + prof + ' ' + cleanup])
['$MAKE -s --no-print-directory cabal01 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup])
......@@ -20,17 +20,17 @@ cabal03: clean
'$(GHC_PKG)' init tmp.d
'$(TEST_HC)' -v0 --make Setup
cd p && $(SETUP) clean
cd p && $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --disable-optimisation --ghc-pkg-option=--force
cd p && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --disable-optimisation --ghc-pkg-option=--force
cd p && $(SETUP) build
cd p && $(SETUP) register
cd q && $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd q && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd q && $(SETUP) build
cd q && $(SETUP) register
cd p && $(SETUP) clean
cd p && $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd p && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd p && $(SETUP) build
cd p && $(SETUP) register
cd r && ! ../Setup configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd r && ! ../Setup configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
ifneq "$(CLEANUP)" ""
$(MAKE) clean
endif
......
......@@ -14,7 +14,7 @@ cabal04:
$(MAKE) clean
'$(TEST_HC)' -v0 --make Setup
$(SETUP) clean
$(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' $(PROF) $(DYN)
$(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS))' $(VANILLA) $(PROF) $(DYN)
$(SETUP) build 2> err
! grep -v "Creating library file" err
ifneq "$(CLEANUP)" ""
......
setTestOpts(only_compiler_types(['ghc']))
if config.have_vanilla:
vanilla = '--enable-library-vanilla'
else:
vanilla = '--disable-library-vanilla'
if config.have_profiling:
prof = '--enable-library-profiling'
else:
prof = ''
prof = '--disable-library-profiling'
if config.have_shared_libs:
dyn = '--enable-shared'
else:
dyn = ''
dyn = '--disable-shared'
if default_testopts.cleanup != '':
cleanup = 'CLEANUP=1'
......@@ -18,4 +23,4 @@ else:
test('cabal04',
normal,
run_command,
['$MAKE -s --no-print-directory cabal04 PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup])
['$MAKE -s --no-print-directory cabal04 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup])
......@@ -4,28 +4,28 @@ testpkg-1.2.3.4: import-dirs: /usr/local/lib/testpkg doesn't exist or isn't a di
testpkg-1.2.3.4: import-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-1.2.3.4: library-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-1.2.3.4: include-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-1.2.3.4: file A.hi is missing (ignoring)
testpkg-1.2.3.4: file B.hi is missing (ignoring)
testpkg-1.2.3.4: file C/D.hi is missing (ignoring)
testpkg-1.2.3.4: cannot find libtestpkg-1.2.3.4.a on library path (ignoring)
testpkg-1.2.3.4: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4.a","libtestpkg-1.2.3.4.p_a","libtestpkg-1.2.3.4-ghc7.7.20121025.so","libtestpkg-1.2.3.4-ghc7.7.20121025.dylib","testpkg-1.2.3.4-ghc7.7.20121025.dll"] on library path (ignoring)
testpkg-2.0: Warning: library-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory
testpkg-2.0: Warning: include-dirs: /usr/local/include/testpkg doesn't exist or isn't a directory
testpkg-2.0: import-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
testpkg-2.0: import-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-2.0: library-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-2.0: include-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-2.0: file A.hi is missing (ignoring)
testpkg-2.0: file B.hi is missing (ignoring)
testpkg-2.0: file C/D.hi is missing (ignoring)
testpkg-2.0: file C/E.hi is missing (ignoring)
testpkg-2.0: cannot find libtestpkg-2.0.a on library path (ignoring)
testpkg-2.0: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["C/E.hi","C/E.p_hi","C/E.dyn_hi"] (ignoring)
testpkg-2.0: cannot find any of ["libtestpkg-2.0.a","libtestpkg-2.0.p_a","libtestpkg-2.0-ghc7.7.20121025.so","libtestpkg-2.0-ghc7.7.20121025.dylib","testpkg-2.0-ghc7.7.20121025.dll"] on library path (ignoring)
testpkg-1.2.3.4: Warning: library-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory
testpkg-1.2.3.4: Warning: include-dirs: /usr/local/include/testpkg doesn't exist or isn't a directory
testpkg-1.2.3.4: import-dirs: /usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
testpkg-1.2.3.4: import-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-1.2.3.4: library-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-1.2.3.4: include-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}. (ignoring)
testpkg-1.2.3.4: file A.hi is missing (ignoring)
testpkg-1.2.3.4: file B.hi is missing (ignoring)
testpkg-1.2.3.4: file C/D.hi is missing (ignoring)
testpkg-1.2.3.4: cannot find libtestpkg-1.2.3.4.a on library path (ignoring)
testpkg-1.2.3.4: cannot find any of ["A.hi","A.p_hi","A.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["B.hi","B.p_hi","B.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"] (ignoring)
testpkg-1.2.3.4: cannot find any of ["libtestpkg-1.2.3.4.a","libtestpkg-1.2.3.4.p_a","libtestpkg-1.2.3.4-ghc7.7.20121025.so","libtestpkg-1.2.3.4-ghc7.7.20121025.dylib","testpkg-1.2.3.4-ghc7.7.20121025.dll"] on library path (ignoring)
......@@ -5,11 +5,11 @@ There are problems in package testpkg-2.0:
import-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}.
library-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}.
include-dirs: c:/Program Files/testpkg is a relative path which makes no sense (as there is nothing for it to be relative to). You can make paths relative to the package database itself by using ${pkgroot}.
file A.hi is missing
file B.hi is missing
file C/D.hi is missing
file C/E.hi is missing
cannot find libtestpkg-2.0.a on library path
cannot find any of ["A.hi","A.p_hi","A.dyn_hi"]
cannot find any of ["B.hi","B.p_hi","B.dyn_hi"]
cannot find any of ["C/D.hi","C/D.p_hi","C/D.dyn_hi"]
cannot find any of ["C/E.hi","C/E.p_hi","C/E.dyn_hi"]
cannot find any of ["libtestpkg-2.0.a","libtestpkg-2.0.p_a","libtestpkg-2.0-ghc7.7.20121025.so","libtestpkg-2.0-ghc7.7.20121025.dylib","testpkg-2.0-ghc7.7.20121025.dll"] on library path
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
......
......@@ -35,7 +35,7 @@ prep:
prep.%:
cd $* && "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -o setup Setup.hs
cd $* && ./setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
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
......@@ -30,22 +30,11 @@ check title expected got
showProblems "Missing flags" missing
expectedGhcOnlyExtensions :: [String]
expectedGhcOnlyExtensions = ["ParallelArrays",
expectedGhcOnlyExtensions = [
"RelaxedLayout",
"DeriveGeneric",
"DefaultSignatures",
"InterruptibleFFI",
"AlternativeLayoutRule",
"AlternativeLayoutRuleTransitional",
"MonadComprehensions",
"TraditionalRecordSyntax",
"DataKinds",
"PolyKinds",
"ExplicitNamespaces",
"InstanceSigs",
"CApiFFI",
"LambdaCase",
"MultiWayIf",
"TypeHoles"]
expectedCabalOnlyExtensions :: [String]
......@@ -58,5 +47,6 @@ expectedCabalOnlyExtensions = ["Generics",
"RegularPatterns",
"SafeImports",
"Safe",
"Unsafe",
"Trustworthy"]
import Data.Int
import Data.Word
main = do
print [5 `div` (minBound+k::Int) | k <- [0 .. 10]]
print [5 `div` (minBound+k::Int8) | k <- [0 .. 10]]
print [5 `div` (minBound+k::Int16) | k <- [0 .. 10]]
print [5 `div` (minBound+k::Int32) | k <- [0 .. 10]]
print [5 `div` (minBound+k::Int64) | k <- [0 .. 10]]
print [5 `quot` (minBound+k::Int) | k <- [0 .. 10]]
print [5 `quot` (minBound+k::Int8) | k <- [0 .. 10]]
print [5 `quot` (minBound+k::Int16) | k <- [0 .. 10]]
print [5 `quot` (minBound+k::Int32) | k <- [0 .. 10]]
print [5 `quot` (minBound+k::Int64) | k <- [0 .. 10]]
[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
[0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,0,0,0,0,0,0]
[0,0,0,0,0,0,0,0,0,0,0]
......@@ -63,3 +63,5 @@ test('T7014',
extra_clean(['T7014.simpl']),
run_command,
['$MAKE -s --no-print-directory T7014'])
test('T7233', normal, compile_and_run, [''])
......@@ -20,6 +20,6 @@ package:
echo "[]" >$(LOCAL_PKGCONF)
./setup configure -v0 --prefix="$(PREFIX)" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=$(LOCAL_PKGCONF)
./setup configure $(CABAL_MINIMAL_BUILD) -v0 --prefix="$(PREFIX)" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=$(LOCAL_PKGCONF)
./setup build -v0
./setup install -v0
......@@ -18,11 +18,17 @@ include $(TOP)/mk/test.mk
LOCAL_PKGCONF=local.package.conf
LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-db -f $(LOCAL_PKGCONF)
ifeq "$(GhcDynamicByDefault)" "YES"
RM_PROG006_EXTRA_FLAGS = -hisuf dyn_hi -osuf dyn_o
endif
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
rm -f A.dyn_hi A.dyn_o B/C.dyn_hi B/C.dyn_o Main.dyn_hi Main.dyn_o
rm -f pkg.conf
rm -f pwd pwd.exe pwd.exe.manifest pwd.hi pwd.o
'$(TEST_HC)' $(TEST_HC_OPTS) --make pwd -v0
'$(TEST_HC)' $(TEST_HC_OPTS) --make -package-name test-1.0 B.C -fforce-recomp -v0
'$(TEST_HC)' $(TEST_HC_OPTS) --make -package-name test-1.0 B.C -fforce-recomp -v0 $(RM_PROG006_EXTRA_FLAGS)
rm -f pkg.conf
echo "name: test" >>pkg.conf
echo "version: 1.0" >>pkg.conf
......
......@@ -20,6 +20,12 @@ $(eval $(call canonicalise,PREFIX))
PKGCONF = local.db
LGHC_PKG = '$(GHC_PKG)' --no-user-package-db -f '$(PKGCONF)'
ifeq "$(GhcDynamicByDefault)" "YES"
HI_SUF = dyn_hi
else
HI_SUF = hi
endif
safePkg01:
'$(MAKE)' cleanSafePkg01
'$(TEST_HC)' --make -o setup Setup.hs -v0
......@@ -29,7 +35,7 @@ safePkg01:
# we get a warning if dynlibs are enabled by default that:
# Warning: -rtsopts and -with-rtsopts have no effect with -shared.
# so we filter the flag out
./setup configure -v0 --prefix='$(PREFIX)' --with-compiler='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS)) -fpackage-trust -trust base -trust bytestring' --with-hc-pkg='$(GHC_PKG)' --package-db='$(PKGCONF)' $(PROF)
./setup configure -v0 --prefix='$(PREFIX)' --with-compiler='$(TEST_HC)' --ghc-options='$(filter-out -rtsopts,$(TEST_HC_OPTS)) -fpackage-trust -trust base -trust bytestring' --with-hc-pkg='$(GHC_PKG)' --package-db='$(PKGCONF)' $(VANILLA) $(PROF) $(DYN)
./setup build -v0
./setup copy -v0
./setup register --inplace -v0
......@@ -37,28 +43,28 @@ safePkg01:
$(LGHC_PKG) field safePkg01-1.0 trusted
echo
echo 'M_SafePkg'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg2'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg2.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg2.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg3'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg3.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg3.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg4'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg4.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg4.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg5'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg5.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg5.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg6'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg6.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg6.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg7'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg7.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg7.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'M_SafePkg8'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg8.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
'$(TEST_HC)' --show-iface dist/build/M_SafePkg8.$(HI_SUF) | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
echo
echo 'Testing setting trust'
$(LGHC_PKG) trust safePkg01-1.0
......
......@@ -4,10 +4,20 @@ def f( opts ):
setTestOpts(f)
if config.have_vanilla:
vanilla = '--enable-library-vanilla'
else:
vanilla = '--disable-library-vanilla'
if config.have_profiling:
prof = '--enable-library-profiling'
else:
prof = ''
prof = '--disable-library-profiling'
if config.have_shared_libs:
dyn = '--enable-shared'
else:
dyn = '--disable-shared'
# Test building a package, that trust values are set correctly
# and can be changed correctly
......@@ -16,7 +26,7 @@ test('safePkg01',
# clean_cmd('$MAKE -s --no-print-directory cleanSafePkg01'),
alone],
run_command,
['$MAKE -s --no-print-directory safePkg01 PROF=' + prof])
['$MAKE -s --no-print-directory safePkg01 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn])
# Fail since we enable package trust
test('ImpSafe01', normal, compile_fail, ['-fpackage-trust -distrust base'])
......
......@@ -28,6 +28,6 @@ prep:
prep.%:
cd $* && '$(TEST_HC)' -v0 --make -o setup Setup.hs
cd $* && ./setup configure -v0 --with-compiler='$(TEST_HC)' --with-ghc-pkg='$(GHC_PKG)' --package-db ../$(LOCAL_PKGCONF)
cd $* && ./setup configure $(CABAL_MINIMAL_BUILD) -v0 --with-compiler='$(TEST_HC)' --with-ghc-pkg='$(GHC_PKG)' --package-db ../$(LOCAL_PKGCONF)
cd $* && ./setup build -v0
cd $* && ./setup register -v0 --inplace
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