oom pushed a commit to branch c++-team in repository guix. commit ddef34574f6096c97f8de026662a09b398e1dac0 Author: Greg Hogan <c...@greghogan.com> AuthorDate: Mon Mar 24 16:01:17 2025 +0000
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 --- gnu/packages/linux.scm | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 0beaf3d6b9..d206d1a9f0 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -10821,11 +10821,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 @@ -10847,8 +10844,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")