Made Node tests support multiple versions and set the Node default version to 4 everywhere possible

pull/6376/head
murgatroid99 9 years ago
parent 90b4a87d3b
commit 9fab438669
  1. 4
      templates/tools/dockerfile/node_deps.include
  2. 5
      tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
  3. 2
      tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh
  4. 5
      tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile
  5. 2
      tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh
  6. 5
      tools/dockerfile/test/multilang_jessie_x64/Dockerfile
  7. 5
      tools/dockerfile/test/node_jessie_x64/Dockerfile
  8. 12
      tools/run_tests/run_tests.py

@ -4,4 +4,8 @@
# Install nvm
RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
# Install all versions of node that we want to test
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm alias default 4"

@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install nvm
RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
# Install all versions of node that we want to test
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm alias default 4"
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++

@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc
nvm use 0.12
nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell
# build Node interop client & server
npm install -g node-gyp

@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install nvm
RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
# Install all versions of node that we want to test
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm alias default 4"
# Google Cloud platform API libraries
RUN apt-get update && apt-get install -y python-pip && apt-get clean
RUN pip install --upgrade google-api-python-client

@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc
nvm use 0.12
nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell
# build Node interop client & server
npm install -g node-gyp

@ -90,8 +90,11 @@ RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev c
# Install nvm
RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
# Install all versions of node that we want to test
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm alias default 4"
#=================
# PHP dependencies

@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install nvm
RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
# Install all versions of node that we want to test
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache"
RUN /bin/bash -l -c "nvm alias default 4"
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++

@ -272,12 +272,17 @@ class NodeLanguage(object):
def __init__(self):
self.platform = platform_string()
self.node_version = '0.12'
def configure(self, config, args):
self.config = config
self.args = args
_check_compiler(self.args.compiler, ['default'])
_check_compiler(self.args.compiler, ['default', 'node0.12',
'node4', 'node5'])
if self.args.compiler == 'default':
self.node_version = '4'
else:
# Take off the word "node"
self.node_version = self.args.compiler[4:]
def test_specs(self):
if self.platform == 'windows':
@ -802,7 +807,8 @@ argp.add_argument('--compiler',
'gcc4.4', 'gcc4.9', 'gcc5.3',
'clang3.4', 'clang3.6',
'vs2010', 'vs2013', 'vs2015',
'python2.7', 'python3.4'],
'python2.7', 'python3.4',
'node0.12', 'node4', 'node5'],
default='default',
help='Selects compiler to use. Allowed values depend on the platform and language.')
argp.add_argument('--build_only',

Loading…
Cancel
Save