From 706fe6cadf121331433fcf0ec25e6bd9cabd0556 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 25 Mar 2026 11:12:48 +0200 Subject: gnu: quickjs: Run more tests. * gnu/packages/javascript.scm (quickjs)[arguments]: Add a test-target. Add a phase to prepare for the tests. Remove the custom 'check phase. Change-Id: Ic6f0877d34fcd052b7bdd2853d316ba8376fb907 --- gnu/packages/javascript.scm | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'gnu/packages/javascript.scm') diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 7365dae7835..842c8fbf4d5 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -1041,18 +1041,24 @@ roots, or wrestle with obscure build systems.") "doc/quickjs.html")))))) (build-system gnu-build-system) (arguments - (list #:make-flags - #~(list (string-append "PREFIX=" #$output) - #$@(if (or (target-riscv64?) - (target-ppc32?)) - '("LDFLAGS=-latomic") - '())) - #:phases #~(modify-phases %standard-phases - (delete 'configure) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "make" "microbench"))))))) + (list + #:make-flags + #~(list (string-append "PREFIX=" #$output) + #$@(if (or (target-riscv64?) + (target-ppc32?)) + '("LDFLAGS=-latomic") + '())) + #:test-target (if (target-x86-32?) + "microbench" + "test") + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'check 'pre-check + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "tests/test_std.js" + (("/bin/sh") (search-input-file + (or native-inputs inputs) + "bin/sh")))))))) (home-page "https://bellard.org/quickjs/") (synopsis "Small embeddable Javascript engine") (description "QuickJS supports the ES2023 specification including modules, -- cgit v1.3