diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 695b1e9e..454cbde0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,8 +59,8 @@ accept your pull requests. # Running the system test The system test starts a simple benchmark, uses this module to collect a time -and a heap profile, and verifies that the profiles contain functions from -within the benchmark. +and a heap profile, and verifies that the profiles contain functions from +within the benchmark. To run the system test, [golang](https://golang.org/) must be installed. @@ -69,8 +69,3 @@ versions of Node.JS: ```sh sh system-test/system_test.sh ``` - -To run the system test with the v8 canary build, use: -```sh -RUN_ONLY_V8_CANARY_TEST=true sh system-test/system_test.sh -``` \ No newline at end of file diff --git a/system-test/Dockerfile.linux b/system-test/Dockerfile.linux index 8c9e3fec..43c6597f 100644 --- a/system-test/Dockerfile.linux +++ b/system-test/Dockerfile.linux @@ -8,7 +8,6 @@ RUN go get github.com/google/pprof FROM debian:11 ARG NODE_VERSION -ARG NVM_NODEJS_ORG_MIRROR ARG ADDITIONAL_PACKAGES ARG VERIFY_TIME_LINE_NUMBERS diff --git a/system-test/Dockerfile.nodenode-alpine b/system-test/Dockerfile.nodenode-alpine new file mode 100644 index 00000000..3df86f0d --- /dev/null +++ b/system-test/Dockerfile.nodenode-alpine @@ -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:current-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 diff --git a/system-test/system_test.sh b/system-test/system_test.sh index 2b82f10d..dedc6bf5 100755 --- a/system-test/system_test.sh +++ b/system-test/system_test.sh @@ -12,11 +12,7 @@ cd $(dirname $0) if [[ -z "$BINARY_HOST" ]]; then ADDITIONAL_PACKAGES="python3 g++ make" -fi - -if [[ "$RUN_ONLY_V8_CANARY_TEST" == "true" ]]; then - NVM_NODEJS_ORG_MIRROR="https://nodejs.org/download/v8-canary" - NODE_VERSIONS=(node) + NODE_VERSIONS=(10 12 14 15 16 node) else NODE_VERSIONS=(10 12 14 15 16) fi @@ -25,7 +21,6 @@ for i in ${NODE_VERSIONS[@]}; do # Test Linux support for the given node version. retry docker build -f Dockerfile.linux --build-arg NODE_VERSION=$i \ --build-arg ADDITIONAL_PACKAGES="$ADDITIONAL_PACKAGES" \ - --build-arg NVM_NODEJS_ORG_MIRROR="$NVM_NODEJS_ORG_MIRROR" \ -t node$i-linux . docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" node$i-linux \ @@ -39,11 +34,6 @@ for i in ${NODE_VERSIONS[@]}; do /src/system-test/test.sh fi - # Skip running on alpine if NVM_NODEJS_ORG_MIRROR is specified. - if [[ ! -z "$NVM_NODEJS_ORG_MIRROR" ]]; then - continue - fi - # Test Alpine support for the given node version. retry docker build -f Dockerfile.node$i-alpine \ --build-arg ADDITIONAL_PACKAGES="$ADDITIONAL_PACKAGES" -t node$i-alpine . diff --git a/system-test/test.sh b/system-test/test.sh index c6e9edbc..2f42db5f 100755 --- a/system-test/test.sh +++ b/system-test/test.sh @@ -23,13 +23,6 @@ cd $(dirname $0)/.. NODEDIR=$(dirname $(dirname $(which node))) -# TODO: Remove when a new version of nan (current version 2.12.1) is released. -# For v8-canary tests, we need to use the version of NAN on github, which -# contains unreleased fixes that allow the native component to be compiled -# with Node's V8 canary build. -[ -z $NVM_NODEJS_ORG_MIRROR ] \ - || retry npm_install https://github.com/nodejs/nan.git - retry npm_install --nodedir="$NODEDIR" \ ${BINARY_HOST:+--pprof_binary_host_mirror=$BINARY_HOST} >/dev/null