Skip to content

Commit

Permalink
Compile and copy test2json
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Aug 8, 2024
1 parent 0867a1e commit 50b9e02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion systest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@ COPY . .
RUN --mount=type=cache,id=build,target=/root/.cache/go-build go test -failfast -v -c -o ./build/tests.test ./systest/tests/

ENV GOBIN=/bin
ENV CGO_ENABLED=0
RUN --mount=type=cache,id=build,target=/root/.cache/go-build go build -o ./build/test2json -ldflags="-s -w" cmd/test2json
RUN --mount=type=cache,id=build,target=/root/.cache/go-build go install gotest.tools/[email protected]

FROM golang:1.22 AS runtime
FROM ubuntu:22.04 AS runtime
RUN set -ex \
&& apt-get update --fix-missing \
&& apt-get install -qy --no-install-recommends \
ocl-icd-libopencl1 clinfo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/build/tests.test /bin/tests
COPY --from=build /src/build/test2json /bin/
COPY --from=build /bin/gotestsum /bin/
COPY --from=build /src/build/libpost.so /bin/
COPY --from=build /src/build/post-service /bin/
ENV LD_LIBRARY_PATH="/bin/"
ENV GOVERSION=1.22
2 changes: 1 addition & 1 deletion systest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ifeq ($(configname),$(test_job_name))
run_deps = config
endif

command := gotestsum --raw-command -- go tool test2json -t -p systest \
command := gotestsum --raw-command -- test2json -t -p systest \
/bin/tests -test.v -test.count=$(count) -test.timeout=60m -test.run=$(test_name) -test.parallel=$(clusters) \
-test.failfast=$(failfast) -clusters=$(clusters) -level=$(level) -configname=$(configname)

Expand Down

0 comments on commit 50b9e02

Please sign in to comment.