22
33# set -e
44
5- test_node_versions=" 0.8.28 0.10.40 0.12.7"
5+ test_node_versions=" 0.8.28 0.10.40 0.12.7 4.3.0 5.6.0 "
66test_iojs_versions=" 1.8.4 2.4.0 3.3.0"
77
8+ myuid=$( id -u)
9+ mygid=$( id -g)
810__dirname=" $( CDPATH= cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
911dot_node_gyp=${__dirname} /.node-gyp/
1012
@@ -41,6 +43,7 @@ run_tests() {
4143 /bin/su -s /bin/bash node-gyp -c 'cd && ${run_cmd} '"
4244
4345 rm -rf $dot_node_gyp
46+ mkdir $dot_node_gyp
4447
4548 docker run \
4649 --rm -i \
@@ -52,10 +55,10 @@ run_tests() {
5255
5356# A base image with build tools and a user account
5457setup_container " node-gyp-test/base" " ubuntu:14.04" "
58+ adduser --gecos node-gyp --home /node-gyp/ --disabled-login node-gyp --uid $myuid &&
59+ echo " node-gyp:node-gyp" | chpasswd &&
5560 apt-get update &&
56- apt-get install -y build-essential python git rsync curl &&
57- adduser --gecos node-gyp --home /node-gyp/ --disabled-login node-gyp &&
58- echo " node-gyp:node-gyp" | chpasswd
61+ apt-get install -y build-essential python git rsync curl
5962"
6063
6164# An image on top of the base containing clones of repos we want to use for testing
@@ -111,7 +114,9 @@ test_download_node_version() {
111114test_download_node_version " 0.12.7" " 0.10.30/src" " 0.10.30"
112115test_download_node_version " 3.3.0" " iojs-1.8.4/src" " 1.8.4"
113116# should download the headers file
114- test_download_node_version " 3.3.0" " iojs-3.2.0/include/node" " 3.2.0"
117+ test_download_node_version " 3.3.0" " iojs-3.3.0/include/node" " 3.3.0"
118+ test_download_node_version " 4.3.0" " 4.3.0/include/node" " 4.3.0"
119+ test_download_node_version " 5.6.0" " 5.6.0/include/node" " 5.6.0"
115120
116121# TODO: test --dist-url by starting up a localhost server and serving up tarballs
117122
@@ -126,18 +131,34 @@ run_tests "3.3.0" "
126131 nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
127132"
128133
134+ # REMOVE after next semver-major
129135run_tests " 3.3.0" "
130136 (node /node-gyp-src/test/simple-proxy.js 8080 /doobar/ https://iojs.org/dist/ &) &&
131137 cd node-buffertools &&
132138 NVM_IOJS_ORG_MIRROR=http://localhost:8080/doobar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
133139 nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
134140"
135141
142+ # REMOVE after next semver-major
136143run_tests " 0.12.7" "
137144 (node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) &&
138145 cd node-buffertools &&
139146 NVM_NODEJS_ORG_MIRROR=http://localhost:8080/boombar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
140147 nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
141148"
142149
150+ run_tests " 3.3.0" "
151+ (node /node-gyp-src/test/simple-proxy.js 8080 /doobar/ https://iojs.org/dist/ &) &&
152+ cd node-buffertools &&
153+ IOJS_ORG_MIRROR=http://localhost:8080/doobar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
154+ nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
155+ "
156+
157+ run_tests " 0.12.7" "
158+ (node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) &&
159+ cd node-buffertools &&
160+ NODEJS_ORG_MIRROR=http://localhost:8080/boombar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
161+ nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
162+ "
163+
143164rm -rf $dot_node_gyp
0 commit comments