[commit: testsuite] master: Switch some more tests to use the new helpers (9f66dc1)

Ian Lynagh igloo at earth.li
Fri Feb 8 15:19:15 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/9f66dc1c6af1359c552194fd6a03bf21bb4bc3c2

>---------------------------------------------------------------

commit 9f66dc1c6af1359c552194fd6a03bf21bb4bc3c2
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Feb 8 00:54:41 2013 +0000

    Switch some more tests to use the new helpers

>---------------------------------------------------------------

 tests/perf/compiler/all.T |   51 ++++++++++++++++++++------------------------
 1 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/tests/perf/compiler/all.T b/tests/perf/compiler/all.T
index 1ba4c15..83b458d 100644
--- a/tests/perf/compiler/all.T
+++ b/tests/perf/compiler/all.T
@@ -107,45 +107,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):
-      when(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):
-      when(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?)
-      when(platform('x86_64-apple-darwin'),
-          compiler_stats_range_field('max_bytes_used', 21657520, 5)),
        only_ways(['normal']),
        extra_hc_opts('-static')
       ],





More information about the ghc-commits mailing list