Commit 209fc3ec authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Merge branch 'master' of http://darcs.haskell.org/testsuite

parents c752b33c 90dc2234
......@@ -455,6 +455,9 @@ def _compile_cmd_prefix( opts, prefix ):
def normalise_slashes( opts ):
opts.extra_normaliser = normalise_slashes_
def normalise_exe( opts ):
opts.extra_normaliser = normalise_exe_
def normalise_fun( fun ):
return lambda opts, f=fun: _normalise_fun(opts, f)
......@@ -1587,6 +1590,10 @@ def normalise_slashes_( str ):
str = re.sub('\\\\', '/', str)
return str
def normalise_exe_( str ):
str = re.sub('\.exe', '', str)
return str
def normalise_output( str ):
# Remove a .exe extension (for Windows)
# This can occur in error messages generated by the program.
......
......@@ -138,10 +138,12 @@ PYTHON = python
$(TOP_ABS)/mk/ghc-config : $(TOP_ABS)/mk/ghc-config.hs
"$(TEST_HC)" --make -o $@ $<
ghc-config-mk = $(TOP_ABS)/mk/ghcconfig$(subst /,_,$(subst \,_,$(TEST_HC))).mk
empty=
space=$(empty) $(empty)
ghc-config-mk = $(TOP_ABS)/mk/ghcconfig$(subst $(space),_,$(subst /,_,$(subst \,_,$(TEST_HC)))).mk
$(ghc-config-mk) : $(TOP_ABS)/mk/ghc-config
$(TOP_ABS)/mk/ghc-config $(TEST_HC) >$@
$(TOP_ABS)/mk/ghc-config "$(TEST_HC)" >"$@" || $(RM) "$@"
include $(ghc-config-mk)
......
......@@ -27,7 +27,7 @@ test('2910a', normal, compile_and_run, [''])
test('3279', normal, compile_and_run, [''])
# This test takes a long time with the default context switch interval
test('3429', extra_run_opts('+RTS -i0.001 -RTS'), compile_and_run, [''])
test('3429', extra_run_opts('+RTS -C0.001 -RTS'), compile_and_run, [''])
# without -O, goes into an infinite loop
# GHCi cannot deterct the infinite loop, because the thread is always reachable
......@@ -152,18 +152,29 @@ test('conc034', compose(only_compiler_types(['ghc']),
test('conc035', only_compiler_types(['ghc']), compile_and_run, [''])
# Omit for GHCi: firstly GHCi doesn't have unsafe FFI calls, and secondly
# the main thread cannot receive the deadlock exception because it can be
# woken up by ^C.
# Omit for threaded2: this test is really bogus and fails to do anything
# sensible for more than one CPU.
test('conc036', compose(skip_if_fast,
compose(omit_ways(['ghci','threaded2']),
only_compiler_types(['ghc']))), compile_and_run, [''])
# conc036: now skipped entirely. This test attempts to check that
# unsafe foreign calls block other threads, but doing that reliably is
# probably impossible. The last straw was when it started failing on
# Windows around 7.4.x.
#
# OLD comments about hacks we tried to make it work:
# Omit for GHCi: firstly GHCi doesn't have unsafe FFI calls, and secondly
# the main thread cannot receive the deadlock exception because it can be
# woken up by ^C.
# Omit for threaded2: this test is really bogus and fails to do anything
# sensible for more than one CPU.
#
test('conc036', skip, compile_and_run, [''])
# Interrupting foreign calls only makes sense if we are threaded
test('foreignInterruptible', composes([skip_if_fast,
only_threaded_ways,
only_compiler_types(['ghc'])]), compile_and_run, [''])
test('foreignInterruptible', [skip_if_fast,
if_os('mingw32',expect_fail),
# I don't think we support interrupting Sleep()
# on Windows. --SDM
only_threaded_ways,
only_compiler_types(['ghc'])],
compile_and_run, [''])
test('conc037', only_ways(['threaded1','threaded2']), compile_and_run, [''])
test('conc038', only_ways(['threaded1','threaded2']), compile_and_run, [''])
......
......@@ -35,7 +35,12 @@ test('arith015', normal, compile_and_run, [''])
test('numrun009', normal, compile_and_run, [''])
test('numrun010', normal, compile_and_run, [''])
test('numrun011', normal, compile_and_run, [''])
test('numrun012', normal, compile_and_run, [''])
test('numrun012',
if_os('mingw32',expect_fail_for('ghci')),
# on Windows, GHCi says that "logBase 2 (2^31)" is "31.0", but
# other platforms (and compiled on Windows) reports 31.000000000000004
# I have no idea where the discrepancy comes from. --SDM
compile_and_run, [''])
test('numrun013', normal, compile_and_run, [''])
test('numrun014', normal, compile_and_run, [''])
test('arith016', compose(normal,only_compiler_types(['ghc'])), compile_and_run, [''])
......
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