[Git][ghc/ghc][master] Fix testsuite skipping Lint

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Jun 1 14:58:29 UTC 2023



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


Commits:
2c38551e by Krzysztof Gogolewski at 2023-06-01T10:58:08-04:00
Fix testsuite skipping Lint

setTestOpts() is used to modify the test options for an entire .T file,
rather than a single test.
If there was a test using collect_compiler_stats, all of the tests
in the same file had lint disabled.

Fixes #21247

- - - - -


1 changed file:

- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -566,8 +566,10 @@ def _extra_files(name, opts, files):
 # collect_stats is used in the majority case when the metrics to be collected
 # are about the performance of the runtime code generated by the compiler.
 def collect_compiler_stats(metric='all',deviation=20):
-    setTestOpts(no_lint)
-    return lambda name, opts, m=metric, d=deviation: _collect_stats(name, opts, m,d, True)
+    def f(name, opts, m=metric, d=deviation):
+        no_lint(name, opts)
+        return _collect_stats(name, opts, m, d, True)
+    return f
 
 def collect_stats(metric='all', deviation=20):
     return lambda name, opts, m=metric, d=deviation: _collect_stats(name, opts, m, d)



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2c38551ea42ef596ffdbed196c87207f64815582
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/20230601/ea9eec2b/attachment.html>


More information about the ghc-commits mailing list