2
2
3
3
# set -e
4
4
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 "
6
6
test_iojs_versions=" 1.8.4 2.4.0 3.3.0"
7
7
8
+ myuid=$( id -u)
9
+ mygid=$( id -g)
8
10
__dirname=" $( CDPATH= cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
9
11
dot_node_gyp=${__dirname} /.node-gyp/
10
12
@@ -41,6 +43,7 @@ run_tests() {
41
43
/bin/su -s /bin/bash node-gyp -c 'cd && ${run_cmd} '"
42
44
43
45
rm -rf $dot_node_gyp
46
+ mkdir $dot_node_gyp
44
47
45
48
docker run \
46
49
--rm -i \
@@ -52,10 +55,10 @@ run_tests() {
52
55
53
56
# A base image with build tools and a user account
54
57
setup_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 &&
55
60
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
59
62
"
60
63
61
64
# 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() {
111
114
test_download_node_version " 0.12.7" " 0.10.30/src" " 0.10.30"
112
115
test_download_node_version " 3.3.0" " iojs-1.8.4/src" " 1.8.4"
113
116
# 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"
115
120
116
121
# TODO: test --dist-url by starting up a localhost server and serving up tarballs
117
122
@@ -126,18 +131,34 @@ run_tests "3.3.0" "
126
131
nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
127
132
"
128
133
134
+ # REMOVE after next semver-major
129
135
run_tests " 3.3.0" "
130
136
(node /node-gyp-src/test/simple-proxy.js 8080 /doobar/ https://iojs.org/dist/ &) &&
131
137
cd node-buffertools &&
132
138
NVM_IOJS_ORG_MIRROR=http://localhost:8080/doobar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
133
139
nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
134
140
"
135
141
142
+ # REMOVE after next semver-major
136
143
run_tests " 0.12.7" "
137
144
(node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) &&
138
145
cd node-buffertools &&
139
146
NVM_NODEJS_ORG_MIRROR=http://localhost:8080/boombar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
140
147
nc -z localhost 8080 && echo -e \"\\ n\\ n\\ 033[31mFAILED TO USE LOCAL PROXY\\ 033[39m\\ n\\ n\"
141
148
"
142
149
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
+
143
164
rm -rf $dot_node_gyp
0 commit comments