diff options
| author | Nguyễn Gia Phong <cnx@loang.net> | 2026-02-14 22:48:06 +0900 |
|---|---|---|
| committer | Julien Lepiller <julien@lepiller.eu> | 2026-02-16 19:23:30 +0100 |
| commit | 61f36109e05b5fbc67e218243baf5a7ee7752fee (patch) | |
| tree | dd5f3625c36fa08458c7a72956528c336e326265 /gnu/packages/java.scm | |
| parent | 5d3c9b71c414edd9b88ea6038066f4684b9f3b52 (diff) | |
gnu: cpp-antlr4-runtime: Enable tests.
* gnu/packages/java.scm (cpp-antlr4-runtime)[arguments]: Enable tests.
<#:phases>: Add unbundle-googletest.
[native-inputs]: Add googletest.
Change-Id: Ie10ae44c712f12cf7b5babb447a95a8407de41f4
Signed-off-by: Julien Lepiller <julien@lepiller.eu>
Diffstat (limited to 'gnu/packages/java.scm')
| -rw-r--r-- | gnu/packages/java.scm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b0809ce07b9..efe3c1e70a3 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -62,6 +62,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages nss) + #:use-module (gnu packages check) #:use-module (gnu packages cpio) #:use-module (gnu packages cups) #:use-module (gnu packages compression) @@ -8886,14 +8887,18 @@ sources by ANTLR.") (list ;; TODO: try to run the tests under ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4. - #:tests? #f ;no CMake test target - ;; TODO: Building the tests wants to download googletest. - #:configure-flags #~'("-DANTLR_BUILD_CPP_TESTS=OFF") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'chdir (lambda _ (chdir "runtime/Cpp"))) + (add-after 'chdir 'unbundle-googletest + (lambda _ + (substitute* "runtime/CMakeLists.txt" + (("^ FetchContent_MakeAvailable.*") + "") + (("gtest_main" all) + (string-append "gtest " all))))) (add-after 'install 'move-static-library (lambda* (#:key outputs #:allow-other-keys) (let ((static (assoc-ref outputs "static")) @@ -8904,7 +8909,7 @@ sources by ANTLR.") libantlr4-runtime.a (string-append static "/lib/" (basename libantlr4-runtime.a))))))))) - (native-inputs (list pkg-config)) + (native-inputs (list googletest pkg-config)) (inputs (list `(,util-linux "lib"))) ;libuuid (synopsis "ANTLR C++ runtime library") (description "This package contains the C++ runtime library used with C++ |
