summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-02-08 17:30:46 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2013-02-08 17:30:46 +0000
commit50cfc63edc4358de01cb9fff29a1019bdb654cce (patch)
treeb88bb366473964cc139330b9e33f9aa46e060ceb /testsuite/tests
parent65b9cf744afb4e4d0020a177d87c9cd96162cc54 (diff)
parente315f36195d3c1a3003fe68e54fa769b4be15f69 (diff)
downloadhaskell-50cfc63edc4358de01cb9fff29a1019bdb654cce.tar.gz
Merge branch 'master' of http://darcs.haskell.org/testsuite
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/codeGen/should_gen_asm/all.T6
-rw-r--r--testsuite/tests/ffi/should_run/all.T2
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T2
-rw-r--r--testsuite/tests/numeric/should_run/all.T2
-rw-r--r--testsuite/tests/perf/compiler/all.T381
-rw-r--r--testsuite/tests/perf/haddock/all.T169
-rw-r--r--testsuite/tests/perf/space_leaks/all.T26
-rw-r--r--testsuite/tests/rts/all.T12
8 files changed, 282 insertions, 318 deletions
diff --git a/testsuite/tests/codeGen/should_gen_asm/all.T b/testsuite/tests/codeGen/should_gen_asm/all.T
index a24ae311b9..be30d5fe10 100644
--- a/testsuite/tests/codeGen/should_gen_asm/all.T
+++ b/testsuite/tests/codeGen/should_gen_asm/all.T
@@ -1,6 +1,6 @@
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, [''])
diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T
index 1811f42af9..09e69447ef 100644
--- a/testsuite/tests/ffi/should_run/all.T
+++ b/testsuite/tests/ffi/should_run/all.T
@@ -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, [''])
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index f204af76db..0b8f62e99f 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -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'])
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index b2109de9eb..d2f017a1fe 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -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, [''])
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 09a02975a2..20b755bbe2 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -6,55 +6,52 @@ setTestOpts(no_lint)
test('T1969',
- [when(wordsize(32),
- compiler_stats_range_field('peak_megabytes_allocated', 18, 1)),
- # expected value: 14 (x86/Windows 17/05/10)
- # 15 (x86/OS X)
- # 19 (x86/OS X)
- when(wordsize(64),
- compiler_stats_range_field('peak_megabytes_allocated', 25, 1)),
- # expected value: 28 (amd64/Linux)
- # expected value: 34 (amd64/Linux)
- # 2012-09-20 23 (amd64/Linux)
- # 2012-10-03 25 (amd64/Linux if .hi exists)
- when(wordsize(32),
- compiler_stats_range_field('max_bytes_used', 6149572, 5)),
- # expected value: 6707308 (x86/OS X)
- # 5717704 (x86/Windows 17/05/10)
- # 6149572 (x86/Linux, 31/12/09)
- when(wordsize(64),
- compiler_stats_range_field('max_bytes_used', 9000000, 20)),
- # looks like the peak is around 10M, but we're
- # unlikely to GC exactly on the peak.
- # varies quite a lot with CLEANUP and BINDIST,
- # hence 10% range.
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 303930948, 5)),
- # expected value: 215582916 (x86/Windows)
- # 221667908 (x86/OS X)
- # 274932264 (x86/Linux)
- # 2012-10-08: 303930948 (x86/Linux, new codegen)
- # 2012-10-29: 298921816 (x86/Windows; increased range to 5%
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 658786936, 5)),
- # 17/11/2009: 434,845,560 (amd64/Linux)
- # 08/12/2009: 459,776,680 (amd64/Linux)
- # 17/05/2010: 519,377,728 (amd64/Linux)
- # 05/08/2011: 561,382,568 (amd64/OS X)
- # 16/07/2012: 589,168,872 (amd64/Linux)
- # 20/07/2012: 595,936,240 (amd64/Linux)
- # 23/08/2012: 606,230,880 (amd64/Linux)
- # 29/08/2012: 633,334,184 (amd64/Linux)
- # (^ new codegen)
- # 18/09/2012: 641,959,976 (amd64/Linux)
- # 19/10/2012: 661,832,592 (amd64/Linux)
- # (^ -fPIC turned on)
- # 23/10/2012: 642,594,312 (amd64/Linux)
- # (^ -fPIC turned off again)
- # 12/11/2012: 658,786,936 (amd64/Linux)
- # ( UNKNOWN REASON )
- # 17/1/13: 667,160,192 (x86_64/Linux)
- # (new demand analyser)
+ [compiler_stats_num_field('peak_megabytes_allocated',
+ [(wordsize(32), 18, 1),
+ # expected value: 14 (x86/Windows 17/05/10)
+ # 15 (x86/OS X)
+ # 19 (x86/OS X)
+ (wordsize(64), 25, 1)]),
+ # expected value: 28 (amd64/Linux)
+ # expected value: 34 (amd64/Linux)
+ # 2012-09-20 23 (amd64/Linux)
+ # 2012-10-03 25 (amd64/Linux if .hi exists)
+ compiler_stats_num_field('max_bytes_used',
+ [(wordsize(32), 6149572, 5),
+ # expected value: 6707308 (x86/OS X)
+ # 5717704 (x86/Windows 17/05/10)
+ # 6149572 (x86/Linux, 31/12/09)
+ (wordsize(64), 9000000, 20)]),
+ # looks like the peak is around 10M, but we're
+ # unlikely to GC exactly on the peak.
+ # varies quite a lot with CLEANUP and BINDIST,
+ # hence 10% range.
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 303930948, 5),
+ # expected value: 215582916 (x86/Windows)
+ # 221667908 (x86/OS X)
+ # 274932264 (x86/Linux)
+ # 2012-10-08: 303930948 (x86/Linux, new codegen)
+ # 2012-10-29: 298921816 (x86/Windows; increased range to 5%
+ (wordsize(64), 658786936, 5)]),
+ # 17/11/2009: 434845560 (amd64/Linux)
+ # 08/12/2009: 459776680 (amd64/Linux)
+ # 17/05/2010: 519377728 (amd64/Linux)
+ # 05/08/2011: 561382568 (amd64/OS X)
+ # 16/07/2012: 589168872 (amd64/Linux)
+ # 20/07/2012: 595936240 (amd64/Linux)
+ # 23/08/2012: 606230880 (amd64/Linux)
+ # 29/08/2012: 633334184 (amd64/Linux)
+ # (^ new codegen)
+ # 18/09/2012: 641959976 (amd64/Linux)
+ # 19/10/2012: 661832592 (amd64/Linux)
+ # (^ -fPIC turned on)
+ # 23/10/2012: 642594312 (amd64/Linux)
+ # (^ -fPIC turned off again)
+ # 12/11/2012: 658786936 (amd64/Linux)
+ # ( UNKNOWN REASON )
+ # 17/1/13: 667160192 (x86_64/Linux)
+ # (new demand analyser)
only_ways(['normal']),
extra_hc_opts('-dcore-lint -static')
@@ -77,28 +74,27 @@ else:
conf_3294 = skip
test('T3294',
- [when(wordsize(32),
- compiler_stats_range_field('max_bytes_used', 17725476, 5)),
- # expected value: 17725476 (x86/OS X)
- # 14593500 (Windows)
- when(wordsize(64),
- compiler_stats_range_field('max_bytes_used', 44894544, 15)),
- # prev: 25753192 (amd64/Linux)
- # 29/08/2012: 37724352 (amd64/Linux)
- # (increase due to new codegen, see #7198)
- # 13/13/2012: 44894544 (amd64/Linux)
- # (reason for increase unknown)
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 1373514844, 5)),
- # previous: 815479800 (x86/Linux)
- # (^ increase due to new codegen, see #7198)
- # 2012-10-08: 1373514844 (x86/Linux)
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 2717327208, 5)),
- # old: 1,357,587,088 (amd64/Linux)
- # 29/08/2012: 2,961,778,696 (amd64/Linux)
- # (^ increase due to new codegen, see #7198)
- # 18/09/2012: 2,717,327,208 (amd64/Linux)
+ [
+ compiler_stats_num_field('max_bytes_used',
+ [(wordsize(32), 17725476, 5),
+ # expected value: 17725476 (x86/OS X)
+ # 14593500 (Windows)
+ (wordsize(64), 44894544, 15)]),
+ # prev: 25753192 (amd64/Linux)
+ # 29/08/2012: 37724352 (amd64/Linux)
+ # (increase due to new codegen, see #7198)
+ # 13/13/2012: 44894544 (amd64/Linux)
+ # (reason for increase unknown)
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 1373514844, 5),
+ # previous: 815479800 (x86/Linux)
+ # (^ increase due to new codegen, see #7198)
+ # 2012-10-08: 1373514844 (x86/Linux)
+ (wordsize(64), 2717327208, 5)]),
+ # old: 1357587088 (amd64/Linux)
+ # 29/08/2012: 2961778696 (amd64/Linux)
+ # (^ increase due to new codegen, see #7198)
+ # 18/09/2012: 2717327208 (amd64/Linux)
conf_3294
],
compile,
@@ -107,45 +103,40 @@ test('T3294',
test('T4801',
[ # expect_broken(5224),
# temporarily unbroken (#5227)
- when(wordsize(32),
- compiler_stats_range_field('peak_megabytes_allocated', 30, 20)),
-
- when(wordsize(64),
- compiler_stats_range_field('peak_megabytes_allocated', 49, 20)),
- # prev: 50 (amd64/Linux)
- # 19/10/2012: 64 (amd64/Linux) (REASON UNKNOWN!)
- # 12/11/2012: 49 (amd64/Linux) (REASON UNKNOWN!)
-
- # expected value: 58 (amd64/OS X):
- if_platform('x86_64-apple-darwin',
- compiler_stats_range_field('peak_megabytes_allocated', 58, 1)),
- # expected value: 228286660 (x86/OS X)
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 185669232, 10)),
-
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 392409984, 10)),
- # prev: 360243576 (amd64/Linux)
- # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on)
- # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off)
-
- # expected value: 510938976 (amd64/OS X):
- if_platform('x86_64-apple-darwin',
- compiler_stats_range_field('bytes allocated', 510938976, 5)),
-
- when(wordsize(32),
- compiler_stats_range_field('max_bytes_used', 9651948, 5)),
+ compiler_stats_num_field('peak_megabytes_allocated',
+ [(platform('x86_64-apple-darwin'), 58, 1),
+ # expected value: 58 (amd64/OS X)
+ (wordsize(32), 30, 20),
+ (wordsize(64), 49, 20)]),
+ # prev: 50 (amd64/Linux)
+ # 19/10/2012: 64 (amd64/Linux)
+ # (REASON UNKNOWN!)
+ # 12/11/2012: 49 (amd64/Linux)
+ # (REASON UNKNOWN!)
+
+ compiler_stats_num_field('bytes allocated',
+ [(platform('x86_64-apple-darwin'), 510938976, 5),
+ # expected value: 510938976 (amd64/OS X):
+
+ (wordsize(32), 185669232, 10),
+ # expected value: 228286660 (x86/OS X)
+
+ (wordsize(64), 392409984, 10)]),
+ # prev: 360243576 (amd64/Linux)
+ # 19/10/2012: 447190832 (amd64/Linux) (-fPIC turned on)
+ # 19/10/2012: 392409984 (amd64/Linux) (-fPIC turned off)
+
+ compiler_stats_num_field('max_bytes_used',
+ [(platform('x86_64-apple-darwin'), 21657520, 5),
+ (wordsize(32), 9651948, 5),
# expected value: x86/OS X: 9651948
# expected value: 10290952 (windows)
- when(wordsize(64),
- compiler_stats_range_field('max_bytes_used', 21657520, 15)),
+ (wordsize(64), 21657520, 15)]),
# prev: 20486256 (amd64/OS X)
# 30/08/2012: 17305600--20391920 (varies a lot)
# 19/10/2012: 26882576 (-fPIC turned on)
# 19/10/2012: 18619912 (-fPIC turned off)
# 24/12/2012: 21657520 (perhaps gc sampling time wibbles?)
- if_platform('x86_64-apple-darwin',
- compiler_stats_range_field('max_bytes_used', 21657520, 5)),
only_ways(['normal']),
extra_hc_opts('-static')
],
@@ -154,34 +145,27 @@ test('T4801',
test('T3064',
[# expect_broken( 3064 ),
- # expected value: 14 (x86/Linux 28-06-2012):
- when(wordsize(32),
- compiler_stats_range_field('peak_megabytes_allocated', 14, 1)),
-
- when(wordsize(64),
- compiler_stats_range_field('peak_megabytes_allocated', 26, 1)),
- # (amd64/Linux): 18
- # (amd64/Linux) 2012-02-07: 26
-
- # expected value: 56380288 (x86/Linux) (28/6/2011)
- # 111189536 (x86/Windows) (30/10/12)
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 111189536, 10)),
-
-
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 224798696, 5)),
- # (amd64/Linux) (28/06/2011): 73259544
- # (amd64/Linux) (07/02/2013): 224798696
-
- # expected value: 2247016 (x86/Linux) (28/6/2011):
- when(wordsize(32),
- compiler_stats_range_field('max_bytes_used', 5511604, 20)),
-
- when(wordsize(64),
- compiler_stats_range_field('max_bytes_used', 9819288, 5)),
- # (amd64/Linux, intree) (28/06/2011): 4032024
- # (amd64/Linux, intree) (07/02/2013): 9819288
+ compiler_stats_num_field('peak_megabytes_allocated',
+ [(wordsize(32), 14, 1),
+ # expected value: 14 (x86/Linux 28-06-2012):
+ (wordsize(64), 26, 1)]),
+ # (amd64/Linux): 18
+ # (amd64/Linux) 2012-02-07: 26
+
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 111189536, 10),
+ # expected value: 56380288 (x86/Linux) (28/6/2011)
+ # 111189536 (x86/Windows) (30/10/12)
+ (wordsize(64), 224798696, 5)]),
+ # (amd64/Linux) (28/06/2011): 73259544
+ # (amd64/Linux) (07/02/2013): 224798696
+
+ compiler_stats_num_field('max_bytes_used',
+ [(wordsize(32), 5511604, 20),
+ # expected value: 2247016 (x86/Linux) (28/6/2011):
+ (wordsize(64), 9819288, 5)]),
+ # (amd64/Linux, intree) (28/06/2011): 4032024
+ # (amd64/Linux, intree) (07/02/2013): 9819288
only_ways(['normal'])
],
compile,
@@ -193,17 +177,14 @@ test('T4007',
['$MAKE -s --no-print-directory T4007'])
test('T5030',
- [
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 259547660, 10)),
- # previous: 196457520
- # 2012-10-08: 259547660 (x86/Linux, new codegen)
-
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 602993184, 10)),
- # Previously 530000000 (+/- 10%)
- # 17/1/13: 602,993,184 (x86_64/Linux)
- # (new demand analyser)
+ [compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 259547660, 10),
+ # previous: 196457520
+ # 2012-10-08: 259547660 (x86/Linux, new codegen)
+ (wordsize(64), 602993184, 10)]),
+ # Previously 530000000 (+/- 10%)
+ # 17/1/13: 602993184 (x86_64/Linux)
+ # (new demand analyser)
only_ways(['normal'])
],
@@ -211,23 +192,21 @@ test('T5030',
['-fcontext-stack=300'])
test('T5631',
- [when(wordsize(32), # sample from x86/Linux
- compiler_stats_range_field('bytes allocated', 392904228, 10)),
- # expected value: 774,595,008 (amd64/Linux):
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 774595008, 5)),
+ [compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 392904228, 10),
+ # expected value: 392904228 (x86/Linux)
+ (wordsize(64), 774595008, 5)]),
+ # expected value: 774595008 (amd64/Linux):
only_ways(['normal'])
],
compile,
[''])
test('parsing001',
- [# expected value: ?
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 274000576, 10)),
- # expected value: 587079016 (amd64/Linux):
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 587079016, 5)),
+ [compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 274000576, 10),
+ (wordsize(64), 587079016, 5)]),
+ # expected value: 587079016 (amd64/Linux)
only_ways(['normal']),
],
compile_fail, [''])
@@ -236,82 +215,76 @@ test('parsing001',
test('T783',
[ only_ways(['normal']), # no optimisation for this one
# expected value: 175,569,928 (x86/Linux)
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 226907420, 10)),
- # 2012-10-08: 226907420 (x86/Linux)
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 640324528, 10)),
- # prev: 349,263,216 (amd64/Linux)
- # 07/08/2012: 384,479,856 (amd64/Linux)
- # 29/08/2012: 436,927,840 (amd64/Linux)
- # 12/11/2012: 640,324,528 (amd64/Linux)
- # (OldCmm removed: not sure why this got worse, the
- # other perf tests remained about the same)
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 226907420, 10),
+ # 2012-10-08: 226907420 (x86/Linux)
+ (wordsize(64), 640324528, 10)]),
+ # prev: 349263216 (amd64/Linux)
+ # 07/08/2012: 384479856 (amd64/Linux)
+ # 29/08/2012: 436927840 (amd64/Linux)
+ # 12/11/2012: 640324528 (amd64/Linux)
+ # (OldCmm removed: not sure why this got worse, the
+ # other perf tests remained about the same)
extra_hc_opts('-static')
],
compile,[''])
test('T5321Fun',
[ only_ways(['normal']), # no optimisation for this one
- # sample from x86/Linux
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 344416344, 10)),
- # prev: 300000000
- # 2012-10-08: 344416344
- # (increase due to new codegen)
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 713385808, 10))
- # prev: 585,521,080
- # 29/08/2012: 713,385,808
- # (increase due to new codegen)
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 344416344, 10),
+ # prev: 300000000
+ # 2012-10-08: 344416344 x86/Linux
+ # (increase due to new codegen)
+ (wordsize(64), 713385808, 10)])
+ # prev: 585521080
+ # 29/08/2012: 713385808
+ # (increase due to new codegen)
],
compile,[''])
test('T5321FD',
[ only_ways(['normal']), # no optimisation for this one
- when(wordsize(32),
- compiler_stats_range_field('bytes allocated', 240302920, 10)),
- # prev: 213380256
- # 2012-10-08: 240302920 (x86/Linux)
- # (increase due to new codegen)
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 492905640, 10))
- # prev: 418,306,336
- # 29/08/2012: 492,905,640
- # (increase due to new codegen)
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 240302920, 10),
+ # prev: 213380256
+ # 2012-10-08: 240302920 (x86/Linux)
+ # (increase due to new codegen)
+ (wordsize(64), 492905640, 10)])
+ # prev: 418306336
+ # 29/08/2012: 492905640
+ # (increase due to new codegen)
],
compile,[''])
test('T5642',
[ only_ways(['normal']),
- when(wordsize(32), # sample from x86/Linux
- compiler_stats_range_field('bytes allocated', 650000000, 10)),
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 1300000000, 10))
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 650000000, 10),
+ # sample from x86/Linux
+ (wordsize(64), 1300000000, 10)])
],
compile,['-O'])
test('T5837',
[ only_ways(['normal']),
- when(wordsize(32), # sample from x86/Linux
- compiler_stats_range_field('bytes allocated', 40000000, 10)),
-
- # sample: 3926235424 (amd64/Linux, 15/2/2012)
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 81879216, 10))
- # 2012-10-02 81879216
- # 2012-09-20 87254264 amd64/Linux
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 40000000, 10),
+ # sample from x86/Linux
+ (wordsize(64), 81879216, 10)])
+ # sample: 3926235424 (amd64/Linux, 15/2/2012)
+ # 2012-10-02 81879216
+ # 2012-09-20 87254264 amd64/Linux
],
compile_fail,['-fcontext-stack=50'])
test('T6048',
[ only_ways(['optasm']),
- when(wordsize(32), # sample from x86/Linux
- compiler_stats_range_field('bytes allocated', 48887164, 10)),
- # prev: 38000000
- # 2012-10-08: 48887164 (x86/Linux)
- when(wordsize(64),
- compiler_stats_range_field('bytes allocated', 97247032, 10))
- # 18/09/2012 97247032 amd64/Linux
+ compiler_stats_num_field('bytes allocated',
+ [(wordsize(32), 48887164, 10),
+ # prev: 38000000 (x86/Linux)
+ # 2012-10-08: 48887164 (x86/Linux)
+ (wordsize(64), 97247032, 10)])
+ # 18/09/2012 97247032 amd64/Linux
],
compile,[''])
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index 14d972783d..a2ffd0be49 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -1,107 +1,98 @@
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'])
diff --git a/testsuite/tests/perf/space_leaks/all.T b/testsuite/tests/perf/space_leaks/all.T
index dcc1f08650..f3260c2eb2 100644
--- a/testsuite/tests/perf/space_leaks/all.T
+++ b/testsuite/tests/perf/space_leaks/all.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'])
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 05510e9ad1..380ce85c9e 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -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']) ],