diff options
author | 06kellyjac <dev@j-k.io> | 2022-10-26 12:11:44 +0100 |
---|---|---|
committer | 06kellyjac <dev@j-k.io> | 2022-10-26 12:11:44 +0100 |
commit | 07ff3b173769f87c7c84b9b827f4a1f2dab63a91 (patch) | |
tree | 47698811c370c0bfca098e44e039da494a88e5f5 /nixos | |
parent | 75727174f215031edb989de81afaeb9d09069e00 (diff) |
tracee: 0.8.3 -> 0.9.2
Use our built copy of libbpf.a
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/tracee.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nixos/tests/tracee.nix b/nixos/tests/tracee.nix index 26d0ada931b1c..72e82ec0b7edf 100644 --- a/nixos/tests/tracee.nix +++ b/nixos/tests/tracee.nix @@ -14,15 +14,18 @@ import ./make-test-python.nix ({ pkgs, ... }: { patches = oa.patches or [] ++ [ # change the prefix from /usr/bin to /run to find nix processes ../../pkgs/tools/security/tracee/test-EventFilters-prefix-nix-friendly.patch - # skip magic_write test that currently fails - ../../pkgs/tools/security/tracee/test-EventFilters-magic_write-skip.patch ]; buildPhase = '' runHook preBuild # just build the static lib we need for the go test binary - make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES} bpf-core ./dist/btfhub ./dist/libbpf/libbpf.a + make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES} bpf-core ./dist/btfhub + + # remove the /usr/bin prefix to work with the patch above + substituteInPlace tests/integration/integration_test.go \ + --replace "/usr/bin/ls" "ls" + # then compile the tests to be ran later - CGO_CFLAGS="-I$PWD/dist/libbpf" CGO_LDFLAGS="-lelf -lz $PWD/dist/libbpf/libbpf.a" go test -tags core,ebpf,integration -p 1 -c -o $GOPATH/tracee-integration ./tests/integration/... + CGO_LDFLAGS="$(pkg-config --libs libbpf)" go test -tags core,ebpf,integration -p 1 -c -o $GOPATH/tracee-integration ./tests/integration/... runHook postBuild ''; doCheck = false; |