Commit f73bd006 authored by ian@well-typed.com's avatar ian@well-typed.com

More conversions

parent 30a52e41
......@@ -293,12 +293,6 @@ def _compiler_stats_num_field( name, opts, field, expecteds ):
# -----
def skip_if_no_ghci(name, opts):
if not ('ghci' in config.run_ways):
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
......@@ -313,6 +307,9 @@ def unless(b, f):
def fast():
return config.fast
def doing_ghci():
return 'ghci' in config.run_ways
def platform( plat ):
return config.platform == plat
......
test('ghcilink001',
[when(ghci_dynamic(), expect_fail), # dynamic ghci can't load '.a's
skip_if_no_ghci,
unless(doing_ghci, skip),
extra_clean(['dir001/*','dir001'])],
run_command,
['$MAKE -s --no-print-directory ghcilink001'])
test('ghcilink002',
[skip_if_no_ghci, extra_clean(['dir002/*','dir002'])],
[unless(doing_ghci, skip), extra_clean(['dir002/*','dir002'])],
run_command,
['$MAKE -s --no-print-directory ghcilink002'])
......@@ -14,7 +14,7 @@ test('ghcilink003',
[
# still cannot load libstdc++ on Windows. See also #4468.
when(opsys('mingw32'), expect_broken(5289)),
skip_if_no_ghci,
unless(doing_ghci, skip),
extra_clean(['dir003/*','dir003'])
],
run_command,
......@@ -22,13 +22,13 @@ test('ghcilink003',
test('ghcilink004',
[when(ghci_dynamic(), expect_fail), # dynamic ghci can't load '.a's
skip_if_no_ghci,
unless(doing_ghci, skip),
extra_clean(['dir004/*','dir004'])],
run_command,
['$MAKE -s --no-print-directory ghcilink004'])
test('ghcilink005',
[skip_if_no_ghci, extra_clean(['dir005/*','dir005'])],
[unless(doing_ghci, skip), extra_clean(['dir005/*','dir005'])],
run_command,
['$MAKE -s --no-print-directory ghcilink005'])
......@@ -36,7 +36,7 @@ test('ghcilink006',
[
# still cannot load libstdc++ on Windows. See also #4468.
when(opsys('mingw32'), expect_broken(5289)),
skip_if_no_ghci,
unless(doing_ghci, skip),
extra_clean(['dir006/*','dir006'])
],
run_command,
......
......@@ -44,7 +44,7 @@ test('rnfail040',
test('rnfail041', normal, compile_fail, [''])
test('rnfail042', normal, compile_fail, [''])
test('rnfail043', skip_if_no_ghci, compile_fail, ['-v0'])
test('rnfail043', unless(doing_ghci, skip), compile_fail, ['-v0'])
test('rnfail044', normal, compile_fail, [''])
test('rnfail045', normal, compile_fail, [''])
test('rnfail046', normal, compile_fail, [''])
......
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