8000 test: use latest stable instead of canary in system test by amchiclet · Pull Request #193 · google/pprof-nodejs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

test: use latest stable instead of canary in system test #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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