Commit bf6eb679 authored by Ian Lynagh's avatar Ian Lynagh

Tweak some tests: tell make to be quiet rather than ignoring all output

parent edec627c
......@@ -65,13 +65,13 @@ LOCAL_GHC_PKG04 = $(GHC_PKG_INPLACE) -f $(PKGCONF04)
# Test that importing a module exposed by two packages reports a conflict
ghcpkg04 :
@rm -f $(PKGCONF04)
@echo "[]" >$(PKGCONF04)
@$(LOCAL_GHC_PKG04) register --force test.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
rm -f $(PKGCONF04)
echo "[]" >$(PKGCONF04)
$(LOCAL_GHC_PKG04) register --force test.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
@: # testpkg-1.2.3.4 and newtestpkg-2.0 are both exposed now
@$(TEST_HC) -package-conf $(PKGCONF04) -c ghcpkg04.hs || true
$(TEST_HC) -package-conf $(PKGCONF04) -c ghcpkg04.hs || true
PKGCONF1750=local1750.package.conf
LOCAL_GHC_PKG1750 = $(GHC_PKG_INPLACE) -f $(PKGCONF1750)
......
setTestOpts(compose(alone,only_compiler_types(['ghc'])))
test('ghcpkg01',
composes([ignore_output,
extra_clean(['local01.package.conf',
composes([extra_clean(['local01.package.conf',
'local01.package.conf.old']),
skip_if_fast,
if_compiler_lt('ghc', '6.9', skip)]),
run_command, ['$MAKE ghcpkg01'])
run_command,
['$MAKE -s --no-print-directory ghcpkg01'])
clean(['local.package.conf', 'local.package.conf.old'])
test('ghcpkg02', compose(ignore_output, skip_if_fast), run_command, ['$MAKE ghcpkg02'])
test('ghcpkg02', skip_if_fast, run_command,
['$MAKE -s --no-print-directory ghcpkg02'])
clean(['package.conf.copy', 'package.conf.copy.old'])
test('ghcpkg03',
[ignore_output, extra_clean(['local03.package.conf',
'local03.package.conf.old'])],
extra_clean(['local03.package.conf',
'local03.package.conf.old']),
run_command,
['$MAKE ghcpkg03'])
['$MAKE -s --no-print-directory ghcpkg03'])
clean(['local.package.conf', 'local.package.conf.old'])
test('ghcpkg04',
[ignore_output, extra_clean(['local04.package.conf',
'local04.package.conf.old'])],
extra_clean(['local04.package.conf',
'local04.package.conf.old']),
run_command,
['$MAKE --no-print-directory ghcpkg04'])
['$MAKE -s --no-print-directory ghcpkg04'])
clean(['local.package.conf', 'local.package.conf.old'])
# Test that we *can* compile a module that also belongs to a package
......
......@@ -10,7 +10,10 @@ clean:
rm -fr install-tmp
rm -fr install
rm -f .setup-config .installed-pkg-config
-$(GHC_PKG_INPLACE) unregister test
# unregister if pakage 'test' already exists
if $(GHC_PKG_INPLACE) --user list | grep test-; then \
$(GHC_PKG_INPLACE) --user unregister test; \
fi
# We use the global package database as there's no easy way to tell
# ghc-pkg (via Cabal) to use one in ., and the global one at least
......@@ -18,20 +21,19 @@ clean:
cabal01:
$(MAKE) clean
$(TEST_HC) --make -o setup Setup.lhs
# unregister if pakage 'test' already exists
if $(GHC_PKG_INPLACE) --user list | grep test-; then \
$(GHC_PKG_INPLACE) --user unregister test; \
fi
$(TEST_HC) --make -o setup Setup.lhs -v0
./setup configure -v0 --prefix=$(shell $(TOP)/utils/pwd forwardslash)/install --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_INPLACE) $(PROF)
./setup build -v0
./setup copy -v0
ls install
echo install1:
ls -1 install
rm -r install
# install w/ register!
./setup install -v0
ls install
echo install2:
ls -1 install
./setup sdist -v0
echo dist:
ls dist
$(GHC_PKG_INPLACE) unregister test
......@@ -6,7 +6,7 @@ else:
prof = ''
test('cabal01',
ignore_output,
run_command, ['$MAKE cabal01 PROF=' + prof])
normal,
run_command, ['$MAKE -s --no-print-directory cabal01 PROF=' + prof])
if default_testopts.cleanup != '':
runCmd('$MAKE -C ' + in_testdir('') + ' clean')
install1:
bin
lib
Reading package info from "dist/installed-pkg-config" ... done.
Saving old package config file... done.
Writing new package config file... done.
install2:
bin
lib
dist:
build
installed-pkg-config
setup-config
test-1.0.tar.gz
Saving old package config file... done.
Writing new package config file... done.
# cabal-setup isn't in the GHC tree any more; this test should probably
# be moved to the cabal-setup package.
test('cabal02', compose(skip, compose(compose(ignore_output, skip_if_fast), if_platform('i386-unknown-mingw32', expect_broken(1196)))), run_command, ['$MAKE cabal02'])
test('cabal02',
[skip,
skip_if_fast,
if_platform('i386-unknown-mingw32', expect_broken(1196))],
run_command,
['$MAKE -s --no-print-directory cabal02'])
/usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
c:/Program Files/testpkg doesn't exist or isn't a directory (ignoring)
/usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
c:/Program Files/testpkg doesn't exist or isn't a directory (ignoring)
cannot find libtestpkg-1.2.3.4.a on library path (ignoring)
/usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
c:/Program Files/testpkg doesn't exist or isn't a directory (ignoring)
/usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
c:/Program Files/testpkg doesn't exist or isn't a directory (ignoring)
cannot find libtestpkg-2.0.a on library path (ignoring)
/usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
c:/Program Files/testpkg doesn't exist or isn't a directory (ignoring)
/usr/local/lib/testpkg doesn't exist or isn't a directory (ignoring)
c:/Program Files/testpkg doesn't exist or isn't a directory (ignoring)
cannot find libtestpkg-1.2.3.4.a on library path (ignoring)
Reading package info from "test.pkg" ... done.
Saving old package config file... done.
Writing new package config file... done.
Reading package info from "test2.pkg" ... done.
Saving old package config file... done.
Writing new package config file... done.
Reading package info from "test4.pkg" ... done.
Saving old package config file... done.
Writing new package config file... done.
Reading package info from "test4.pkg" ... done.
Saving old package config file... done.
Writing new package config file... done.
Reading package info from "test.pkg" ... done.
Saving old package config file... done.
Writing new package config file... done.
......@@ -15,4 +15,3 @@ hidden-modules: B, "C.D"
import-dirs: /usr/local/lib/testpkg, "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg, "c:/Program Files/testpkg"
hs-libraries: testpkg-1.2.3.4
depends: base, haskell-src, Cabal, "haskell98"
......@@ -15,4 +15,3 @@ hidden-modules: B, "C.D", "C.E"
import-dirs: /usr/local/lib/testpkg, "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg, "c:/Program Files/testpkg"
hs-libraries: testpkg-2.0
depends: base, haskell-src, Cabal
......@@ -15,4 +15,3 @@ hidden-modules:
import-dirs:
library-dirs:
hs-libraries:
depends: base, Cabal, testpkg-2.0
......@@ -15,4 +15,3 @@ hidden-modules:
import-dirs:
library-dirs:
hs-libraries:
depends: base, Cabal, testpkg-2.0
......@@ -15,4 +15,3 @@ hidden-modules: B, "C.D", "C.E"
import-dirs: /usr/local/lib/testpkg, "c:/Program Files/testpkg"
library-dirs: /usr/local/lib/testpkg, "c:/Program Files/testpkg"
hs-libraries: testpkg-2.0
depends: base, haskell-src, Cabal
{-# LANGUAGE ForeignFunctionInterface #-}
module TestStub018 where
foreign export ccall f :: Int -> Int
f :: Int -> Int
f n = n + 1
This diff is collapsed.
......@@ -15,110 +15,164 @@ def cleanall():
rawSystem(['rm', '-rf', in_testdir('obj')])
rawSystem(['rm', '-rf', in_testdir('stub')])
test('driver011', ignore_output, run_command, ['$MAKE test011'])
test('driver011', normal, run_command,
['$MAKE -s --no-print-directory test011'])
cleanall()
test('driver012', ignore_output, run_command, ['$MAKE test012'])
test('driver012', normal, run_command,
['$MAKE -s --no-print-directory test012'])
cleanall()
test('driver013', ignore_output, run_command, ['$MAKE test013'])
test('driver013', normal, run_command,
['$MAKE -s --no-print-directory test013'])
cleanall()
test('driver014', ignore_output, run_command, ['$MAKE test014'])
test('driver014', extra_clean(['A014.hi', 'obj014/A014.o', 'obj014']),
run_command,
['$MAKE -s --no-print-directory test014'])
test('driver015', extra_clean(['A015.o', 'hi015/A015.hi', 'hi015']),
run_command,
['$MAKE -s --no-print-directory test015'])
test('driver016', normal, run_command,
['$MAKE -s --no-print-directory test016'])
cleanall()
test('driver015', ignore_output, run_command, ['$MAKE test015'])
test('driver017', normal, run_command,
['$MAKE -s --no-print-directory test017'])
cleanall()
test('driver016', ignore_output, run_command, ['$MAKE test016'])
test('driver018',
extra_clean(['F018.hi', 'F018_stub.c', 'F018_stub.h',
'obj018/TestStub018.o', 'obj018/TestStub018_stub.o',
'obj018']),
run_command,
['$MAKE -s --no-print-directory test018'])
test('driver021', normal, run_command,
['$MAKE -s --no-print-directory test021'])
cleanall()
test('driver017', ignore_output, run_command, ['$MAKE test017'])
test('driver022', normal, run_command,
['$MAKE -s --no-print-directory test022'])
cleanall()
test('driver018', ignore_output, run_command, ['$MAKE test018'])
test('driver023', normal, run_command,
['$MAKE -s --no-print-directory test023'])
cleanall()
test('driver021', ignore_output, run_command, ['$MAKE test021'])
test('driver024',
extra_clean(['obj024/B/C024.o', 'obj024/B', 'obj024']),
run_command,
['$MAKE -s --no-print-directory test024'])
test('driver024a', normal, run_command,
['$MAKE -s --no-print-directory test024a'])
cleanall()
test('driver022', ignore_output, run_command, ['$MAKE test022'])
test('driver025', normal, run_command,
['$MAKE -s --no-print-directory test025'])
cleanall()
test('driver023', ignore_output, run_command, ['$MAKE test023'])
test('driver026', normal, run_command,
['$MAKE -s --no-print-directory test026'])
cleanall()
test('driver024', ignore_output, run_command, ['$MAKE test024'])
test('driver027', normal, run_command,
['$MAKE -s --no-print-directory test027'])
cleanall()
test('driver024a', ignore_output, run_command, ['$MAKE test024a'])
test('driver028', normal, run_command,
['$MAKE -s --no-print-directory test028'])
cleanall()
test('driver025', ignore_output, run_command, ['$MAKE test025'])
test('driver031', normal, run_command,
['$MAKE -s --no-print-directory test031'])
cleanall()
test('driver026', ignore_output, run_command, ['$MAKE test026'])
test('driver032', normal, run_command,
['$MAKE -s --no-print-directory test032'])
cleanall()
test('driver027', ignore_output, run_command, ['$MAKE test027'])
test('driver033', normal, run_command,
['$MAKE -s --no-print-directory test033'])
cleanall()
test('driver028', ignore_output, run_command, ['$MAKE test028'])
test('driver034', normal, run_command,
['$MAKE -s --no-print-directory test034'])
cleanall()
test('driver031', ignore_output, run_command, ['$MAKE test031'])
test('driver035', normal, run_command,
['$MAKE -s --no-print-directory test035'])
cleanall()
test('driver032', ignore_output, run_command, ['$MAKE test032'])
test('driver041', normal, run_command,
['$MAKE -s --no-print-directory test041'])
cleanall()
test('driver033', ignore_output, run_command, ['$MAKE test033'])
test('driver042', normal, run_command,
['$MAKE -s --no-print-directory test042'])
cleanall()
test('driver034', ignore_output, run_command, ['$MAKE test034'])
test('driver043', normal, run_command,
['$MAKE -s --no-print-directory test043'])
cleanall()
test('driver035', ignore_output, run_command, ['$MAKE test035'])
test('driver044', normal, run_command,
['$MAKE -s --no-print-directory test044'])
cleanall()
test('driver041', ignore_output, run_command, ['$MAKE test041'])
test('driver045', normal, run_command,
['$MAKE -s --no-print-directory test045'])
cleanall()
test('driver042', ignore_output, run_command, ['$MAKE test042'])
test('driver051', normal, run_command,
['$MAKE -s --no-print-directory test051'])
cleanall()
test('driver043', ignore_output, run_command, ['$MAKE test043'])
test('driver052', normal, run_command,
['$MAKE -s --no-print-directory test052'])
cleanall()
test('driver044', ignore_output, run_command, ['$MAKE test044'])
cleanall()
test('driver045', ignore_output, run_command, ['$MAKE test045'])
cleanall()
test('driver051', ignore_output, run_command, ['$MAKE test051'])
cleanall()
test('driver052', ignore_output, run_command, ['$MAKE test052'])
cleanall()
test('driver053', ignore_output, run_command, ['$MAKE test053'])
test('driver053', normal, run_command,
['$MAKE -s --no-print-directory test053'])
cleanall()
test('driver060', ignore_output, run_command, ['$MAKE test060'])
test('driver060', normal, run_command,
['$MAKE -s --no-print-directory test060'])
cleanall()
test('driver061', ignore_output, run_command, ['$MAKE test061'])
test('driver061', normal, run_command,
['$MAKE -s --no-print-directory test061'])
cleanall()
test('driver061a.1', ignore_output, run_command, ['$MAKE test061a.1'])
test('driver061a.1', normal, run_command,
['$MAKE -s --no-print-directory test061a.1'])
cleanall()
test('driver061a.2', ignore_output, run_command, ['$MAKE test061a.2'])
test('driver061a.2', normal, run_command,
['$MAKE -s --no-print-directory test061a.2'])
cleanall()
test('driver062.1', ignore_output, run_command, ['$MAKE test062.1'])
test('driver062.1', normal, run_command,
['$MAKE -s --no-print-directory test062.1'])
cleanall()
test('driver062.2', ignore_output, run_command, ['$MAKE test062.2'])
test('driver062.2', normal, run_command,
['$MAKE -s --no-print-directory test062.2'])
cleanall()
test('driver062.3', ignore_output, run_command, ['$MAKE test062.3'])
test('driver062.3', normal, run_command,
['$MAKE -s --no-print-directory test062.3'])
cleanall()
test('driver062.4', ignore_output, run_command, ['$MAKE test062.4'])
test('driver062.4', normal, run_command,
['$MAKE -s --no-print-directory test062.4'])
cleanall()
test('driver062.5', ignore_output, run_command, ['$MAKE test062.5'])
test('driver062.5', normal, run_command,
['$MAKE -s --no-print-directory test062.5'])
cleanall()
test('driver063', normal, run_command, ['$MAKE -s --no-print-directory test063'])
test('driver063', normal, run_command,
['$MAKE -s --no-print-directory test063'])
cleanall()
test('driver064', ignore_output, run_command, ['$MAKE test064'])
test('driver064', normal, run_command,
['$MAKE -s --no-print-directory test064'])
cleanall()
test('driver065', ignore_output, run_command, ['$MAKE test065'])
test('driver065', normal, run_command,
['$MAKE -s --no-print-directory test065'])
cleanall()
test('driver066', ignore_output, run_command, ['$MAKE test066'])
test('driver066', normal, run_command,
['$MAKE -s --no-print-directory test066'])
cleanall()
test('driver067', ignore_output, run_command, ['$MAKE test067'])
test('driver067', normal, run_command,
['$MAKE -s --no-print-directory test067'])
cleanall()
test('driver068', ignore_output, run_command, ['$MAKE test068'])
test('driver068', normal, run_command,
['$MAKE -s --no-print-directory test068'])
cleanall()
test('driver069', ignore_output, run_command, ['$MAKE test069'])
test('driver069', normal, run_command,
['$MAKE -s --no-print-directory test069'])
cleanall()
test('driver070', ignore_output, run_command, ['$MAKE test070'])
test('driver070', normal, run_command,
['$MAKE -s --no-print-directory test070'])
cleanall()
test('driver071', ignore_output, run_command, ['$MAKE test071'])
test('driver071', normal, run_command,
['$MAKE -s --no-print-directory test071'])
cleanall()
test('driver080', ignore_output, run_command, ['$MAKE test080'])
test('driver080', normal, run_command,
['$MAKE -s --no-print-directory test080'])
cleanall()
test('driver200', ignore_output, run_command, ['$MAKE test200'])
test('driver200', normal, run_command,
['$MAKE -s --no-print-directory test200'])
cleanall()
test('pragma001', expect_broken(1736), compile, [''])
......
......@@ -19,7 +19,7 @@ test('gadt14', normal, compile, [''])
test('gadt15', normal, compile, [''])
test('gadt16', normal, compile, [''])
test('gadt17', ignore_output, run_command, ['$MAKE gadt17'])
test('gadt17', normal, run_command, ['$MAKE -s --no-print-directory gadt17'])
clean(['Gadt17_help.hi', 'Gadt17_help.o'])
test('gadt18', normal, compile, [''])
......
......@@ -8,4 +8,4 @@ ghciprog004:
@rm -f ctest.o
echo "int foo(){}" >ctest.c
$(CC) -g -c ctest.c
echo ":q" | $(TEST_HC) --interactive ctest.o
echo ":q" | $(TEST_HC) -v0 --interactive ctest.o
......@@ -5,5 +5,8 @@ def f(opts):
opts.skip = 1
setTestOpts(f)
test('ghciprog004', ignore_output, run_command, ['$MAKE ghciprog004'])
test('ghciprog004',
normal,
run_command,
['$MAKE -s --no-print-directory ghciprog004'])
clean(['ctest.c', 'ctest.o'])
......@@ -41,7 +41,7 @@ test('Records', normal, compile, [''])
# The point about this test is that it compiles NewTyCo1 and NewTyCo2
# *separately*
#
test('NewTyCo', ignore_output, run_command, ['$MAKE NewTyCo'])
test('NewTyCo', normal, run_command, ['$MAKE -s --no-print-directory NewTyCo'])
clean(['NewTyCo1.o', 'NewTyCo1.hi', 'NewTyCo2.o', 'NewTyCo2.hi'])
test('Infix', normal, compile, [''])
......
......@@ -6,4 +6,4 @@ include $(TOP)/mk/test.mk
$(TEST_HC) -fforce-recomp -c A.hs-boot
$(TEST_HC) -fforce-recomp -c A.hs
$(TEST_HC) -fforce-recomp -c B.hs
$(TEST_HC) -fforce-recomp -c C.hs
$(TEST_HC) -fforce-recomp -c C.hs -v0
test('2014', [ ignore_output,
extra_clean(['A.hi-boot','A.hi','A.o','A.o-boot',
'B.hi', 'B.o', 'C.hi', 'C.o']) ],
run_command, ['$MAKE 2014'])
test('2014',
extra_clean(['A.hi-boot','A.hi','A.o','A.o-boot',
'B.hi', 'B.o', 'C.hi', 'C.o']),
run_command,
['$MAKE -s --no-print-directory 2014'])
......@@ -183,7 +183,7 @@ test('tc171', normal, compile, [''])
test('tc172', normal, compile, [''])
# The point about this test is that it compiles Tc173a and Tc173b *separately*
test('tc173', ignore_output, run_command, ['$MAKE tc173'])
test('tc173', normal, run_command, ['$MAKE -s --no-print-directory tc173'])
clean(['Tc173a.hi', 'Tc173a.o', 'Tc173b.hi', 'Tc173b.o'])
test('tc174', only_compiler_types(['ghc']), compile, [''])
......
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