Commit 50cfc63e authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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

parents 65b9cf74 e315f361
......@@ -269,9 +269,6 @@ def _stats_num_field( name, opts, field, expecteds ):
(expected, dev) = expecteds
opts.stats_range_fields[field] = (expected, dev)
def stats_range_field( field, expected, dev ):
return stats_num_field( field, [(True, expected, dev)] )
def compiler_stats_num_field( field, expecteds ):
return lambda name, opts, f=field, e=expecteds: _compiler_stats_num_field(name, opts, f, e);
......@@ -286,9 +283,6 @@ def _compiler_stats_num_field( name, opts, field, expecteds ):
framework_fail(name, 'numfield-no-expected', 'No expected value found for ' + field + ' in num_field check')
def compiler_stats_range_field( field, expected, dev ):
return compiler_stats_num_field( field, [(True, expected, dev)] )
# -----
def skip_if_no_ghci(name, opts):
......@@ -312,17 +306,8 @@ def when(b, f):
def unless(b, f):
return when(not b, f)
def if_platform( plat, f ):
if config.platform == plat:
return f
else:
return normal
def unless_platform( plat, f ):
if config.platform != plat:
return f
else:
return normal
def platform( plat ):
return config.platform == plat
def if_os( os, f ):
if config.os == os:
......
test('memcpy',
unless_platform('x86_64-unknown-linux',skip), compile_cmp_asm, [''])
unless(platform('x86_64-unknown-linux'),skip), compile_cmp_asm, [''])
test('memcpy-unroll',
unless_platform('x86_64-unknown-linux',skip), compile_cmp_asm, [''])
unless(platform('x86_64-unknown-linux'),skip), compile_cmp_asm, [''])
test('memcpy-unroll-conprop',
unless_platform('x86_64-unknown-linux',skip), compile_cmp_asm, [''])
unless(platform('x86_64-unknown-linux'),skip), compile_cmp_asm, [''])
......@@ -33,7 +33,7 @@ test('ffi004', skip, compile_and_run, [''])
#
test('ffi005', [ omit_ways(prof_ways),
if_arch('i386', skip),
if_platform('i386-apple-darwin', expect_broken(4105)),
when(platform('i386-apple-darwin'), expect_broken(4105)),
exit_code(3) ],
compile_and_run, [''])
......
......@@ -38,7 +38,7 @@ test('ghci022', normal, ghci_script, ['ghci022.script'])
test('ghci023', normal, ghci_script, ['ghci023.script'])
test('ghci024',
[skip_if_fast,
if_platform("powerpc-apple-darwin", expect_broken(1845))],
when(platform("powerpc-apple-darwin"), expect_broken(1845))],
run_command,
['$MAKE -s --no-print-directory ghci024'])
test('ghci025', normal, ghci_script, ['ghci025.script'])
......
......@@ -7,7 +7,7 @@ test('arith001', normal, compile_and_run, [''])
test('arith002', normal, compile_and_run, [''])
test('arith003', normal, compile_and_run, [''])
test('arith004', normal, compile_and_run, [''])
test('arith005', if_platform('i386-apple-darwin', expect_broken_for(7043, 'ghci')), compile_and_run, [''])
test('arith005', when(platform('i386-apple-darwin'), expect_broken_for(7043, 'ghci')), compile_and_run, [''])
test('arith006', normal, compile_and_run, [''])
test('arith007', normal, compile_and_run, [''])
......
This diff is collapsed.
test('haddock.base',
[unless_in_tree_compiler(skip)
,when(wordsize(64),
stats_range_field('peak_megabytes_allocated', 274, 10))
# 2012-08-14: 240 (amd64/Linux)
# 2012-09-18: 237 (amd64/Linux)
# 2012-11-12: 249 (amd64/Linux)
# 2013-01-29: 274 (amd64/Linux)
,when(wordsize(32),
stats_range_field('peak_megabytes_allocated', 113, 1))
# 2012-08-14: 144 (x86/OSX)
# 2012-10-30: 113 (x86/Windows)
,when(wordsize(64),
stats_range_field('max_bytes_used', 96022312, 10))
# 2012-08-14: 87374568 (amd64/Linux)
# 2012-08-21: 86428216 (amd64/Linux)
# 2012-09-20: 84794136 (amd64/Linux)
# 2012-11-12: 87265136 (amd64/Linux)
# 2013-01-29: 96022312 (amd64/Linux)
,when(wordsize(32),
stats_range_field('max_bytes_used', 45574928, 1))
# 2012-08-14: 45574928 (x86/OSX)
,when(wordsize(64),
stats_range_field('bytes allocated', 6064874536, 2))
# 2012-08-14: 5920822352 (amd64/Linux)
# 2012-09-20: 5829972376 (amd64/Linux)
# 2012-10-08: 5902601224 (amd64/Linux)
# 2013-01-17: 6064874536 (x86_64/Linux)
,when(wordsize(32),
stats_range_field('bytes allocated', 2955470952, 1))
# 2012-08-14: 3046487920 (x86/OSX)
# 2012-10-30: 2955470952 (x86/Windows)
,stats_num_field('peak_megabytes_allocated',
[(wordsize(64), 274, 10)
# 2012-08-14: 240 (amd64/Linux)
# 2012-09-18: 237 (amd64/Linux)
# 2012-11-12: 249 (amd64/Linux)
# 2013-01-29: 274 (amd64/Linux)
,(wordsize(32), 113, 1)])
# 2012-08-14: 144 (x86/OSX)
# 2012-10-30: 113 (x86/Windows)
,stats_num_field('max_bytes_used',
[(wordsize(64), 96022312, 10)
# 2012-08-14: 87374568 (amd64/Linux)
# 2012-08-21: 86428216 (amd64/Linux)
# 2012-09-20: 84794136 (amd64/Linux)
# 2012-11-12: 87265136 (amd64/Linux)
# 2013-01-29: 96022312 (amd64/Linux)
,(wordsize(32), 45574928, 1)])
# 2012-08-14: 45574928 (x86/OSX)
,stats_num_field('bytes allocated',
[(wordsize(64), 6064874536, 2)
# 2012-08-14: 5920822352 (amd64/Linux)
# 2012-09-20: 5829972376 (amd64/Linux)
# 2012-10-08: 5902601224 (amd64/Linux)
# 2013-01-17: 6064874536 (x86_64/Linux)
,(wordsize(32), 2955470952, 1)])
# 2012-08-14: 3046487920 (x86/OSX)
# 2012-10-30: 2955470952 (x86/Windows)
],
stats,
['../../../../libraries/base/dist-install/doc/html/base/base.haddock.t'])
test('haddock.Cabal',
[unless_in_tree_compiler(skip)
,when(wordsize(64),
stats_range_field('peak_megabytes_allocated', 217, 10))
# 2012-08-14: 202 (amd64/Linux)
# 2012-08-29: 211 (amd64/Linux, new codegen)
# 2012-09-20: 227 (amd64/Linux)
# 2012-10-08: 217 (amd64/Linux)
,when(wordsize(32),
stats_range_field('peak_megabytes_allocated', 83, 1))
# 2012-08-14: 116 (x86/OSX)
# 2012-10-30: 83 (x86/Windows)
,when(wordsize(64),
stats_range_field('max_bytes_used', 80590280, 15))
# 2012-08-14: 74119424 (amd64/Linux)
# 2012-08-29: 77992512 (amd64/Linux, new codegen)
# 2012-10-02: 91341568 (amd64/Linux)
# 2012-10-08: 80590280 (amd64/Linux)
,when(wordsize(32),
stats_range_field('max_bytes_used', 44224896, 5))
# 2012-08-14: 47461532 (x86/OSX)
# 2012-10-30: 44224896 (x86/Windows insreased range to 5%)
,when(wordsize(64),
stats_range_field('bytes allocated', 3373401360, 2))
# 2012-08-14: 3255435248 (amd64/Linux)
# 2012-08-29: 3324606664 (amd64/Linux, new codegen)
# 2012-10-08: 3373401360 (amd64/Linux)
,when(wordsize(32),
stats_range_field('bytes allocated', 1733638168, 1))
# 2012-08-14: 1648610180 (x86/OSX)
# 2012-10-30: 1733638168 (x86/Windows)
,stats_num_field('peak_megabytes_allocated',
[(wordsize(64), 217, 10)
# 2012-08-14: 202 (amd64/Linux)
# 2012-08-29: 211 (amd64/Linux, new codegen)
# 2012-09-20: 227 (amd64/Linux)
# 2012-10-08: 217 (amd64/Linux)
,(wordsize(32), 83, 1)])
# 2012-08-14: 116 (x86/OSX)
# 2012-10-30: 83 (x86/Windows)
,stats_num_field('max_bytes_used',
[(wordsize(64), 80590280, 15)
# 2012-08-14: 74119424 (amd64/Linux)
# 2012-08-29: 77992512 (amd64/Linux, new codegen)
# 2012-10-02: 91341568 (amd64/Linux)
# 2012-10-08: 80590280 (amd64/Linux)
,(wordsize(32), 44224896, 5)])
# 2012-08-14: 47461532 (x86/OSX)
# 2012-10-30: 44224896 (x86/Windows insreased range to 5%)
,stats_num_field('bytes allocated',
[(wordsize(64), 3373401360, 2)
# 2012-08-14: 3255435248 (amd64/Linux)
# 2012-08-29: 3324606664 (amd64/Linux, new codegen)
# 2012-10-08: 3373401360 (amd64/Linux)
,(wordsize(32), 1733638168, 1)])
# 2012-08-14: 1648610180 (x86/OSX)
# 2012-10-30: 1733638168 (x86/Windows)
],
stats,
['../../../../libraries/Cabal/Cabal/dist-install/doc/html/Cabal/Cabal.haddock.t'])
test('haddock.compiler',
[unless_in_tree_compiler(skip)
,when(wordsize(64),
stats_range_field('peak_megabytes_allocated', 1240, 10))
# 2012-08-14: 1203 (amd64/Linux)
# 2012-08-21: 1199 (amd64/Linux)
# 2012-09-20: 1228 (amd64/Linux)
# 2012-10-08: 1240 (amd64/Linux)
,when(wordsize(32),
stats_range_field('peak_megabytes_allocated', 606, 1))
# 2012-08-14: 631 (x86/OSX)
# 2012-10-30: 606 (x86/Windows)
,when(wordsize(64),
stats_range_field('max_bytes_used', 420105120, 10))
# 2012-08-14: 428775544 (amd64/Linux)
# 2012-09-20: 437618008 (amd64/Linux)
# 2012-10-08: 442768280 (amd64/Linux)
# 2012-11-12: 420105120 (amd64/Linux)
,when(wordsize(32),
stats_range_field('max_bytes_used', 220847924, 1))
# 2012-08-14: 231064920 (x86/OSX)
# 2012-10-30: 220847924 (x86/Windows)
,when(wordsize(64),
stats_range_field('bytes allocated', 25990254632, 10))
# 2012-08-14: 26,070,600,504 (amd64/Linux)
# 2012-08-29: 26,353,100,288 (amd64/Linux, new CG)
# 2012-09-18: 26,882,813,032 (amd64/Linux)
# 2012-11-12: 25,990,254,632 (amd64/Linux)
,when(wordsize(32),
stats_range_field('bytes allocated', 13773051312, 1))
# 2012-08-14: 13471797488 (x86/OSX)
# 2012-10-30: 13773051312 (x86/Windows)
,stats_num_field('peak_megabytes_allocated',
[(wordsize(64), 1240, 10)
# 2012-08-14: 1203 (amd64/Linux)
# 2012-08-21: 1199 (amd64/Linux)
# 2012-09-20: 1228 (amd64/Linux)
# 2012-10-08: 1240 (amd64/Linux)
,(wordsize(32), 606, 1)])
# 2012-08-14: 631 (x86/OSX)
# 2012-10-30: 606 (x86/Windows)
,stats_num_field('max_bytes_used',
[(wordsize(64), 420105120, 10)
# 2012-08-14: 428775544 (amd64/Linux)
# 2012-09-20: 437618008 (amd64/Linux)
# 2012-10-08: 442768280 (amd64/Linux)
# 2012-11-12: 420105120 (amd64/Linux)
,(wordsize(32), 220847924, 1)])
# 2012-08-14: 231064920 (x86/OSX)
# 2012-10-30: 220847924 (x86/Windows)
,stats_num_field('bytes allocated',
[(wordsize(64), 25990254632, 10)
# 2012-08-14: 26070600504 (amd64/Linux)
# 2012-08-29: 26353100288 (amd64/Linux, new CG)
# 2012-09-18: 26882813032 (amd64/Linux)
# 2012-11-12: 25990254632 (amd64/Linux)
,(wordsize(32), 13773051312, 1)])
# 2012-08-14: 13471797488 (x86/OSX)
# 2012-10-30: 13773051312 (x86/Windows)
],
stats,
['../../../../compiler/stage2/doc/html/ghc/ghc.haddock.t'])
......
......@@ -4,17 +4,17 @@ test('space_leak_001',
# Now it's: 3 (amd64/Linux)
# 4 (x86/OS X)
# 5 (x86/Linux)
[stats_range_field('peak_megabytes_allocated', 4, 1),
stats_range_field('max_bytes_used', 440000, 10),
# expected value: 440224 (amd64/Linux)
# 417016 (x86/OS X)
# 415672 (x86/Windows)
# 481456 (unreg amd64/Linux)
stats_range_field('bytes allocated', 9079316016, 1),
# expected value: 9079316016 (amd64/Linux)
# 9331570416 (x86/Linux)
# 9329073952 (x86/OS X)
# 9327959840 (x86/Windows)
[stats_num_field('peak_megabytes_allocated', (4, 1)),
stats_num_field('max_bytes_used', (440000, 10)),
# expected value: 440224 (amd64/Linux)
# 417016 (x86/OS X)
# 415672 (x86/Windows)
# 481456 (unreg amd64/Linux)
stats_num_field('bytes allocated', (9079316016, 1)),
# expected value: 9079316016 (amd64/Linux)
# 9331570416 (x86/Linux)
# 9329073952 (x86/OS X)
# 9327959840 (x86/Windows)
omit_ways(['profasm','profthreaded','threaded1','threaded2'])
],
compile_and_run,
......@@ -23,7 +23,7 @@ test('space_leak_001',
test('T4334',
# Test for a space leak in Data.List.lines (fixed with #4334)
[extra_run_opts('1000000 2 t'),
stats_range_field('peak_megabytes_allocated', 2, 0),
stats_num_field('peak_megabytes_allocated', (2, 0)),
# prof ways don't work well with +RTS -V0
omit_ways(['profasm','profthreaded'])
],
......@@ -32,7 +32,7 @@ test('T4334',
test('T2762',
[# peak_megabytes_allocated is 2 with 7.0.2.
# Was 57 with 6.12.3.
stats_range_field('peak_megabytes_allocated', 2, 0),
stats_num_field('peak_megabytes_allocated', (2, 0)),
only_ways(['normal']),
extra_clean(['T2762A.hi', 'T2762A.o'])],
compile_and_run, ['-O'])
......
......@@ -9,7 +9,7 @@ test('testblockalloc', compose(c_src,
test('bug1010', normal, compile_and_run, ['+RTS -c -RTS'])
test('derefnull',
composes([
if_platform('x86_64-unknown-mingw32', expect_broken(6079)),
when(platform('x86_64-unknown-mingw32'), expect_broken(6079)),
# LLVM Optimiser considers dereference of a null pointer
# undefined and marks the code as unreachable which means
# that later optimisations remove it altogether.
......@@ -21,13 +21,13 @@ test('derefnull',
# the right exit code we're OK.
if_os('linux', ignore_output),
# SIGBUS on OX X (PPC and x86 only; amd64 gives SEGV)
if_platform('i386-apple-darwin', exit_code(138)),
if_platform('powerpc-apple-darwin', exit_code(138)),
when(platform('i386-apple-darwin'), exit_code(138)),
when(platform('powerpc-apple-darwin'), exit_code(138)),
if_os('mingw32', exit_code(1))]),
compile_and_run, [''])
test('divbyzero',
composes([
if_platform('x86_64-unknown-mingw32', expect_broken(6079)),
when(platform('x86_64-unknown-mingw32'), expect_broken(6079)),
# SIGFPE on Linux
exit_code(136),
# Apparently the output can be different on different
......@@ -121,8 +121,8 @@ def config_T5250(name, opts):
test('T5250', [ config_T5250,
# stack ptr is not 16-byte aligned on 32-bit Windows
if_platform('i386-unknown-mingw32', expect_fail),
if_platform('i386-unknown-linux',
when(platform('i386-unknown-mingw32'), expect_fail),
when(platform('i386-unknown-linux'),
expect_broken_for(4211,['llvm'])),
extra_clean(['spalign.o']),
omit_ways(['ghci']) ],
......
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