[Git][ghc/ghc][master] Testsuite: Add a new tables_next_to_code predicate.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Oct 17 23:22:08 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
ff6275ef by Andreas Klebinger at 2022-10-17T19:21:52-04:00
Testsuite: Add a new tables_next_to_code predicate.

And use it to avoid T21710a failing on non-tntc archs.

Fixes #22169

- - - - -


5 changed files:

- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/ghc-config/ghc-config.hs
- testsuite/mk/test.mk
- testsuite/tests/codeGen/should_compile/all.T


Changes:

=====================================
testsuite/driver/testglobals.py
=====================================
@@ -86,6 +86,8 @@ class TestConfig:
         # What is the wordsize (in bits) of this platform?
         self.wordsize = ''
 
+        # Is tables next to code enabled?
+        self.tables_next_to_code = True
         # Verbosity level
         self.verbose = 2
 


=====================================
testsuite/driver/testlib.py
=====================================
@@ -569,6 +569,9 @@ def ghc_dynamic() -> bool:
 def leading_underscore() -> bool:
     return config.leading_underscore
 
+# TNTC enabled
+def tables_next_to_code() -> bool:
+    return config.tables_next_to_code
 
 def fast() -> bool:
     return config.speed == 2


=====================================
testsuite/ghc-config/ghc-config.hs
=====================================
@@ -30,6 +30,7 @@ main = do
   getGhcFieldOrDefault fields "GhcDynamic" "GHC Dynamic" "NO"
   getGhcFieldOrDefault fields "GhcProfiled" "GHC Profiled" "NO"
   getGhcFieldOrDefault fields "LeadingUnderscore" "Leading underscore" "NO"
+  getGhcFieldOrDefault fields "GhcTablesNextToCode" "Tables next to code" "NO"
   getGhcFieldProgWithDefault fields "AR" "ar command" "ar"
   getGhcFieldProgWithDefault fields "CLANG" "LLVM clang command" "clang"
   getGhcFieldProgWithDefault fields "LLC" "LLVM llc command" "llc"


=====================================
testsuite/mk/test.mk
=====================================
@@ -96,6 +96,12 @@ else
 RUNTEST_OPTS += -e "config.leading_underscore=False"
 endif
 
+ifeq "$(GhcTablesNextToCode)" "YES"
+RUNTEST_OPTS += -e "config.tables_next_to_code=True"
+else
+RUNTEST_OPTS += -e "config.tables_next_to_code=False"
+endif
+
 HAVE_GDB := $(shell if gdb --version > /dev/null 2> /dev/null; then echo YES; else echo NO; fi)
 HAVE_READELF := $(shell if readelf --version > /dev/null 2> /dev/null; then echo YES; else echo NO; fi)
 


=====================================
testsuite/tests/codeGen/should_compile/all.T
=====================================
@@ -108,4 +108,7 @@ test('T18614', normal, compile, [''])
 test('mk-big-obj',
      [unless(opsys('mingw32'), skip), pre_cmd('$PYTHON mk-big-obj.py > mk-big-obj.c')],
      multimod_compile, ['mk-big-obj.c', '-c -v0 -no-hs-main'])
-test('T21710a', [ only_ways(['optasm']), when(wordsize(32), skip), grep_errmsg('(call)',[1]) ], compile, ['-ddump-cmm -dno-typeable-binds'])
+test('T21710a', [ unless(tables_next_to_code(), skip) , when(wordsize(32), skip)
+                , only_ways(['optasm'])
+                , grep_errmsg('(call)',[1]) ]
+                , compile, ['-ddump-cmm -dno-typeable-binds'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ff6275ef829873a70350c6d597e485bb84dd1bb1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ff6275ef829873a70350c6d597e485bb84dd1bb1
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221017/15ae45a9/attachment-0001.html>


More information about the ghc-commits mailing list