feat(runner): compile Go and check answers per test group

This commit is contained in:
shira committed 2026-10-11 08:59:29 +03:00
1 parent e95c681165
commit afee564bf4
61 files changed
+2592 -143

No files matched your search

+7 -4
View File
@@ -14,13 +14,16 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go test -c -tags sandbox -o /out/isolation.test ./internal/isolationtest
RUN CGO_ENABLED=0 GOOS=linux go test -c -tags sandbox -o /out/isolation.test ./internal/isolationtest \
&& CGO_ENABLED=0 GOOS=linux go test -c -tags sandbox -o /out/judge.test ./internal/judgetest
FROM ${RUNNER_IMAGE}
COPY --from=build /out/isolation.test /opt/lincodex-runner-tests/isolation.test
COPY --from=build /out/isolation.test /out/judge.test /opt/lincodex-runner-tests/
COPY testdata/hostile /opt/lincodex-runner-tests/testdata/hostile
ENV RUNNER_HOSTILE_FIXTURES=/opt/lincodex-runner-tests/testdata/hostile
COPY testdata/judge /opt/lincodex-runner-tests/testdata/judge
ENV RUNNER_HOSTILE_FIXTURES=/opt/lincodex-runner-tests/testdata/hostile \
RUNNER_JUDGE_FIXTURES=/opt/lincodex-runner-tests/testdata/judge
HEALTHCHECK NONE
ENTRYPOINT ["/opt/lincodex-runner-tests/isolation.test", "-test.v", "-test.count=1"]
ENTRYPOINT ["/bin/sh", "-c", "set -e; for suite in judge isolation; do /opt/lincodex-runner-tests/$suite.test -test.v -test.count=1; done"]