You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run ./bin/harpoon analyze --exclude .git it fails on running go test with:
...
analyzing symbols
building test binary
error walking the path: failed to build test file: failed to execute build command '/home/linuxbrew/.linuxbrew/bin/go test -gcflags=-N -l -c ./internal/archiver -o .harpoon/archive.test': exit status 1
---
symbolsOrigins:
The text was updated successfully, but these errors were encountered:
I reproduced the issue with integration tests with go 1.22. As discussed in #54, the issue I highlighted instead arises only with Go 1.23.
I reproduced the issue with a test environment declared in the following Dockerfile.
Dockerfile
ARG GOVERSION=1.22
FROM golang:$GOVERSION as base
RUN apt update && apt install -y --no-install-recommends \
clang build-essential \
libbpf-dev bpftool \
libseccomp-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git config --global --add safe.directory /work
FROM cgr.dev/chainguard/wolfi-base as src
WORKDIR /src
COPY . .
FROM base as build
WORKDIR /build
COPY --from=src /src .
RUN rm -rf libbpfgo && make build
FROM cgr.dev/chainguard/wolfi-base as bin
COPY --from=build /build/bin/harpoon /usr/bin/harpoon
FROM base as test
RUN ln -s /usr/local/go/bin/go /usr/bin/go
RUN mkdir /tmp/integration
COPY --from=bin /usr/bin/harpoon /usr/bin/harpoon
WORKDIR /test
COPY --from=src /src .
RUN make -C tests/testcases/example-app
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["go test -cover -v main_test.go -args -test.gocoverdir=/tmp/integration/"]
building the test environment with:
docker build . --target test -t test
and running the tests with:
docker run --rm --privileged -v /sys:/sys test:latest
When I run
./bin/harpoon analyze --exclude .git
it fails on runninggo test
with:The text was updated successfully, but these errors were encountered: