Skip to content
Closed
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
6 changes: 4 additions & 2 deletions system-test/Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.17-stretch as builder
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root/
RUN go get github.com/google/pprof

Expand All @@ -12,7 +12,9 @@ ARG ADDITIONAL_PACKAGES
ARG VERIFY_TIME_LINE_NUMBERS

RUN apt-get update && apt-get install -y curl $ADDITIONAL_PACKAGES \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
# workaround needed to force ipv4 on kokoro
&& echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf

ENV NVM_DIR /bin/.nvm
RUN mkdir -p $NVM_DIR
Expand Down
5 changes: 4 additions & 1 deletion system-test/Dockerfile.node-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ FROM node:${NODE_VERSION}-alpine

ARG ADDITIONAL_PACKAGES

RUN apk add --no-cache bash $ADDITIONAL_PACKAGES
RUN apk add --no-cache bash $ADDITIONAL_PACKAGES \
# workaround needed to force ipv4 on kokoro
&& echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf

WORKDIR /root/
COPY --from=builder /go/bin/pprof /bin
RUN chmod a+x /bin/pprof
10 changes: 7 additions & 3 deletions system-test/system_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ set -eox pipefail

cd $(dirname $0)

echo "------------- DEBUGGGGG system_test.sh"
cat /etc/gai.conf
node -e 'const dns = require("dns"); dns.lookup("registry.npmjs.org", (err, address, family) => {console.log(err, address, family);});'

# The list of tested versions below should be in sync with node's
# official releases. https://nodejs.org/en/about/releases/
if [[ -z "$BINARY_HOST" ]]; then
ADDITIONAL_PACKAGES="python3 g++ make"
NODE_VERSIONS=(14 16 18 19)
NODE_VERSIONS=(18)
else
# Tested versions for pre-built binaries are limited based on
# what node-pre-gyp can specify as its target version.
Expand All @@ -30,7 +34,7 @@ for i in ${NODE_VERSIONS[@]}; do
docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" node$i-linux \
/src/system-test/test.sh

docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" \
docker run --sysctl net.ipv6.conf.all.disable_ipv6=1 --sysctl net.ipv6.conf.default.disable_ipv6=1 -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" \
-e VERIFY_TIME_LINE_NUMBERS="true" node$i-linux \
/src/system-test/test.sh

Expand All @@ -39,7 +43,7 @@ for i in ${NODE_VERSIONS[@]}; do
--build-arg ADDITIONAL_PACKAGES="$ADDITIONAL_PACKAGES" \
--build-arg NODE_VERSION=$i -t node$i-alpine .

docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" node$i-alpine \
docker run --sysctl net.ipv6.conf.all.disable_ipv6=1 --sysctl net.ipv6.conf.default.disable_ipv6=1 -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" node$i-alpine \
/src/system-test/test.sh
done

Expand Down
4 changes: 4 additions & 0 deletions system-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ cd "$SRCDIR"

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

echo "------------- DEBUGGGGG test.sh"
cat /etc/gai.conf
node -e 'const dns = require("dns"); dns.lookup("registry.npmjs.org", (err, address, family) => {console.log(err, address, family);});'

retry npm_install --nodedir="$NODEDIR" \
${BINARY_HOST:+--pprof_binary_host_mirror=$BINARY_HOST} >/dev/null

Expand Down