From e2e62bf55a6d327202bd05780db7569c4176b491 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 15 Jan 2020 20:58:46 +0100 Subject: gnu: mercurial: Run tests verbosely and respect settings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 741a98d8b5..5403bcf87a 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) -- cgit v1.2.3