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
......@@ -18,120 +18,121 @@ OBJSUFFIX = .o
# One-shot compilations, non-hierarchical modules
test011:
@$(RM) A.hi
@$(RM) A$(OBJSUFFIX)
$(RM) A.hi
$(RM) A$(OBJSUFFIX)
$(TEST_HC) -c A.hs
test -f A.hi
test -f A$(OBJSUFFIX)
# test -o
test012:
@$(RM) A.hi
@$(RM) A$(OBJSUFFIX)oo
$(RM) A.hi
$(RM) A$(OBJSUFFIX)oo
$(TEST_HC) -c A.hs -o A$(OBJSUFFIX)oo
test -f A$(OBJSUFFIX)oo
# test -ohi
test013:
@$(RM) A.xhi
@$(RM) A$(OBJSUFFIX)
$(RM) A.xhi
$(RM) A$(OBJSUFFIX)
$(TEST_HC) -c A.hs -ohi A.xhi
test -f A.xhi
# test -odir
test014:
@$(RM) A.hi
@$(RM) obj/A$(OBJSUFFIX)
@$(MKDIRHIER) obj
$(TEST_HC) -c A.hs -odir obj
test -f obj/A$(OBJSUFFIX)
$(RM) -f A014.hi
$(RM) -rf obj014
$(MKDIRHIER) -q obj014
$(TEST_HC) -c A014.hs -odir obj014
test -f obj014/A014$(OBJSUFFIX)
test -f A014.hi
# test -hidir
test015:
@$(RM) hi/A.hi
@$(RM) A$(OBJSUFFIX)
@$(MKDIRHIER) hi
$(TEST_HC) -c A.hs -hidir hi
test -f hi/A.hi
$(RM) -f A015$(OBJSUFFIX)
$(RM) -rf hi015
$(MKDIRHIER) -q hi015
$(TEST_HC) -c A015.hs -hidir hi015
test -f A015$(OBJSUFFIX)
test -f hi015/A015.hi
# test stub generation
test016:
@$(RM) F.hi F$(OBJSUFFIX) F_stub.c F_stub.h
@$(TEST_HC) -c F.hs
$(RM) F.hi F$(OBJSUFFIX) F_stub.c F_stub.h
$(TEST_HC) -c F.hs
test -f F_stub$(OBJSUFFIX)
test -f F_stub.c
test -f F_stub.h
# test -stubdir (filename differs from module name)
test017:
@$(RM) F.hi F$(OBJSUFFIX) stub/TestStub_stub.c stub/TestStub_stub.h stub/TestStub_stub$(OBJSUFFIX) F_stub$(OBJSUFFIX)
@$(TEST_HC) -c F.hs -stubdir stub
$(RM) F.hi F$(OBJSUFFIX) stub/TestStub_stub.c stub/TestStub_stub.h stub/TestStub_stub$(OBJSUFFIX) F_stub$(OBJSUFFIX)
$(TEST_HC) -c F.hs -stubdir stub
test -f F_stub$(OBJSUFFIX)
test -f stub/TestStub_stub.c
test -f stub/TestStub_stub.h
# test -odir with stubs (filename differs from module name)
test018:
@$(RM) F.hi F$(OBJSUFFIX) F_stub.c F_stub.h obj/TestStub_stub$(OBJSUFFIX)
@$(MKDIRHIER) obj
@$(TEST_HC) -c F.hs -odir obj
test -f obj/TestStub_stub$(OBJSUFFIX)
$(RM) -f F018.hi F018$(OBJSUFFIX) F018_stub.c F018_stub.h
$(RM) -rf obj018
$(MKDIRHIER) -q obj018
$(TEST_HC) -c F018.hs -odir obj018
test -f obj018/TestStub018_stub$(OBJSUFFIX)
# -----------------------------------------------------------------------------
# One-shot compilation, hierarchical modules
test021:
@$(RM) B/C.hi
@$(RM) B/C$(OBJSUFFIX)
$(RM) B/C.hi
$(RM) B/C$(OBJSUFFIX)
$(TEST_HC) -c B/C.hs
test -f B/C.hi
test -f B/C$(OBJSUFFIX)
# test -o
test022:
@$(RM) B/C.hi
@$(RM) B/C$(OBJSUFFIX)oo
$(RM) B/C.hi
$(RM) B/C$(OBJSUFFIX)oo
$(TEST_HC) -c B/C.hs -o B/C$(OBJSUFFIX)oo
test -f B/C$(OBJSUFFIX)oo
# test -ohi
test023:
@$(RM) B/C.xhi
@$(RM) B/C$(OBJSUFFIX)
$(RM) B/C.xhi
$(RM) B/C$(OBJSUFFIX)
$(TEST_HC) -c B/C.hs -ohi B/C.xhi
test -f B/C.xhi
# test -odir
test024:
@$(MKDIRHIER) obj
@$(RM) B/C.hi
@$(RM) obj/B/C$(OBJSUFFIX)
@-rmdir obj/B
$(TEST_HC) -c B/C.hs -odir obj
test -f obj/B/C$(OBJSUFFIX)
$(RM) -f B/C024.hi
$(RM) -rf obj024
$(MKDIRHIER) -q obj024
$(TEST_HC) -c B/C024.hs -odir obj024
test -f obj024/B/C024$(OBJSUFFIX)
# test -odir with non-Haskell compilation
test024a:
@$(MKDIRHIER) obj
@$(RM) B/stub.c
@$(RM) obj/B/stub$(OBJSUFFIX)
@-rmdir obj/B
@echo >B/stub.c
$(RM) -f B/stub.c
$(RM) -rf obj
$(MKDIRHIER) -q obj
echo >B/stub.c
$(TEST_HC) -c B/stub.c -odir obj
test -f obj/B/stub$(OBJSUFFIX)
# test -hidir
test025:
@$(MKDIRHIER) hi
@$(RM) hi/B/C.hi
@$(RM) B/C$(OBJSUFFIX)
$(MKDIRHIER) -q hi
$(RM) hi/B/C.hi
$(RM) B/C$(OBJSUFFIX)
$(TEST_HC) -c B/C.hs -hidir hi
test -f hi/B/C.hi
# This is a hierarchical module that lives in a subdirectory.
test026:
@$(RM) d1/P/Q.hi
@$(RM) d1/P/Q$(OBJSUFFIX)
$(RM) d1/P/Q.hi
$(RM) d1/P/Q$(OBJSUFFIX)
$(TEST_HC) -c d1/P/Q.hs
test -f d1/P/Q.hi
test -f d1/P/Q$(OBJSUFFIX)
......@@ -139,16 +140,16 @@ test026:
# test stub generation
# -fvia-C, because we want to check that the .hc file can #include the stub.h
test027:
@$(RM) B/F.hi B/F$(OBJSUFFIX) B/F_stub.c B/F_stub.h
@$(TEST_HC) -c B/F.hs -fvia-C
$(RM) B/F.hi B/F$(OBJSUFFIX) B/F_stub.c B/F_stub.h
$(TEST_HC) -c B/F.hs -fvia-C
test -f B/F_stub.c
test -f B/F_stub.h
# test -stubdir
# -fvia-C, because we want to check that the .hc file can #include the stub.h
test028:
@$(RM) B/F.hi B/F$(OBJSUFFIX) stub/B/F_stub.c stub/B/F_stub.h
@$(TEST_HC) -c B/F.hs -stubdir stub -fvia-C
$(RM) B/F.hi B/F$(OBJSUFFIX) stub/B/F_stub.c stub/B/F_stub.h
$(TEST_HC) -c B/F.hs -stubdir stub -fvia-C
test -f stub/B/F_stub.c
test -f stub/B/F_stub.h
......@@ -156,39 +157,39 @@ test028:
# Compilation-manager compilations, flat modules
test031:
@$(RM) A.hi
@$(RM) A$(OBJSUFFIX)
$(TEST_HC) --make A.hs
$(RM) A.hi
$(RM) A$(OBJSUFFIX)
$(TEST_HC) -v0 --make A.hs
test -f A.hi
test -f A$(OBJSUFFIX)
# test -odir
test032:
@$(RM) A.hi
@$(RM) obj/A$(OBJSUFFIX)
@$(MKDIRHIER) obj
$(TEST_HC) --make A.hs -odir obj
$(RM) A.hi
$(RM) obj/A$(OBJSUFFIX)
$(MKDIRHIER) -q obj
$(TEST_HC) -v0 --make A.hs -odir obj
test -f obj/A$(OBJSUFFIX)
# test -hidir
test033:
@$(RM) hi/A.hi
@$(RM) A$(OBJSUFFIX)
@$(MKDIRHIER) hi
$(TEST_HC) --make A.hs -hidir hi
$(RM) hi/A.hi
$(RM) A$(OBJSUFFIX)
$(MKDIRHIER) -q hi
$(TEST_HC) -v0 --make A.hs -hidir hi
test -f hi/A.hi
# test stub generation
test034:
@$(RM) F.hi F$(OBJSUFFIX) F_stub.c F_stub.h
@$(TEST_HC) --make F.hs
$(RM) F.hi F$(OBJSUFFIX) F_stub.c F_stub.h
$(TEST_HC) -v0 --make F.hs
test -f F_stub.c
test -f F_stub.h
# test -stubdir (filename differs from module name)
test035:
@$(RM) F.hi F$(OBJSUFFIX) stub/Stubs_stub.c stub/Stubs_stub.h
@$(TEST_HC) --make F.hs -stubdir stub
$(RM) F.hi F$(OBJSUFFIX) stub/Stubs_stub.c stub/Stubs_stub.h
$(TEST_HC) -v0 --make F.hs -stubdir stub
test -f stub/TestStub_stub.c
test -f stub/TestStub_stub.h
......@@ -196,39 +197,39 @@ test035:
# Compilation-manager compilations, hierarchical modules
test041:
@$(RM) B/C.hi
@$(RM) B/C$(OBJSUFFIX)
$(TEST_HC) --make B/C.hs
$(RM) B/C.hi
$(RM) B/C$(OBJSUFFIX)
$(TEST_HC) -v0 --make B/C.hs
test -f B/C.hi
test -f B/C$(OBJSUFFIX)
# test -odir
test042:
@$(MKDIRHIER) obj
@$(RM) B/C.hi
@$(RM) obj/B/C$(OBJSUFFIX)
$(TEST_HC) --make B/C.hs -odir obj
$(MKDIRHIER) -q obj
$(RM) B/C.hi
$(RM) obj/B/C$(OBJSUFFIX)
$(TEST_HC) -v0 --make B/C.hs -odir obj
test -f obj/B/C$(OBJSUFFIX)
# test -hidir
test043:
@$(MKDIRHIER) hi
@$(RM) hi/B/C.hi
@$(RM) B/C$(OBJSUFFIX)
$(TEST_HC) --make B/C.hs -hidir hi
$(RM) -f B/C$(OBJSUFFIX)
$(RM) -rf hi
$(MKDIRHIER) -q hi
$(TEST_HC) -v0 --make B/C.hs -hidir hi
test -f hi/B/C.hi
# test stub generation
test044:
@$(RM) B/F.hi B/F$(OBJSUFFIX) B/F_stub.c B/F_stub.h
@$(TEST_HC) --make B/F.hs
$(RM) B/F.hi B/F$(OBJSUFFIX) B/F_stub.c B/F_stub.h
$(TEST_HC) -v0 --make B/F.hs
test -f B/F_stub.c
test -f B/F_stub.h
# test -stubdir
test045:
@$(RM) B/F.hi B/F$(OBJSUFFIX) stub/B/F_stub.c stub/B/F_stub.h
@$(TEST_HC) --make B/F.hs -stubdir stub
$(RM) B/F.hi B/F$(OBJSUFFIX) stub/B/F_stub.c stub/B/F_stub.h
$(TEST_HC) -v0 --make B/F.hs -stubdir stub
test -f stub/B/F_stub.c
test -f stub/B/F_stub.h
......@@ -236,11 +237,11 @@ test045:
# Compilation-manager compilations, hierarchical modules, non-root modules
test051:
@$(RM) d2/R/S.hi
@$(RM) d2/R/S$(OBJSUFFIX)
@$(RM) d1/P/Q.hi
@$(RM) d1/P/Q$(OBJSUFFIX)
$(TEST_HC) --make -id1 -id2 R.S
$(RM) d2/R/S.hi
$(RM) d2/R/S$(OBJSUFFIX)
$(RM) d1/P/Q.hi
$(RM) d1/P/Q$(OBJSUFFIX)
$(TEST_HC) -v0 --make -id1 -id2 R.S
test -f d2/R/S.hi
test -f d2/R/S$(OBJSUFFIX)
test -f d1/P/Q.hi
......@@ -248,12 +249,12 @@ test051:
# test -odir
test052:
@$(RM) d2/R/S.hi
@$(RM) obj/R/S$(OBJSUFFIX)
@$(RM) d1/P/Q.hi
@$(RM) obj/P/Q$(OBJSUFFIX)
@$(MKDIRHIER) obj
$(TEST_HC) --make -id1 -id2 -odir obj R.S
$(RM) d2/R/S.hi
$(RM) obj/R/S$(OBJSUFFIX)
$(RM) d1/P/Q.hi
$(RM) obj/P/Q$(OBJSUFFIX)
$(MKDIRHIER) -q obj
$(TEST_HC) -v0 --make -id1 -id2 -odir obj R.S
test -f d2/R/S.hi
test -f obj/R/S$(OBJSUFFIX)
test -f d1/P/Q.hi
......@@ -261,11 +262,11 @@ test052:
# test -hidir
test053:
@$(RM) hi/R/S.hi
@$(RM) d2/R/S$(OBJSUFFIX)
@$(RM) hi/P/Q.hi
@$(RM) d1/P/Q$(OBJSUFFIX)
$(TEST_HC) --make -id1 -id2 -hidir hi R.S
$(RM) hi/R/S.hi
$(RM) d2/R/S$(OBJSUFFIX)
$(RM) hi/P/Q.hi
$(RM) d1/P/Q$(OBJSUFFIX)
$(TEST_HC) -v0 --make -id1 -id2 -hidir hi R.S
test -f hi/R/S.hi
test -f d2/R/S$(OBJSUFFIX)
test -f hi/P/Q.hi
......@@ -276,114 +277,114 @@ test053:
# Test the -keep-hc-files works without --make
test060:
@$(RM) A.hi A$(OBJSUFFIX) A.hc
$(RM) A.hi A$(OBJSUFFIX) A.hc
$(TEST_HC) -c -keep-hc-files -fvia-C A.hs
test -f A.hc
# Test the -keep-hc-files works with --make
test061:
@$(RM) A.hi A$(OBJSUFFIX) A.hc
$(TEST_HC) --make -keep-hc-files -fvia-C A.hs
$(RM) A.hi A$(OBJSUFFIX) A.hc
$(TEST_HC) -v0 --make -keep-hc-files -fvia-C A.hs
test -f A.hc
# Test that -keep-s-files works with --make and -fvia-C
test061a.1:
@$(RM) A.hi A$(OBJSUFFIX) A.s
$(TEST_HC) --make -keep-s-files -fvia-C A.hs
$(RM) A.hi A$(OBJSUFFIX) A.s
$(TEST_HC) -v0 --make -keep-s-files -fvia-C A.hs
test -f A.s
# Test that -keep-s-files works without --make
test061a.2:
@$(RM) A.hi A$(OBJSUFFIX) A.s
$(RM) A.hi A$(OBJSUFFIX) A.s
$(TEST_HC) -c -keep-s-files -fvia-C A.hs
test -f A.s
# Test that -main-is works with --make
test062.1:
@$(RM) Hello.hs Hello.hi Hello$(OBJSUFFIX) Hello.hc hello
$(RM) Hello.hs Hello.hi Hello$(OBJSUFFIX) Hello.hc hello
echo "module Hello where { hello = putStrLn \"ok\" }" >Hello.hs
$(TEST_HC) --make -main-is Hello.hello Hello -o hello
$(TEST_HC) -v0 --make -main-is Hello.hello Hello -o hello
./hello
test062.2:
@$(RM) Hello.hs Hello.hi Hello$(OBJSUFFIX) Hello.hc hello
$(RM) Hello.hs Hello.hi Hello$(OBJSUFFIX) Hello.hc hello
echo "module Hello where { main = putStrLn \"ok\" }" >Hello.hs
$(TEST_HC) --make -main-is Hello Hello -o hello
$(TEST_HC) -v0 --make -main-is Hello Hello -o hello
./hello
test062.3:
@$(RM) Hello.hs Hello.hi Hello$(OBJSUFFIX) Hello.hc hello
$(RM) Hello.hs Hello.hi Hello$(OBJSUFFIX) Hello.hc hello
echo "module Main (hello) where { hello = putStrLn \"ok\" }" >Hello.hs
$(TEST_HC) --make -main-is hello Hello.hs -o hello
$(TEST_HC) -v0 --make -main-is hello Hello.hs -o hello
./hello
test062.4:
@$(RM) B/Hello.hs B/Hello.hi B/Hello$(OBJSUFFIX) B/Hello.hc hello
$(RM) B/Hello.hs B/Hello.hi B/Hello$(OBJSUFFIX) B/Hello.hc hello
echo "module B.Hello (hello) where { hello = putStrLn \"ok\" }" >B/Hello.hs
$(TEST_HC) --make -main-is B.Hello.hello B/Hello.hs -o hello
$(TEST_HC) -v0 --make -main-is B.Hello.hello B/Hello.hs -o hello
./hello
test062.5:
@$(RM) B/Hello.hs B/Hello.hi B/Hello$(OBJSUFFIX) Hello.hc hello
$(RM) B/Hello.hs B/Hello.hi B/Hello$(OBJSUFFIX) Hello.hc hello
echo "module B.Hello (main) where { main = putStrLn \"ok\" }" >B/Hello.hs
$(TEST_HC) --make -main-is B.Hello B/Hello.hs -o hello
$(TEST_HC) -v0 --make -main-is B.Hello B/Hello.hs -o hello
./hello
# Test that -i deletes the list of search paths.
# The compilation will fail, but we ignore the failure and just
# compare the output, because make might give us a different exit code.
test063:
@$(RM) A.hi A$(OBJSUFFIX) A.hc D.hi D$(OBJSUFFIX) D.hc
-@$(TEST_HC) --make -i -v0 D.hs