summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorCarrie Xu <carrie.xmy@gmail.com>2021-10-06 23:02:04 +0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-01 03:08:46 -0500
commit7acb945d443e26c7e51850c9c51321b0a5a7978a (patch)
tree7ee62d80c789f3a801c8314d1b1252c1a9ca186c /testsuite
parent87bd9a675441513871de55c3cca47a7bb3341639 (diff)
downloadhaskell-7acb945d443e26c7e51850c9c51321b0a5a7978a.tar.gz
Dump non-module specific info to file #20316
- Change the dumpPrefix to FilePath, and default to non-module - Add dot to seperate dump-file-prefix and suffix - Modify user guide to introduce how dump files are named - This commit does not affect Ghci dump file naming. See also #17500
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/driver/Makefile6
-rw-r--r--testsuite/tests/driver/T20316.stderr6
-rw-r--r--testsuite/tests/driver/T20316.stdout4
-rw-r--r--testsuite/tests/driver/all.T1
4 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile
index 58d35b5a06..0542f9de47 100644
--- a/testsuite/tests/driver/Makefile
+++ b/testsuite/tests/driver/Makefile
@@ -733,3 +733,9 @@ T20084:
# Don't compile
"$(TEST_HC)" $(TEST_HC_OPTS) T20084.hs
+.PHONY: T20316
+T20316:
+ echo 'main = print "Hello World"' > T20316.hs
+ "$(TEST_HC)" $(TEST_HC_OPTS) -fno-code T20316.hs -ddump-to-file -ddump-timings;
+ echo "*** non-module.dump-timings ***"
+ cat non-module.dump-timings | grep alloc | sed 's/alloc.*//'
diff --git a/testsuite/tests/driver/T20316.stderr b/testsuite/tests/driver/T20316.stderr
new file mode 100644
index 0000000000..ef979dec18
--- /dev/null
+++ b/testsuite/tests/driver/T20316.stderr
@@ -0,0 +1,6 @@
+*** initializing unit database:
+*** Chasing dependencies:
+*** Parser [Main]:
+*** Renamer/typechecker [Main]:
+*** Desugar [Main]:
+*** CoreTidy [Main]:
diff --git a/testsuite/tests/driver/T20316.stdout b/testsuite/tests/driver/T20316.stdout
new file mode 100644
index 0000000000..280a3c80e7
--- /dev/null
+++ b/testsuite/tests/driver/T20316.stdout
@@ -0,0 +1,4 @@
+[1 of 1] Compiling Main ( T20316.hs, nothing )
+*** non-module.dump-timings ***
+initializing unit database:
+Chasing dependencies:
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 742f74f953..4af15b7640 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -301,3 +301,4 @@ test('T20459', normal, multimod_compile_fail,
['T20459B', ''])
test('T20200loop', extra_files(['T20200loop']), multimod_compile,
['Datatypes', '-iT20200loop -O -v0'])
+test('T20316', normal, makefile_test, [])