Skip to content

Commit

Permalink
test: use latest stable instead of canary in system test (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
amchiclet authored and aabmass committed Jul 21, 2023
1 parent 957feac commit c9585b4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
9 changes: 2 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
```
1 change: 0 additions & 1 deletion system-test/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions system-test/Dockerfile.nodenode-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: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
12 changes: 1 addition & 11 deletions system-test/system_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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 .
Expand Down
7 changes: 0 additions & 7 deletions system-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c9585b4

Please sign in to comment.