summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2018-12-30 10:57:46 +0100
committerGabor Greif <ggreif@gmail.com>2018-12-30 17:32:35 +0100
commitae4f1033cfe131fca9416e2993bda081e1f8c152 (patch)
tree30d73628cc6b0b0f0440d7720ecf074bf19c49ec
parentef57272e28f5047599249ae457609a079d8aebef (diff)
downloadhaskell-ae4f1033cfe131fca9416e2993bda081e1f8c152.tar.gz
Introduce NCG config flag and add helper
... for testing presence of NCG This commit adds a criterion for checking whether we can expect sensible output from --ddump-asm.
-rw-r--r--testsuite/config/ghc2
-rw-r--r--testsuite/driver/testlib.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 247ddb8fd7..24294da119 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -158,6 +158,8 @@ def get_compiler_info():
s = re.sub('[\r\n]', '', s)
rtsInfoDict = dict(eval(s))
+ config.have_ncg = compilerInfoDict.get("Have native code generator", "NO") == "YES"
+
# external interpreter needs RTS linker support
# If the field is not present (GHC 8.0 and earlier), assume we don't
# have -fexternal-interpreter (though GHC 8.0 actually does)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 5f84863070..96024a9a64 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -440,6 +440,9 @@ def cygwin( ):
def have_vanilla( ):
return config.have_vanilla
+def have_ncg( ):
+ return config.have_ncg
+
def have_dynamic( ):
return config.have_dynamic
@@ -1174,7 +1177,7 @@ def check_stats(name, way, stats_file, range_fields):
metric_result = failBecause('no such stats metric')
else:
actual_val = int(field_match.group(1))
-
+
# Store the metric so it can later be stored in a git note.
perf_stat = metric_dict(name, way, metric, actual_val)
change = None