Skip to content

Commit

Permalink
test: fix system test failure in node 18 (google#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
amchiclet authored May 4, 2022
1 parent f596ffe commit f6ac01d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
14 changes: 14 additions & 0 deletions system-test/Dockerfile.node18-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.17-alpine as builder
RUN apk add --no-cache git
WORKDIR /root/
RUN go get github.com/google/pprof


FROM node:18-alpine

ARG ADDITIONAL_PACKAGES

RUN apk add --no-cache bash $ADDITIONAL_PACKAGES
WORKDIR /root/
COPY --from=builder /go/bin/pprof /bin
RUN chmod a+x /bin/pprof
10 changes: 6 additions & 4 deletions system-test/test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

trap "cd $(dirname $0)/.. && npm run clean" EXIT
trap "echo '** TEST FAILED **'" ERR
SRCDIR="/cloned_src"

. $(dirname $0)/../tools/retry.sh
trap "cd $SRCDIR && npm run clean" EXIT
trap "echo '** TEST FAILED **'" ERR

function timeout_after() {
# timeout on Node 11 alpine image requires -t to specify time.
Expand All @@ -19,7 +19,9 @@ npm_install() {
}

set -eox pipefail
cd $(dirname $0)/..
cp -r /src "$SRCDIR"
cd "$SRCDIR"
. "tools/retry.sh"

NODEDIR=$(dirname $(dirname $(which node)))

Expand Down

0 comments on commit f6ac01d

Please sign in to comment.