guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: mercurial: Run tests verbosely and respect settings.


From: guix-commits
Subject: 03/03: gnu: mercurial: Run tests verbosely and respect settings.
Date: Wed, 15 Jan 2020 16:42:46 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit e2e62bf55a6d327202bd05780db7569c4176b491
Author: Tobias Geerinckx-Rice <address@hidden>
AuthorDate: Wed Jan 15 20:58:46 2020 +0100

    gnu: mercurial: Run tests verbosely and respect settings.
    
    * gnu/packages/version-control.scm (mercurial)[arguments]:
    Invoke ‘run-tests.py’ directly and verbosely.
    Respect #:tests? and parallel-job-count.
---
 gnu/packages/version-control.scm | 49 ++++++++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 741a98d..5403bcf 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1244,26 +1244,35 @@ control to Git repositories.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             ;; The following tests are known to fail.
-             (for-each (lambda (file)
-                         (delete-file (string-append "tests/" file)))
-                       '("test-extdiff.t"
-                         "test-hghave.t"
-                         "test-hgwebdir.t"
-                         "test-http-branchmap.t"
-                         "test-logtoprocess.t"
-                         "test-merge-combination.t"
-                         "test-nointerrupt.t"
-                         "test-patchbomb.t"
-                         "test-pull-bundle.t"
-                         "test-push-http.t"
-                         "test-run-tests.t"
-                         "test-serve.t"
-                         "test-subrepo-deep-nested-change.t"
-                         "test-subrepo-recursion.t"
-                         "test-transplant.t"))
-             (invoke "make" "check"))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (with-directory-excursion "tests"
+               ;; The following tests are known to fail.
+               (for-each (lambda (file)
+                           (delete-file file))
+                         '("test-extdiff.t"
+                           "test-hghave.t"
+                           "test-hgwebdir.t"
+                           "test-http-branchmap.t"
+                           "test-logtoprocess.t"
+                           "test-merge-combination.t"
+                           "test-nointerrupt.t"
+                           "test-patchbomb.t"
+                           "test-pull-bundle.t"
+                           "test-push-http.t"
+                           "test-run-tests.t"
+                           "test-serve.t"
+                           "test-subrepo-deep-nested-change.t"
+                           "test-subrepo-recursion.t"
+                           "test-transplant.t"))
+               (when tests?
+                 (invoke "./run-tests.py"
+                         ;; ‘make check’ does not respect ‘-j’.
+                         (string-append "-j" (number->string
+                                              (parallel-job-count)))
+                         ;; The test suite takes a long time and produces 
little
+                         ;; output by default.  Prevent timeouts due to 
silence.
+                         "-v"))
+               #t))))))
     ;; The following inputs are only needed to run the tests.
     (native-inputs
      `(("python-nose" ,python-nose)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]