diff --git a/Dockerfile b/Dockerfile index c60db2c..ea36ab4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,9 +35,16 @@ RUN for attempt in 1 2 3; do \ echo "module download failed: giving up after 3 attempts" >&2; \ exit 1 COPY . . -RUN go test -timeout 90s -race -cover ./... || \ +# -race also turns on checkptr, which checks every pointer conversion. In +# the SQLite library's translated C code that is about a third of the test +# CPU time, much of it under one lock all SQLite work shares, and the +# tests that use SQLite time out on a busy host. The gcflags turn it off +# for that library only; our own packages keep it. +RUN go test -timeout 90s -race -gcflags='modernc.org/...=-d=checkptr=0' \ + -cover ./... || \ { echo "--- Rerunning with -v for details ---"; \ - go test -timeout 90s -race -v ./...; exit 1; } + go test -timeout 90s -race -gcflags='modernc.org/...=-d=checkptr=0' \ + -v ./...; exit 1; } # Build stage. Nothing is wanted from either phase above; the copies # are what make BuildKit build them first, so this stage cannot run