Commit 30a52e41 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

More helper conversions

parent d36dc348
......@@ -299,12 +299,6 @@ def skip_if_no_ghci(name, opts):
# ----
def skip_if_fast(name, opts):
if config.fast:
opts.skip = 1
# -----
def when(b, f):
# When list_brokens is on, we want to see all expect_broken calls,
# so we always do f
......@@ -316,6 +310,9 @@ def when(b, f):
def unless(b, f):
return when(not b, f)
def fast():
return config.fast
def platform( plat ):
return config.platform == plat
......
setTestOpts(when(compiler_profiled(), skip))
# These tests are very slow due to their use of package GHC
setTestOpts(skip_if_fast)
setTestOpts(when(fast(), skip))
# Annotations, like Template Haskell, require runtime evaluation. In
# order for this to work with profiling, we would have to build the
......
......@@ -4,23 +4,23 @@
# extra run flags
# expected process return value, if not zero
test('arr001', skip_if_fast, compile_and_run, [''])
test('arr002', skip_if_fast, compile_and_run, [''])
test('arr003', compose(skip_if_fast,exit_code(1)), compile_and_run, [''])
test('arr004', compose(skip_if_fast,exit_code(1)), compile_and_run, [''])
test('arr005', skip_if_fast, compile_and_run, [''])
test('arr006', skip_if_fast, compile_and_run, [''])
test('arr007', compose(skip_if_fast,exit_code(1)), compile_and_run, [''])
test('arr008', compose(skip_if_fast,exit_code(1)), compile_and_run, [''])
test('arr009', skip_if_fast, compile_and_run, [''])
test('arr010', skip_if_fast, compile_and_run, [''])
test('arr011', skip_if_fast, compile_and_run, [''])
test('arr012', skip_if_fast, compile_and_run, [''])
test('arr013', skip_if_fast, compile_and_run, [''])
test('arr014', skip_if_fast, compile_and_run, [''])
test('arr015', skip_if_fast, compile_and_run, [''])
test('arr001', when(fast(), skip), compile_and_run, [''])
test('arr002', when(fast(), skip), compile_and_run, [''])
test('arr003', compose(when(fast(), skip),exit_code(1)), compile_and_run, [''])
test('arr004', compose(when(fast(), skip),exit_code(1)), compile_and_run, [''])
test('arr005', when(fast(), skip), compile_and_run, [''])
test('arr006', when(fast(), skip), compile_and_run, [''])
test('arr007', compose(when(fast(), skip),exit_code(1)), compile_and_run, [''])
test('arr008', compose(when(fast(), skip),exit_code(1)), compile_and_run, [''])
test('arr009', when(fast(), skip), compile_and_run, [''])
test('arr010', when(fast(), skip), compile_and_run, [''])
test('arr011', when(fast(), skip), compile_and_run, [''])
test('arr012', when(fast(), skip), compile_and_run, [''])
test('arr013', when(fast(), skip), compile_and_run, [''])
test('arr014', when(fast(), skip), compile_and_run, [''])
test('arr015', when(fast(), skip), compile_and_run, [''])
test('arr016', reqlib('random'), compile_and_run, [''])
test('arr017', skip_if_fast, compile_and_run, [''])
test('arr018', skip_if_fast, compile_and_run, [''])
test('arr017', when(fast(), skip), compile_and_run, [''])
test('arr018', when(fast(), skip), compile_and_run, [''])
test('arr019', normal, compile_and_run, [''])
test('arr020', normal, compile_and_run, [''])
setTestOpts(only_compiler_types(['ghc']))
test('arrowrun001', normal, compile_and_run, [''])
test('arrowrun002', skip_if_fast, compile_and_run, [''])
test('arrowrun002', when(fast(), skip), compile_and_run, [''])
test('arrowrun003', normal, compile_and_run, [''])
test('arrowrun004', skip_if_fast, compile_and_run, [''])
test('arrowrun004', when(fast(), skip), compile_and_run, [''])
test('T3822', normal, compile_and_run, [''])
test('T2317',
[skip_if_fast,
[when(fast(), skip),
reqlib('parallel'), reqlib('random')],
multimod_compile_and_run,
['T2317',''])
......@@ -13,7 +13,7 @@
# right now. --SDM 1/4/2010
test('concprog001',
[skip_if_fast,
[when(fast(), skip),
only_ways(['threaded2']),
extra_clean(['Arithmetic.hi', 'Arithmetic.o',
'Converter.hi', 'Converter.o',
......
......@@ -13,7 +13,7 @@ test('concprog002',
[only_ways(['threaded2','threaded2_hT']),
extra_ways(ways),
exit_code(1),
skip_if_fast,
when(fast(), skip),
reqlib('random'),
extra_clean(['Event.hi', 'Event.o',
'Scheduler.hi', 'Scheduler.o',
......
......@@ -10,7 +10,7 @@
# occasionally, but at least the test is here for posterity.
test('concprog003',
[skip_if_fast,
[when(fast(), skip),
extra_clean([
'BackList2.hi', 'BackList2.o',
'ImmList.hi', 'ImmList.o',
......
......@@ -127,7 +127,7 @@ if config.platform == 'i386-unknown-mingw32':
else:
conc023_ways = normal
test('conc023', composes([skip_if_fast,
test('conc023', composes([when(fast(), skip),
only_compiler_types(['ghc']),
reqlib('random'),
conc023_ways]), compile_and_run, [''])
......@@ -170,7 +170,7 @@ test('conc036', skip, compile_and_run, [''])
# Interrupting foreign calls only makes sense if we are threaded
test('foreignInterruptible', [skip_if_fast,
test('foreignInterruptible', [when(fast(), skip),
when(opsys('mingw32'),expect_fail),
# I don't think we support interrupting Sleep()
# on Windows. --SDM
......
......@@ -13,8 +13,8 @@ test('dsrun007', exit_code(1), compile_and_run, [''])
test('dsrun008', exit_code(1), compile_and_run, [''])
test('dsrun009', normal, compile_and_run, [''])
test('dsrun010', normal, compile_and_run, [''])
test('dsrun011', skip_if_fast, compile_and_run, [''])
test('dsrun012', skip_if_fast, compile_and_run, [''])
test('dsrun011', when(fast(), skip), compile_and_run, [''])
test('dsrun012', when(fast(), skip), compile_and_run, [''])
test('dsrun013', normal, compile_and_run, [''])
test('dsrun014', normal, compile_and_run, ['-fobject-code'])
test('dsrun015', normal, compile_and_run, [''])
......
......@@ -3,24 +3,24 @@
# extra run flags
# expected process return value, if not zero
test('drvrun001', skip_if_fast, compile_and_run, [''])
test('drvrun002', skip_if_fast, compile_and_run, [''])
test('drvrun003', skip_if_fast, compile_and_run, [''])
test('drvrun004', skip_if_fast, compile_and_run, [''])
test('drvrun005', skip_if_fast, compile_and_run, [''])
test('drvrun001', when(fast(), skip), compile_and_run, [''])
test('drvrun002', when(fast(), skip), compile_and_run, [''])
test('drvrun003', when(fast(), skip), compile_and_run, [''])
test('drvrun004', when(fast(), skip), compile_and_run, [''])
test('drvrun005', when(fast(), skip), compile_and_run, [''])
test('drvrun006', normal, compile_and_run, [''])
test('drvrun007', skip_if_fast, compile_and_run, [''])
test('drvrun008', skip_if_fast, compile_and_run, ['-funbox-strict-fields'])
test('drvrun009', skip_if_fast, compile_and_run, [''])
test('drvrun010', skip_if_fast, compile_and_run, [''])
test('drvrun011', skip_if_fast, compile_and_run, [''])
test('drvrun012', skip_if_fast, compile_and_run, [''])
test('drvrun013', skip_if_fast, compile_and_run, [''])
test('drvrun014', skip_if_fast, compile_and_run, [''])
test('drvrun015', skip_if_fast, compile_and_run, [''])
test('drvrun016', skip_if_fast, compile_and_run, ['-funbox-strict-fields'])
test('drvrun017', compose(skip_if_fast, only_compiler_types(['ghc'])), compile_and_run, [''])
test('drvrun018', skip_if_fast, compile_and_run, [''])
test('drvrun007', when(fast(), skip), compile_and_run, [''])
test('drvrun008', when(fast(), skip), compile_and_run, ['-funbox-strict-fields'])
test('drvrun009', when(fast(), skip), compile_and_run, [''])
test('drvrun010', when(fast(), skip), compile_and_run, [''])
test('drvrun011', when(fast(), skip), compile_and_run, [''])
test('drvrun012', when(fast(), skip), compile_and_run, [''])
test('drvrun013', when(fast(), skip), compile_and_run, [''])
test('drvrun014', when(fast(), skip), compile_and_run, [''])
test('drvrun015', when(fast(), skip), compile_and_run, [''])
test('drvrun016', when(fast(), skip), compile_and_run, ['-funbox-strict-fields'])
test('drvrun017', compose(when(fast(), skip), only_compiler_types(['ghc'])), compile_and_run, [''])
test('drvrun018', when(fast(), skip), compile_and_run, [''])
test('drvrun019', normal, compile_and_run, [''])
test('drvrun020', normal, compile_and_run, [''])
test('drvrun021', normal, compile_and_run, [''])
......
test ('dph-diophantine-copy-opt'
, [ skip_if_fast
, [ when(fast(), skip)
, outputdir('opt')
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
......
test ('dph-dotp-copy-opt'
, [ outputdir('copy-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......@@ -11,7 +11,7 @@ test ('dph-dotp-copy-opt'
test ('dph-dotp-vseg-opt'
, [ outputdir('vseg-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-vseg')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......
......@@ -2,7 +2,7 @@
test ('dph-nbody-vseg-opt'
, [ high_memory_usage
, outputdir('vseg-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-vseg')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......@@ -14,7 +14,7 @@ test ('dph-nbody-vseg-opt'
test ('dph-nbody-copy-opt'
, [ high_memory_usage
, outputdir('copy-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......
test ('dph-primespj-copy-opt'
, [ outputdir('opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......
......@@ -2,7 +2,7 @@
test ('dph-quickhull-copy-opt'
, [ high_memory_usage
, outputdir('copy-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......@@ -14,7 +14,7 @@ test ('dph-quickhull-copy-opt'
test ('dph-quickhull-vseg-opt'
, [ high_memory_usage
, outputdir('vseg-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-vseg')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......
......@@ -17,7 +17,7 @@ elif config.platform.startswith('sparc-'):
if testFile != 'nothing':
test ('dph-smvm-copy'
, [ outputdir('copy')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2'])
......@@ -29,7 +29,7 @@ if testFile != 'nothing':
test ('dph-smvm-vseg'
, [ outputdir('vseg')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-vseg')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2'])
......
......@@ -2,7 +2,7 @@
test ('dph-words-copy-opt'
, [ high_memory_usage
, outputdir('copy-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-copy')
, reqlib('dph-prim-par')
, only_ways(['normal']) ]
......@@ -14,7 +14,7 @@ test ('dph-words-copy-opt'
test ('dph-words-vseg-opt'
, [ high_memory_usage
, outputdir('vseg-opt')
, skip_if_fast
, when(fast(), skip)
, reqlib('dph-lifted-vseg')
, reqlib('dph-prim-par')
, only_ways(['normal']) ]
......
test('dynamic_flags_001',
[skip_if_fast,
[when(fast(), skip),
clean_cmd('$MAKE -s clean')],
run_command,
['$MAKE -s --no-print-directory dynamic_flags_001'])
......
test('dynamic_flags_002A', skip_if_fast, multimod_compile, ['A_Main', '-v0'])
test('dynamic_flags_002B', skip_if_fast, multimod_compile, ['B_Main', '-v0'])
test('dynamic_flags_002C', skip_if_fast, multimod_compile, ['C_Main', '-v0'])
test('dynamic_flags_002D', skip_if_fast, multimod_compile, ['D_Main', '-v0'])
test('dynamic_flags_002Many', skip_if_fast, multimod_compile, ['ManyFirst ManySecond ManyThird', '-v0'])
test('dynamic_flags_002A',
when(fast(), skip), multimod_compile, ['A_Main', '-v0'])
test('dynamic_flags_002B',
when(fast(), skip), multimod_compile, ['B_Main', '-v0'])
test('dynamic_flags_002C',
when(fast(), skip), multimod_compile, ['C_Main', '-v0'])
test('dynamic_flags_002D',
when(fast(), skip), multimod_compile, ['D_Main', '-v0'])
test('dynamic_flags_002Many',
when(fast(), skip), multimod_compile,
['ManyFirst ManySecond ManyThird', '-v0'])
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