···14 patches = oa.patches or [] ++ [
15 # change the prefix from /usr/bin to /run to find nix processes
16 ../../pkgs/tools/security/tracee/test-EventFilters-prefix-nix-friendly.patch
17- # skip magic_write test that currently fails
18- ../../pkgs/tools/security/tracee/test-EventFilters-magic_write-skip.patch
19 ];
20 buildPhase = ''
21 runHook preBuild
22 # just build the static lib we need for the go test binary
23- make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES} bpf-core ./dist/btfhub ./dist/libbpf/libbpf.a
0000024 # then compile the tests to be ran later
25- 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/...
26 runHook postBuild
27 '';
28 doCheck = false;
···14 patches = oa.patches or [] ++ [
15 # change the prefix from /usr/bin to /run to find nix processes
16 ../../pkgs/tools/security/tracee/test-EventFilters-prefix-nix-friendly.patch
0017 ];
18 buildPhase = ''
19 runHook preBuild
20 # just build the static lib we need for the go test binary
21+ make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES} bpf-core ./dist/btfhub
22+23+ # remove the /usr/bin prefix to work with the patch above
24+ substituteInPlace tests/integration/integration_test.go \
25+ --replace "/usr/bin/ls" "ls"
26+27 # then compile the tests to be ran later
28+ CGO_LDFLAGS="$(pkg-config --libs libbpf)" go test -tags core,ebpf,integration -p 1 -c -o $GOPATH/tracee-integration ./tests/integration/...
29 runHook postBuild
30 '';
31 doCheck = false;