summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/compiler
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-11-30 17:13:31 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2021-11-30 17:13:31 +0000
commit8bda3a3e9da7cd446cf7f8c4ea5dffd0f27d9eca (patch)
tree56b31f94b3b02ea9c7290a445f2bc07434489ffe /testsuite/tests/perf/compiler
parent3fab265113d5359c88939787d613d645eb803aa3 (diff)
downloadhaskell-wip/multi-hmi-split.tar.gz
testsuite changeswip/multi-hmi-split
Diffstat (limited to 'testsuite/tests/perf/compiler')
-rw-r--r--testsuite/tests/perf/compiler/Makefile4
-rw-r--r--testsuite/tests/perf/compiler/all.T47
2 files changed, 51 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/Makefile b/testsuite/tests/perf/compiler/Makefile
index 20f5704450..1e915f785a 100644
--- a/testsuite/tests/perf/compiler/Makefile
+++ b/testsuite/tests/perf/compiler/Makefile
@@ -16,3 +16,7 @@ T11068:
MultiModulesRecomp:
./genMultiLayerModules
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 MultiLayerModules.hs
+
+MultiComponentModulesRecomp:
+ '$(PYTHON)' genMultiComp.py
+ TEST_HC='$(TEST_HC)' TEST_HC_OPTS='$(TEST_HC_OPTS)' ./run
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 28f899f7ef..f1d7ef2e5e 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -293,6 +293,35 @@ test('MultiLayerModulesRecomp',
multimod_compile,
['MultiLayerModules', '-v0'])
+
+# A performance test for calculating link dependencies in --make mode.
+test('MultiLayerModulesTH_Make',
+ [ collect_compiler_stats('bytes allocated',3),
+ pre_cmd('./genMultiLayerModulesTH; $TEST_HC $TEST_HC_OPTS MultiLayerModulesPrep -dynamic-too -v0'),
+ extra_files(['genMultiLayerModulesTH']),
+ compile_timeout_multiplier(5)
+ # this is _a lot_
+ # but this test has been failing every now and then,
+ # especially on i386. Let's just give it some room
+ # to complete successfully reliably everywhere.
+ ],
+ multimod_compile_fail,
+ ['MultiLayerModules', '-v0'])
+
+# A performance test for calculating link dependencies in -c mode.
+test('MultiLayerModulesTH_OneShot',
+ [ collect_compiler_stats('bytes allocated',3),
+ pre_cmd('./genMultiLayerModulesTH; cp MultiLayerModules.hs MultiLayerModulesTH_OneShot.hs; $TEST_HC $TEST_HC_OPTS MultiLayerModulesPrep -dynamic-too -v0'),
+ extra_files(['genMultiLayerModulesTH']),
+ compile_timeout_multiplier(5)
+ # this is _a lot_
+ # but this test has been failing every now and then,
+ # especially on i386. Let's just give it some room
+ # to complete successfully reliably everywhere.
+ ],
+ compile_fail,
+ ['-v0'])
+
test('MultiLayerModulesDefsGhci',
[ collect_compiler_residency(15),
pre_cmd('./genMultiLayerModulesDefs'),
@@ -319,6 +348,24 @@ test('MultiLayerModulesNoCode',
ghci_script,
['MultiLayerModulesNoCode.script'])
+test('MultiComponentModulesRecomp',
+ [ collect_compiler_stats('bytes allocated', 2),
+ pre_cmd('$MAKE -s --no-print-directory MultiComponentModulesRecomp'),
+ extra_files(['genMultiComp.py']),
+ compile_timeout_multiplier(5)
+ ],
+ multiunit_compile,
+ [['unitp%d' % n for n in range(30)], '-fno-code -fwrite-interface -v0'])
+
+test('MultiComponentModules',
+ [ collect_compiler_stats('bytes allocated', 2),
+ pre_cmd('$PYTHON ./genMultiComp.py'),
+ extra_files(['genMultiComp.py']),
+ compile_timeout_multiplier(5)
+ ],
+ multiunit_compile,
+ [['unitp%d' % n for n in range(30)], '-fno-code -fwrite-interface -v0'])
+
test('ManyConstructors',
[ collect_compiler_stats('bytes allocated',2),
pre_cmd('./genManyConstructors'),