diff --git a/test/distrib/node/run_distrib_test.sh b/test/distrib/node/run_distrib_test.sh index 90637cc01d0f402508cffd4098e10ae236a08756..ac9e7d70907981f0433897512371fcd63e5a239d 100755 --- a/test/distrib/node/run_distrib_test.sh +++ b/test/distrib/node/run_distrib_test.sh @@ -32,7 +32,12 @@ set -ex cd $(dirname $0) -nvm install $1 +NODE_VERSION="$1" + +# make sure nvm is available +source ~/.nvm/nvm.sh || true + +nvm install $NODE_VERSION npm install -g node-static diff --git a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile index bd40ab2b4cb2557aa7fda2ce620bf1890bc48a30..8b97d8bb5a3be1aaec3ae73ac5a7c8c39f987a11 100644 --- a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile @@ -29,8 +29,8 @@ FROM 32bit/debian:jessie -RUN apt-get update && apt-get install -y git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash \ No newline at end of file +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index a1e45ece9dcd1425feeb77848a03fefa079e2a20..f3ebc00b4ef27aeaca340ea7a63cdbc38d9fe614 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -105,8 +105,7 @@ class NodeDistribTest(object): 'tools/dockerfile/distribtest/node_%s_%s' % ( self.docker_suffix, self.arch), - # bash -l needed to make nvm available - 'bash -l test/distrib/node/run_distrib_test.sh %s' % ( + 'test/distrib/node/run_distrib_test.sh %s' % ( self.node_version)) def __str__(self): return self.name