Commit a7cb6a14 authored by Ian Lynagh's avatar Ian Lynagh

Decouple more tests from each other so CLEANUP mode works

parent 3458292a
......@@ -5,12 +5,12 @@ include $(TOP)/mk/test.mk
mod144::
rm -f Mod143_A.o Mod143_A.hi mod144.o mod144.hi mod144
$(TEST_HC) -c Mod143_A.hs
$(TEST_HC) mod144.hs -o mod144
$(TEST_HC) -c mod144.hs
mod146::
rm -f Mod145_A.o Mod145_A.hi mod146.o mod146.hi mod146
$(TEST_HC) -c Mod145_A.hs
$(TEST_HC) mod146.hs -o mod146
$(TEST_HC) -c mod146.hs
mod158::
rm -f Mod157_*.o
......@@ -20,5 +20,39 @@ mod158::
$(TEST_HC) -c Mod157_B.hs
$(TEST_HC) -c Mod157_C.hs
$(TEST_HC) -c Mod157_D.hs
$(TEST_HC) mod158.hs -o mod158
$(TEST_HC) -c mod158.hs
mod160::
rm -f Mod159_*.o
rm -f Mod159_*.hi
rm -f mod160.o mod160.hi mod160
$(TEST_HC) -c Mod159_A.hs
$(TEST_HC) -c Mod159_B.hs
$(TEST_HC) -c Mod159_C.hs
$(TEST_HC) -c Mod159_D.hs
$(TEST_HC) -c mod160.hs
mod165::
rm -f Mod164_*.o
rm -f Mod164_*.hi
rm -f mod165.o mod165.hi mod165
$(TEST_HC) -c Mod164_A.hs
$(TEST_HC) -c Mod164_B.hs
$(TEST_HC) -c mod165.hs
mod166::
rm -f Mod164_*.o
rm -f Mod164_*.hi
rm -f mod166.o mod166.hi mod166
$(TEST_HC) -c Mod164_A.hs
$(TEST_HC) -c Mod164_B.hs
$(TEST_HC) -c mod166.hs
mod167::
rm -f Mod164_*.o
rm -f Mod164_*.hi
rm -f mod167.o mod167.hi mod167
$(TEST_HC) -c Mod164_A.hs
$(TEST_HC) -c Mod164_B.hs
$(TEST_HC) -c mod167.hs
......@@ -214,7 +214,9 @@ clean(['Mod157_A.hi', 'Mod157_A.o', 'Mod157_B.hi', 'Mod157_B.o',
test('mod159', normal, multimod_compile, ['mod159', '-v0'])
clean(['Mod159_A.hi', 'Mod159_A.o', 'Mod159_B.hi', 'Mod159_B.o',
'Mod159_C.hi', 'Mod159_C.o', 'Mod159_D.hi', 'Mod159_D.o'])
test('mod160', normal, compile_fail, [''])
test('mod160', compose(normal, exit_code(2)), run_command, ['$MAKE -s --no-print-directory mod160'])
clean(['Mod159_A.hi', 'Mod159_A.o', 'Mod159_B.hi', 'Mod159_B.o',
'Mod159_C.hi', 'Mod159_C.o', 'Mod159_D.hi', 'Mod159_D.o'])
test('mod161', normal, compile_fail, [''])
test('mod162', normal, multimod_compile, ['mod162', '-v0'])
clean(['Mod162_A.hi', 'Mod162_A.o'])
......@@ -222,9 +224,12 @@ test('mod163', normal, multimod_compile, ['mod163', '-v0'])
clean(['Mod163_A.hi', 'Mod163_A.o'])
test('mod164', normal, multimod_compile_fail, ['mod164', '-v0'])
clean(['Mod164_A.hi', 'Mod164_A.o', 'Mod164_B.hi', 'Mod164_B.o'])
test('mod165', normal, compile_fail, [''])
test('mod166', normal, compile, [''])
test('mod167', normal, compile, [''])
test('mod165', compose(normal, exit_code(2)), run_command, ['$MAKE -s --no-print-directory mod165'])
clean(['Mod164_A.hi', 'Mod164_A.o', 'Mod164_B.hi', 'Mod164_B.o'])
test('mod166', normal, run_command, ['$MAKE -s --no-print-directory mod166'])
clean(['Mod164_A.hi', 'Mod164_A.o', 'Mod164_B.hi', 'Mod164_B.o'])
test('mod167', normal, run_command, ['$MAKE -s --no-print-directory mod167'])
clean(['Mod164_A.hi', 'Mod164_A.o', 'Mod164_B.hi', 'Mod164_B.o'])
test('mod168', normal, compile, [''])
test('mod169', normal, compile, [''])
test('mod170', normal, multimod_compile, ['mod170', '-v0'])
......
mod160.hs:12:4: Not in scope: `m3'
make[1]: *** [mod160] Error 1
......@@ -3,3 +3,4 @@ mod165.hs:9:4:
Ambiguous occurrence `A.D1'
It could refer to either `D1', imported from Mod164_A at mod165.hs:4:0-19
or `D1', imported from Mod164_B at mod165.hs:5:0-19
make[1]: *** [mod165] Error 1
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