Skip to content
Snippets Groups Projects
Commit 5a779537 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #6376 from murgatroid99/node_test_multiple_versions

Made Node tests support multiple versions and set the Node default version to 4 everywhere possible
parents d00ed308 957fe8dc
No related branches found
No related tags found
No related merge requests found
...@@ -4,4 +4,8 @@ ...@@ -4,4 +4,8 @@
# Install nvm # Install nvm
RUN touch .profile RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 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 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"
\ No newline at end of file
...@@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean ...@@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install nvm # Install nvm
RUN touch .profile RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 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 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 # Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++ 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 ...@@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc 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 # build Node interop client & server
npm install -g node-gyp npm install -g node-gyp
......
...@@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean ...@@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install nvm # Install nvm
RUN touch .profile RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 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 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 # Google Cloud platform API libraries
RUN apt-get update && apt-get install -y python-pip && apt-get clean RUN apt-get update && apt-get install -y python-pip && apt-get clean
RUN pip install --upgrade google-api-python-client RUN pip install --upgrade google-api-python-client
......
...@@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc ...@@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
cp -r /var/local/jenkins/service_account $HOME || true cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc 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 # build Node interop client & server
npm install -g node-gyp npm install -g node-gyp
......
...@@ -90,8 +90,11 @@ RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev c ...@@ -90,8 +90,11 @@ RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev c
# Install nvm # Install nvm
RUN touch .profile RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 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 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 # PHP dependencies
......
...@@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean ...@@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean
# Install nvm # Install nvm
RUN touch .profile RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 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 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 # Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++ RUN ln -s /usr/bin/ccache /usr/local/bin/g++
......
...@@ -95,6 +95,9 @@ sudo pip install tox ...@@ -95,6 +95,9 @@ sudo pip install tox
touch .profile touch .profile
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
nvm install 0.12 && npm config set cache /tmp/npm-cache nvm install 0.12 && npm config set cache /tmp/npm-cache
nvm install 4 && npm config set cache /tmp/npm-cache
nvm install 5 && npm config set cache /tmp/npm-cache
nvm alias default 4
# C# dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives) # C# dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
source ~/.nvm/nvm.sh source ~/.nvm/nvm.sh
nvm use 0.12 nvm use 4
set -ex set -ex
......
...@@ -272,12 +272,17 @@ class NodeLanguage(object): ...@@ -272,12 +272,17 @@ class NodeLanguage(object):
def __init__(self): def __init__(self):
self.platform = platform_string() self.platform = platform_string()
self.node_version = '0.12'
def configure(self, config, args): def configure(self, config, args):
self.config = config self.config = config
self.args = args 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): def test_specs(self):
if self.platform == 'windows': if self.platform == 'windows':
...@@ -802,7 +807,8 @@ argp.add_argument('--compiler', ...@@ -802,7 +807,8 @@ argp.add_argument('--compiler',
'gcc4.4', 'gcc4.9', 'gcc5.3', 'gcc4.4', 'gcc4.9', 'gcc5.3',
'clang3.4', 'clang3.6', 'clang3.4', 'clang3.6',
'vs2010', 'vs2013', 'vs2015', 'vs2010', 'vs2013', 'vs2015',
'python2.7', 'python3.4'], 'python2.7', 'python3.4',
'node0.12', 'node4', 'node5'],
default='default', default='default',
help='Selects compiler to use. Allowed values depend on the platform and language.') help='Selects compiler to use. Allowed values depend on the platform and language.')
argp.add_argument('--build_only', argp.add_argument('--build_only',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment