summaryrefslogtreecommitdiff
path: root/gnu/packages/php.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-09-30 09:39:55 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-09-30 16:52:07 +0900
commit3e5333673b3284ff27d852143cba7fcd3c19eb76 (patch)
treebd6bf162d0e85e1f336c4e4e5ce892e2fb76012a /gnu/packages/php.scm
parente6b0acff417dff5919d76d4b8360c3a82c7f44b0 (diff)
gnu: php: Run tests in parallel.
* gnu/packages/php.scm (php) [arguments] {prepare-tests}: Set TEST_PHP_ARGS environment variable. Change-Id: Ideed9528c3474ff8c2f0abd760b64f12a7e3ec08
Diffstat (limited to 'gnu/packages/php.scm')
-rw-r--r--gnu/packages/php.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 739d9c888c..872f94373a 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -162,7 +162,7 @@
(("/bin/sh")
(which "sh")))))
(add-before 'check 'prepare-tests
- (lambda _
+ (lambda* (#:key parallel-tests? #:allow-other-keys)
;; Some of these files have ISO-8859-1 encoding, whereas others
;; use ASCII, so we can't use a "catch-all" find-files here.
(with-fluids ((%default-port-encoding "ISO-8859-1"))
@@ -323,7 +323,12 @@
(setenv "REPORT_EXIT_STATUS" "1")
;; Skip tests requiring I/O facilities that are unavailable in the
;; build environment
- (setenv "SKIP_IO_CAPTURE_TESTS" "1"))))
+ (setenv "SKIP_IO_CAPTURE_TESTS" "1")
+ ;; Run tests in parallel.
+ (setenv "TEST_PHP_ARGS"
+ (format #f "-j~a" (if parallel-tests?
+ (parallel-job-count)
+ 1))))))
#:test-target "test"))
(inputs
(list aspell