Commit 65b9cf74 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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

parents 512af3bf d34f3e85
......@@ -207,9 +207,6 @@ if windows or darwin:
global testopts_local
testopts_local.x = TestOptions()
global thisdir_testopts
thisdir_testopts = getThisDirTestOpts()
if config.use_threads:
t.lock = threading.Lock()
t.thread_pool = threading.Condition(t.lock)
......@@ -261,6 +258,8 @@ for file in t_files:
if config.use_threads:
t.running_threads=0
for oneTest in parallelTests:
if stopping():
break
oneTest()
if config.use_threads:
t.thread_pool.acquire()
......@@ -269,6 +268,8 @@ if config.use_threads:
t.thread_pool.release()
config.use_threads = False
for oneTest in aloneTests:
if stopping():
break
oneTest()
summary(t, sys.stdout)
......
......@@ -214,17 +214,6 @@ class TestOptions:
self.compiler_stats_range_fields = {}
self.stats_range_fields = {}
# TODO: deprecate this in favour of compiler_stats_range_fields
#
# which -t numeric fields do we want to look at, and what bounds must
# they fall within?
# Elements of these lists should be things like
# ('bytes allocated',
# 9300000000,
# 9400000000)
self.compiler_stats_num_fields = {}
self.stats_num_fields = {}
# should we run this test alone, i.e. not run it in parallel with
# any other threads
self.alone = False
......
This diff is collapsed.
......@@ -10,7 +10,7 @@ test('annrun01',
[extra_clean(['Annrun01_Help.hi', 'Annrun01_Help.o',
'annrun01.hi', 'annrun01.o',
'Config.hs', 'Config.hi', 'Config.o']),
pre_cmd('$MAKE -s config'),
pre_cmd('$MAKE -s --no-print-directory config'),
omit_ways(['profasm','profthreaded', 'dyn'])],
multimod_compile_and_run,
['annrun01', '-package ghc']
......
......@@ -16,7 +16,7 @@ test('ghcpkg02',
test('ghcpkg03',
[extra_clean(['local03.package.conf',
'local03.package.conf.old']),
normalise_fun(normaliseDynlibNames)],
normalise_errmsg_fun(normaliseDynlibNames)],
run_command,
['$MAKE -s --no-print-directory ghcpkg03'])
test('ghcpkg04',
......@@ -36,8 +36,8 @@ test('ghcpkg05',
'local05a.package.conf.old',
'local05b.package.conf',
'local05b.package.conf.old']),
normalise_fun(two_normalisers(normalise_haddock_junk,
normaliseDynlibNames))
normalise_errmsg_fun(two_normalisers(normalise_haddock_junk,
normaliseDynlibNames))
],
run_command,
['$MAKE -s --no-print-directory ghcpkg05'])
......
......@@ -20,7 +20,10 @@ if default_testopts.cleanup != '':
else:
cleanup = ''
def ignoreLdOutput(str):
return re.sub('Creating library file: dist.build.libHStest-1.0-ghc[0-9.]*.dll.a\n', '', str)
test('cabal01',
normal,
normalise_errmsg_fun(ignoreLdOutput),
run_command,
['$MAKE -s --no-print-directory cabal01 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup])
......@@ -100,8 +100,8 @@ test('T7319', [ extra_ways(['prof']), only_ways(['prof']), exit_code(1),
req_profiling,
extra_hc_opts('-fprof-auto'),
extra_run_opts('+RTS -xc') ], compile_and_run, [''])
test('Word2Float32', unless_wordsize(32, skip), compile_and_run, [''])
test('Word2Float64', unless_wordsize(64, skip), compile_and_run, [''])
test('Word2Float32', unless(wordsize(32), skip), compile_and_run, [''])
test('Word2Float64', unless(wordsize(64), skip), compile_and_run, [''])
test('T7361', normal, compile_and_run, [''])
test('T7600', normal, compile_and_run, [''])
......
-- This program broke GHC 6.3, becuase dataToTag was called with
-- This program broke GHC 6.3, because dataToTag was called with
-- an unevaluated argument
module Main where
......
......@@ -77,7 +77,7 @@ test('T5866', exit_code(1), compile_and_run, [''])
# -----------------------------------------------------------------------------
# These tests we only do for a full run
def f( opts ):
def f( name, opts ):
if config.fast:
opts.skip = 1
......@@ -204,7 +204,7 @@ test('conc058', only_compiler_types(['ghc']), compile_and_run, [''])
test('conc059',
[only_compiler_types(['ghc']),
only_ways(['threaded1','threaded2']),
compile_cmd_prefix('$MAKE conc059_setup && '),
pre_cmd('$MAKE -s --no-print-directory conc059_setup'),
extra_clean(['conc059_c.o'])],
compile_and_run,
['conc059_c.c -no-hs-main'])
......
# Just do the opt way...
def f( opts ):
def f( name, opts ):
opts.only_ways = ['optasm']
setTestOpts(f)
......
# Just do the normal way...
def f( opts ):
def f( name, opts ):
opts.only_ways = ['normal']
setTestOpts(f)
......
test ('dph-classes-vseg-fast'
, [ extra_clean(['Main.o', 'Main.hi', 'DefsVect.hi', 'DefsVect.o'])
, [ expect_fail
, extra_clean(['Main.o', 'Main.hi', 'DefsVect.hi', 'DefsVect.o'])
, reqlib('dph-lifted-vseg')
, reqlib('dph-prim-par')
, only_ways(['normal', 'threaded1', 'threaded2']) ]
......
......@@ -20,7 +20,7 @@ test ('dph-nbody-copy-opt'
, only_ways(['normal', 'threaded1', 'threaded2']) ]
, multimod_compile_and_run
, [ 'Main'
, '-Odph -fno-liberate-case -package dph-lifted-copy -package dph-prim-par'])
, '-Odph -fno-vectorisation-avoidance -fno-liberate-case -package dph-lifted-copy -package dph-prim-par'])
test ('dph-nbody-vseg-fast'
......@@ -40,4 +40,4 @@ test ('dph-nbody-copy-fast'
, only_ways(['normal', 'threaded1', 'threaded2']) ]
, multimod_compile_and_run
, [ 'Main'
, '-O0 -package dph-lifted-copy -package dph-prim-par'])
, '-O0 -fno-vectorisation-avoidance -package dph-lifted-copy -package dph-prim-par'])
......@@ -8,7 +8,7 @@ test ('dph-quickhull-copy-opt'
, only_ways(['normal', 'threaded1', 'threaded2']) ]
, multimod_compile_and_run
, [ 'Main'
, '-Odph -funfolding-use-threshold30 -package dph-lifted-copy -package dph-prim-par'])
, '-Odph -fno-vectorisation-avoidance -funfolding-use-threshold30 -package dph-lifted-copy -package dph-prim-par'])
test ('dph-quickhull-vseg-opt'
......@@ -30,7 +30,7 @@ test ('dph-quickhull-copy-fast'
, only_ways(['normal', 'threaded1', 'threaded2']) ]
, multimod_compile_and_run
, [ 'Main'
, '-O0 -package dph-lifted-copy -package dph-prim-par'])
, '-O0 -fno-vectorisation-avoidance -package dph-lifted-copy -package dph-prim-par'])
test ('dph-quickhull-vseg-fast'
......
......@@ -107,6 +107,7 @@ flattenState ss
-- | Break up an array of chars into words then flatten it back.
wordsOfPArray :: PArray Word8 -> PArray Word8
{-# NOINLINE wordsOfPArray #-}
wordsOfPArray arr
= let str = fromPArrayP arr
state = stateOfString str
......@@ -116,6 +117,7 @@ wordsOfPArray arr
-- | Count the number of words in an array
wordCountOfPArray :: PArray Word8 -> Int
{-# NOINLINE wordCountOfPArray #-}
wordCountOfPArray arr
= let str = fromPArrayP arr
state = stateOfString str
......
......@@ -17,6 +17,7 @@ OBJSUFFIX = .o
# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS = $(filter-out -rtsopts,$(TEST_HC_OPTS_NO_RECOMP))
# -----------------------------------------------------------------------------
# One-shot compilations, non-hierarchical modules
......@@ -435,7 +436,7 @@ mode001:
# Test for building DLLs with ghc -shared, see #2745
shared001:
$(RM) Shared001.hi Shared001.o HSdll.dll.a HSdll.dll Shared001_stub.*
"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 -shared Shared001.hs
"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS) -v0 -shared Shared001.hs
# -----------------------------------------------------------------------------
......
......@@ -6,6 +6,7 @@ test('dynamicToo001',
'A001.dyn_o', 'B001.dyn_o', 'C001.dyn_o',
'A001.dyn_hi', 'B001.dyn_hi', 'C001.dyn_hi',
's001', 'd001']),
if_os('mingw32', expect_broken(7665)),
unless_have_vanilla(skip),
unless_have_dynamic(skip)],
run_command,
......
def ffi( opts ):
def ffi( name, opts ):
opts.extra_hc_opts = '-XForeignFunctionInterface -optc-Wno-implicit'
setTestOpts(ffi)
......
......@@ -13,7 +13,7 @@ test('fed001', compose(only_compiler_types(['ghc']),
test('ffi001', omit_ways(['ghci']), compile_and_run, [''])
test('ffi002', [ omit_ways(['ghci']),
extra_clean(['ffi002_c.o']),
compile_cmd_prefix('$MAKE ffi002_setup && ') ],
pre_cmd('$MAKE -s --no-print-directory ffi002_setup') ],
# The ffi002_setup hack is to ensure that we generate
# ffi002_stub.h before compiling ffi002_c.c, which
# needs it.
......@@ -109,7 +109,7 @@ test('ffi018', [ omit_ways(['ghci']), extra_clean(['ffi018_c.o']) ],
compile_and_run, ['ffi018_c.c'])
test('ffi018_ghci', [ only_ways(['ghci']),
cmd_prefix('$MAKE ffi018_ghci_setup && '),
pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup'),
extra_clean(['ffi018_ghci_c.o']) ],
compile_and_run, ['ffi018_ghci_c.o'])
......@@ -122,7 +122,7 @@ test('T1288', [ omit_ways(['ghci']),
extra_clean(['T1288_c.o']) ],
compile_and_run, ['T1288_c.c'])
test('T1288_ghci', [ only_ways(['ghci']),
cmd_prefix('$MAKE --no-print-directory T1288_ghci_setup && '),
pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup'),
extra_clean(['T1288_ghci_c.o']) ],
compile_and_run, ['T1288_ghci_c.o'])
......@@ -130,7 +130,7 @@ test('T2276', [ omit_ways(['ghci']),
extra_clean(['T2276_c.o']) ],
compile_and_run, ['T2276_c.c'])
test('T2276_ghci', [ only_ways(['ghci']),
cmd_prefix('$MAKE --no-print-directory T2276_ghci_setup && '),
pre_cmd('$MAKE -s --no-print-directory T2276_ghci_setup'),
extra_clean(['T2276_ghci_c.o']) ],
compile_and_run, ['-fobject-code T2276_ghci_c.o'])
......@@ -177,12 +177,12 @@ test('T5402', [ omit_ways(['ghci']),
# The T5402_setup hack is to ensure that we generate
# T5402_stub.h before compiling T5402_main.c, which
# needs it.
compile_cmd_prefix('$MAKE --no-print-directory T5402_setup && ') ],
pre_cmd('$MAKE -s --no-print-directory T5402_setup') ],
compile_and_run, ["-no-hs-main T5402_main.c"])
test('T5594', [ omit_ways(['ghci']),
extra_clean(['T5594_c.o']),
compile_cmd_prefix('$MAKE --no-print-directory T5594_setup && ') ],
pre_cmd('$MAKE -s --no-print-directory T5594_setup') ],
# The T5594_setup hack is to ensure that we generate
# T5594_stub.h before compiling T5594_c.c, which
# needs it.
......
......@@ -10,7 +10,7 @@ data Hidden = forall t . Hidden (ExpGADT t) (ExpGADT t)
hval = Hidden (ExpInt 0) (ExpInt 1)
-- With the type sig this is ok, but without it maybe
-- should be rejected becuase the result type is wobbly
-- should be rejected because the result type is wobbly
-- weird1 :: ExpGADT Int
--
-- And indeed it is rejected by GHC 7.8 because OutsideIn
......
Supports Markdown
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