[Git][ghc/ghc][wip/lint-testsuite] 2 commits: gitlab-ci: Lint testsuite for framework failures

Ben Gamari gitlab at gitlab.haskell.org
Wed Jun 12 13:44:31 UTC 2019



Ben Gamari pushed to branch wip/lint-testsuite at Glasgow Haskell Compiler / GHC


Commits:
8c0b6aba by Ben Gamari at 2019-06-12T13:43:02Z
gitlab-ci: Lint testsuite for framework failures

This introduces a new lint job checking for framework failures and
listing broken tests.

- - - - -
57dfc10b by Ben Gamari at 2019-06-12T13:44:22Z
testsuite: Fix fragile_for test modifier

- - - - -


4 changed files:

- .gitlab-ci.yml
- testsuite/driver/runtests.py
- testsuite/driver/testlib.py
- testsuite/mk/test.mk


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -70,6 +70,15 @@ ghc-linters:
     refs:
       - merge_requests
 
+lint-testsuite:
+  stage: lint
+  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
+  script:
+    - make -Ctestsuite list_broken TEST_HC=ghc
+  dependencies: []
+  tags:
+    - lint
+
 # We allow the submodule checker to fail when run on merge requests (to
 # accomodate, e.g., haddock changes not yet upstream) but not on `master` or
 # Marge jobs.


=====================================
testsuite/driver/runtests.py
=====================================
@@ -350,7 +350,7 @@ for name in config.only:
 if config.list_broken:
     print('')
     print('Broken tests:')
-    print(' '.join(map (lambda bdn: '#' + str(bdn[0]) + '(' + bdn[1] + '/' + bdn[2] + ')', brokens)))
+    print('\n  '.join(map (lambda bdn: '#' + str(bdn[0]) + '(' + bdn[1] + '/' + bdn[2] + ')', brokens)))
     print('')
 
     if t.framework_failures:


=====================================
testsuite/driver/testlib.py
=====================================
@@ -257,14 +257,14 @@ def fragile( bug ):
 
     return helper
 
-def fragile_for( name, opts, bug, ways ):
+def fragile_for( bug, ways ):
     """
     Indicates that the test should be skipped due to fragility in the given
     test ways as documented in the given ticket.
     """
     def helper( name, opts, bug=bug, ways=ways ):
         record_broken(name, opts, bug)
-        opts.omit_ways = ways
+        opts.omit_ways += ways
 
     return helper
 
@@ -274,7 +274,7 @@ def omit_ways( ways ):
     return lambda name, opts, w=ways: _omit_ways( name, opts, w )
 
 def _omit_ways( name, opts, ways ):
-    opts.omit_ways = ways
+    opts.omit_ways += ways
 
 # -----
 


=====================================
testsuite/mk/test.mk
=====================================
@@ -81,7 +81,11 @@ endif
 
 RUNTEST_OPTS += -e "ghc_compiler_always_flags='$(TEST_HC_OPTS)'"
 
-RUNTEST_OPTS += -e config.compiler_debugged=$(GhcDebugged)
+ifeq "$(GhcDebugged)" "YES"
+RUNTEST_OPTS += -e "config.compiler_debugged=True"
+else
+RUNTEST_OPTS += -e "config.compiler_debugged=False"
+endif
 
 ifeq "$(GhcWithNativeCodeGen)" "YES"
 RUNTEST_OPTS += -e ghc_with_native_codegen=True



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/9aff2d922edbfda0cd05008761883a3387b77498...57dfc10b675e5d3ac5b59edafeabe513b825a300

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/9aff2d922edbfda0cd05008761883a3387b77498...57dfc10b675e5d3ac5b59edafeabe513b825a300
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/20190612/038a0c3e/attachment-0001.html>


More information about the ghc-commits mailing list