[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#72106] [PATCH v3 2/5] gnu: klee: Enable the test suite.
From: |
soeren |
Subject: |
[bug#72106] [PATCH v3 2/5] gnu: klee: Enable the test suite. |
Date: |
Thu, 25 Jul 2024 22:40:00 +0200 |
From: Sören Tempel <soeren@soeren-tempel.net>
* gnu/packages/check.scm (klee): Enable all tests.
[arguments]: Add phase to patch lit configuration, set #:test-target.
<#:configure-flags?>: Enable system and unit tests, configure gtest.
[inputs]: Add googletest and python-lit.
---
gnu/packages/check.scm | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 3c5ed7a3c3..48e8ae3aef 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1063,13 +1063,23 @@ (define-public klee
(base32 "1nma6dqi8chjb97llsa8mzyskgsg4dx56lm8j514j5wmr8vkafz6"))))
(arguments
(list
+ #:test-target "check"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'patch
+ (add-after 'unpack 'patch-cmake
(lambda _
(substitute* "CMakeLists.txt"
(("\\$\\{KLEE_UCLIBC_PATH\\}/lib/libc\\.a")
"${KLEE_UCLIBC_PATH}"))))
+ (add-after 'unpack 'patch-lit-config
+ (lambda _
+ ;; Make sure that we retain the value of the
GUIX_PYTHONPATH
+ ;; environment variable in the test environmented
created by
+ ;; python-lit. Otherwise, the test scripts won't be
able to
+ ;; find the python-tabulate dependency, causing test
failures.
+ (substitute* "test/lit.cfg"
+ (("addEnv\\('PWD'\\)" env)
+ (string-append env "\n"
"addEnv('GUIX_PYTHONPATH')")))))
(add-after 'install 'wrap-klee-stats
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1088,7 +1098,13 @@ (define-public klee
`("KLEE_RUNTIME_LIBRARY_PATH" =
(,(string-append lib "/klee/runtime/"))))))))
#:configure-flags
- #~(list (string-append "-DLLVMCC="
+ #~(list "-DENABLE_UNIT_TESTS=ON"
+ "-DENABLE_SYSTEM_TESTS=ON"
+ (string-append "-DGTEST_SRC_DIR="
+ #+(package-source googletest))
+ (string-append "-DGTEST_INCLUDE_DIR="
+ #+(package-source googletest)
"/googletest/include")
+ (string-append "-DLLVMCC="
(search-input-file %build-inputs "/bin/clang"))
(string-append "-DLLVMCXX="
(search-input-file %build-inputs "/bin/clang++"))
[bug#72106] [PATCH v2 4/5] gnu: klee: Only build on x86_64 Linux., soeren, 2024/07/14
[bug#72106] [PATCH v2 3/5] gnu: klee: Only strip bin directory., soeren, 2024/07/14
[bug#72106] [PATCH v2 5/5] gnu: klee-uclibc: Only build on x86_64 Linux., soeren, 2024/07/14
[bug#72106] [PATCH v3 1/5] gnu: klee: Wrap klee-stats for Python dependencies., soeren, 2024/07/25
[bug#72106] [PATCH v3 5/5] gnu: klee-uclibc: Only build on x86_64 Linux., soeren, 2024/07/25
[bug#72106] [PATCH v3 1/5] gnu: klee: Wrap klee-stats for Python dependencies., Liliana Marie Prikler, 2024/07/26
[bug#72106] [PATCH v4 1/5] gnu: klee: Wrap klee-stats for Python dependencies., soeren, 2024/07/27