summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2025-03-24 16:01:17 +0000
committerGreg Hogan <code@greghogan.com>2025-08-03 23:36:47 +0000
commit4c0174c4bc9de2d8eea69616b90e48b070feb8a4 (patch)
treec2ceb2c9f8e59cf9b075cb76fb040d4165cb9948 /gnu/packages/linux.scm
parent913c361bbb952c958102042fb4c3ac1a60eebbc4 (diff)
gnu: bpftrace: Fix tests.
* gnu/packages/linux.scm (bpftrace) [arguments]: Replace #:test-target with #:test-exclude. <#:phases>: Add 'fix-paths and 'set-test-filter. [native-inputs]: Add coreutils. Change-Id: I66e2f616ae6ff2a133eca2d96a1aae15a88d6c93
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm29
1 files changed, 23 insertions, 6 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8da8195244f..6decc54a417 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -11299,11 +11299,8 @@ modification of BPF objects on the system.")
(build-system cmake-build-system)
(arguments
(list
+ #:test-exclude "(runtime_tests|tools-parsing-test)"
#:configure-flags #~(list "-DBUILD_TESTING=ON")
- ;; Only run the unit tests suite, as the other ones
- ;; (runtime_tests, tools-parsing-test) require to run as
- ;; 'root'.
- #:test-target "bpftrace_test"
#:phases
#~(modify-phases %standard-phases
;; This patch also fixes broken compilation due to improper detection
@@ -11325,8 +11322,28 @@ modification of BPF objects on the system.")
"runtime/call"
"procmon.cpp")
(("/bin/ls")
- (which "ls")))))))))
- (native-inputs (list bison dwarves flex googletest xxd))
+ (which "ls"))))))
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("tests/child.cpp")
+ (("/bin/sleep")
+ (search-input-file inputs "bin/sleep")))))
+ (add-before 'check 'set-test-filter
+ (lambda _
+ (setenv "GTEST_FILTER"
+ (string-join
+ (list ; "-" disables all following tests
+ "-ast.probe_name_uprobe"
+ "bpftrace.add_probes_uprobe_wildcard_file"
+ "bpftrace.add_probes_uprobe_wildcard_file_uprobe_multi"
+ "bpftrace.add_probes_usdt_wildcard"
+ "Parser.multiple_attach_points_kprobe"
+ "Parser.uretprobe_offset"
+ "semantic_analyser.builtin_functions"
+ "semantic_analyser.call_func"
+ "semantic_analyser.call_uaddr")
+ ":")))))))
+ (native-inputs (list bison coreutils dwarves flex googletest xxd))
(inputs (list bcc clang-15 elfutils libbpf libiberty cereal))
(home-page "https://github.com/bpftrace/bpftrace")
(synopsis "High-level tracing language for Linux eBPF")