Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/6991bb9f96a8bc0b74fbf8989a7ca321c411d807 >--------------------------------------------------------------- commit 6991bb9f96a8bc0b74fbf8989a7ca321c411d807 Author: Ian Lynagh <[email protected]> Date: Tue Aug 14 18:06:35 2012 +0100 Add some haddock space usage tests >--------------------------------------------------------------- driver/testlib.py | 5 ++ .../should_compile => perf/haddock}/Makefile | 0 tests/perf/haddock/all.T | 49 ++++++++++++++++++++ 3 files changed, 54 insertions(+), 0 deletions(-) diff --git a/driver/testlib.py b/driver/testlib.py index 401053a..ed7cbf7 100644 --- a/driver/testlib.py +++ b/driver/testlib.py @@ -971,6 +971,11 @@ def multimod_compile_and_run( name, way, top_mod, extra_hc_opts ): def multi_compile_and_run( name, way, top_mod, extra_mods, extra_hc_opts ): return compile_and_run__( name, way, top_mod, extra_mods, extra_hc_opts) +def stats( name, way, stats_file ): + opts = getTestOpts() + return checkStats(stats_file, opts.stats_range_fields + , opts.stats_num_fields) + # ----------------------------------------------------------------------------- # Check -t stats info diff --git a/tests/annotations/should_compile/Makefile b/tests/perf/haddock/Makefile similarity index 100% copy from tests/annotations/should_compile/Makefile copy to tests/perf/haddock/Makefile diff --git a/tests/perf/haddock/all.T b/tests/perf/haddock/all.T new file mode 100644 index 0000000..a2e937d --- /dev/null +++ b/tests/perf/haddock/all.T @@ -0,0 +1,49 @@ + +test('haddock.base', + [unless_in_tree_compiler(skip) + ,if_wordsize(64, + stats_num_field('peak_megabytes_allocated', 239, + 241)) + # 2012-08-14: 240 (amd64/Linux) + ,if_wordsize(64, + stats_range_field('max_bytes_used', 87374568, 1)) + # 2012-08-14: 87374568 (amd64/Linux) + ,if_wordsize(64, + stats_range_field('bytes allocated', 5920822352, 1)) + # 2012-08-14: 5920822352 (amd64/Linux) + ], + stats, + ['../../../../libraries/base/dist-install/doc/html/base/base.haddock.t']) + +test('haddock.Cabal', + [unless_in_tree_compiler(skip) + ,if_wordsize(64, + stats_num_field('peak_megabytes_allocated', 201, + 203)) + # 2012-08-14: 202 (amd64/Linux) + ,if_wordsize(64, + stats_range_field('max_bytes_used', 74119424, 1)) + # 2012-08-14: 74119424 (amd64/Linux) + ,if_wordsize(64, + stats_range_field('bytes allocated', 3255435248, 1)) + # 2012-08-14: 3255435248 (amd64/Linux) + ], + stats, + ['../../../../libraries/Cabal/Cabal/dist-install/doc/html/Cabal/Cabal.haddock.t']) + +test('haddock.compiler', + [unless_in_tree_compiler(skip) + ,if_wordsize(64, + stats_num_field('peak_megabytes_allocated', 1202, + 1204)) + # 2012-08-14: 1203 (amd64/Linux) + ,if_wordsize(64, + stats_range_field('max_bytes_used', 428775544, 1)) + # 2012-08-14: 428775544 (amd64/Linux) + ,if_wordsize(64, + stats_range_field('bytes allocated', 26070600504, 1)) + # 2012-08-14: 26070600504 (amd64/Linux) + ], + stats, + ['../../../../compiler/stage2/doc/html/ghc/ghc.haddock.t']) + _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
