Commit 146d84b7 authored by Ian Lynagh's avatar Ian Lynagh

More testsuite cleaning

parent 7af00038
......@@ -93,15 +93,14 @@ test('ffi015', [ omit_ways(['ghci']), extra_clean(['ffi015_cbits.o']) ],
test('ffi016', omit_ways(['ghci']), compile_and_run, [''])
test('ffi017', normal, compile_and_run, [''])
# There's a dependency between these next two lines as the ghci way needs
# the .o file the other ways make
test('ffi018', [ omit_ways(['ghci']), extra_clean(['ffi018_c.o']) ],
compile_and_run, ['ffi018_c.c'])
test('ffi018', [ if_compiler_lt('ghc', '6.9', skip),
only_ways(['ghci']),
cmd_prefix('$MAKE ffi018_ghci_setup && '),
extra_clean(['ffi018_ghci_c.o']) ],
extra_clean(['ffi018_ghci_c.c', 'ffi018_ghci_c.o']) ],
compile_and_run, ['ffi018_ghci_c.o'])
test('ffi019', normal, compile_and_run, [''])
......
test('prog001', normal, ghci_script, ['prog001.script'])
clean(['D.hi', 'D.o'])
test('prog001', extra_clean(['D.hs']), ghci_script, ['prog001.script'])
test('ghci.prog009', normal, ghci_script, ['ghci.prog009.script'])
test('ghci.prog009',
extra_clean(['A.hs']),
ghci_script,
['ghci.prog009.script'])
:set -v1
System.IO.writeFile "A.hs" "module A where { import B; }"
System.IO.writeFile "B.hs" "module B where { type T = Int; }"
System.IO.writeFile "T1914A.hs" "module T1914A where { import T1914B; }"
System.IO.writeFile "T1914B.hs" "module T1914B where { type T = Int; }"
-- hack: avoid the need for sleep by using specific timestamps:
:! touch -t 01010000 A.hs
:! touch -t 01010000 B.hs
:load A
System.IO.writeFile "A.hs" "module A where { import B; oops }"
:! touch -t 01010001 A.hs
:! touch -t 01010000 T1914A.hs
:! touch -t 01010000 T1914B.hs
:load T1914A
System.IO.writeFile "T1914A.hs" "module T1914A where { import T1914B; oops }"
:! touch -t 01010001 T1914A.hs
:reload
-- B should still be loaded
:module *B
System.IO.writeFile "A.hs" "module A where { import B; }"
:! touch -t 01010002 A.hs
-- T1914B should still be loaded
:module *T1914B
System.IO.writeFile "T1914A.hs" "module T1914A where { import T1914B; }"
:! touch -t 01010002 T1914A.hs
:reload
-- should not have to reload B
-- should not have to reload T1914B
[1 of 2] Compiling B ( B.hs, interpreted )
[2 of 2] Compiling A ( A.hs, interpreted )
[2 of 2] Compiling A ( A.hs, interpreted )
[1 of 2] Compiling T1914B ( T1914B.hs, interpreted )
[2 of 2] Compiling T1914A ( T1914A.hs, interpreted )
[2 of 2] Compiling T1914A ( T1914A.hs, interpreted )
A.hs:1:32: parse error on input `}'
[2 of 2] Compiling A ( A.hs, interpreted )
T1914A.hs:1:42: parse error on input `}'
[2 of 2] Compiling T1914A ( T1914A.hs, interpreted )
Ok, modules loaded: A, B.
Failed, modules loaded: B.
Ok, modules loaded: A, B.
Ok, modules loaded: T1914A, T1914B.
Failed, modules loaded: T1914B.
Ok, modules loaded: T1914A, T1914B.
......@@ -33,7 +33,12 @@ test('ghci022', normal, ghci_script, ['ghci022.script'])
test('ghci023', normal, ghci_script, ['ghci023.script'])
execfile(in_testdir('ghci024.py')) # load function prepare024
test('ghci024', compose(prepare024, if_platform("powerpc-apple-darwin", expect_broken(1845))), ghci_script, ['ghci024.script'])
test('ghci024',
[prepare024,
if_platform("powerpc-apple-darwin", expect_broken(1845)),
extra_clean(['ghci024.stdout'])],
ghci_script,
['ghci024.script'])
test('ghci025', normal, ghci_script, ['ghci025.script'])
test('ghci026', normal, ghci_script, ['ghci026.script'])
......@@ -44,4 +49,8 @@ test('ghci030', normal, ghci_script, ['ghci030.script'])
test('ghci031', expect_broken(2138), ghci_script, ['ghci031.script'])
test('ghci032', if_compiler_lt('ghc', '6.9', skip), ghci_script, ['ghci032.script'])
test('1914', normal, ghci_script, ['1914.script'])
test('1914',
extra_clean(['T1914A.hs', 'T1914B.hs']),
ghci_script,
['1914.script'])
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