summaryrefslogtreecommitdiff
path: root/testsuite/mk/test.mk
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-03-06 21:55:36 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2015-03-11 18:59:53 +0100
commit5258566ee5c89aa757b0cf1433169346319c018f (patch)
tree809dbd1eb47e4f864b33e4fb266610c781d3b89b /testsuite/mk/test.mk
parent842028b4a624e639dc9ee9a4f92fc208c8206e3f (diff)
downloadhaskell-5258566ee5c89aa757b0cf1433169346319c018f.tar.gz
Cleanup test framework string formatting
* Use format strings instead of string concatenation. * Wrap `config.compiler`, `config.hpc` etc. in quotes in `mk/test.mk`, so we don't have to in .T scripts and driver/testlib.py. Update hpc submodule (test cleanup) Reviewers: austin Differential Revision: https://phabricator.haskell.org/D718
Diffstat (limited to 'testsuite/mk/test.mk')
-rw-r--r--testsuite/mk/test.mk16
1 files changed, 10 insertions, 6 deletions
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 42022cd958..d1d66c781a 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -196,21 +196,25 @@ RUNTEST_OPTS += \
--rootdir=. \
--config=$(CONFIG) \
-e 'config.confdir="$(CONFIGDIR)"' \
- -e 'config.compiler="$(TEST_HC)"' \
- -e 'config.ghc_pkg="$(GHC_PKG)"' \
- -e 'config.hp2ps="$(HP2PS_ABS)"' \
- -e 'config.hpc="$(HPC)"' \
- -e 'config.gs="$(GS)"' \
-e 'config.platform="$(TARGETPLATFORM)"' \
-e 'config.os="$(TargetOS_CPP)"' \
-e 'config.arch="$(TargetARCH_CPP)"' \
-e 'config.wordsize="$(WORDSIZE)"' \
-e 'default_testopts.cleanup="$(CLEANUP)"' \
-e 'config.timeout=int($(TIMEOUT)) or config.timeout' \
- -e 'config.timeout_prog="$(TIMEOUT_PROGRAM)"' \
-e 'config.exeext="$(exeext)"' \
-e 'config.top="$(TOP_ABS)"'
+# Put an extra pair of quotes around program paths,
+# so we don't have to in .T scripts or driver/testlib.py.
+RUNTEST_OPTS += \
+ -e 'config.compiler="\"$(TEST_HC)\""' \
+ -e 'config.ghc_pkg="\"$(GHC_PKG)\""' \
+ -e 'config.hp2ps="\"$(HP2PS_ABS)\""' \
+ -e 'config.hpc="\"$(HPC)\""' \
+ -e 'config.gs="\"$(GS)\""' \
+ -e 'config.timeout_prog="\"$(TIMEOUT_PROGRAM)\""'
+
ifneq "$(OUTPUT_SUMMARY)" ""
RUNTEST_OPTS += \
--output-summary "$(OUTPUT_SUMMARY)"