diff --git a/infra/base-images/base-runner/Dockerfile b/infra/base-images/base-runner/Dockerfile index 0ea338ac6..7f11bfbbe 100755 --- a/infra/base-images/base-runner/Dockerfile +++ b/infra/base-images/base-runner/Dockerfile @@ -62,11 +62,12 @@ ENV GOPATH /root/go # /root/.go/bin is for the standard Go binaries (i.e. go, gofmt, etc). # $GOPATH/bin is for the binaries from the dependencies installed via "go get". -ENV PATH $PATH:/root/.go/bin:$GOPATH/bin +ENV PATH $PATH:$GOPATH/bin COPY gocoverage $GOPATH/gocoverage COPY install_go.sh / RUN /install_go.sh && rm /install_go.sh +RUN rm -rf /root/.go # Install OpenJDK 15 and trim its size by removing unused components. ENV JAVA_HOME=/usr/lib/jvm/java-15-openjdk-amd64 diff --git a/infra/base-images/base-runner/coverage b/infra/base-images/base-runner/coverage index b904afa08..022010763 100755 --- a/infra/base-images/base-runner/coverage +++ b/infra/base-images/base-runner/coverage @@ -280,7 +280,7 @@ wait if [[ $FUZZING_LANGUAGE == "go" ]]; then $SYSGOPATH/bin/gocovmerge $DUMPS_DIR/*.profdata > fuzz.cov - go tool cover -html=fuzz.cov -o $REPORT_ROOT_DIR/index.html + gotoolcover -html=fuzz.cov -o $REPORT_ROOT_DIR/index.html $SYSGOPATH/bin/gocovsum fuzz.cov > $SUMMARY_FILE cp $REPORT_ROOT_DIR/index.html $REPORT_PLATFORM_DIR/index.html $SYSGOPATH/bin/pprof-merge $DUMPS_DIR/*.perf.cpu.prof diff --git a/infra/base-images/base-runner/install_go.sh b/infra/base-images/base-runner/install_go.sh index 93400485a..91e1effc5 100755 --- a/infra/base-images/base-runner/install_go.sh +++ b/infra/base-images/base-runner/install_go.sh @@ -26,7 +26,8 @@ case $(uname -m) in rm $SRC/installer_linux # Set up Golang coverage modules. printf $(find . -name gocoverage) - cd $GOPATH/gocoverage && go install ./... + cd $GOPATH/gocoverage && /root/.go/bin/go install ./... + cd /root/.go/src/cmd/cover && /root/.go/bin/go build && mv cover $GOPATH/bin/gotoolcover ;; aarch64) # Don't install go because installer is not provided.