File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,18 @@ retry() {
6
6
" ${@ } " || " ${@ } " || " ${@ } " || return 1
7
7
}
8
8
9
+ function timeout_after() {
10
+ if [ -f /bin/busybox ]; then
11
+ timeout -t " ${@ } "
12
+ else
13
+ timeout " ${@ } "
14
+ fi
15
+ }
16
+
17
+ npm_install () {
18
+ timeout_after 60 npm install " ${@ } "
19
+ }
20
+
9
21
set -eox pipefail
10
22
cd $( dirname $0 ) /..
11
23
@@ -16,9 +28,9 @@ NODEDIR=$(dirname $(dirname $(which node)))
16
28
# contains unreleased fixes that allow the native component to be compiled
17
29
# with Node's V8 canary build.
18
30
[ -z $NVM_NODEJS_ORG_MIRROR ] \
19
- || retry npm install https://github.com/nodejs/nan.git
31
+ || retry npm_install https://github.com/nodejs/nan.git
20
32
21
- retry npm install --nodedir=" $NODEDIR " \
33
+ retry npm_install --nodedir=" $NODEDIR " \
22
34
${BINARY_HOST: +--pprof_binary_host_mirror=$BINARY_HOST } > /dev/null
23
35
24
36
npm run compile
@@ -30,8 +42,8 @@ TESTDIR=$(mktemp -d)
30
42
cp -r " $PWD /system-test/busybench" " $TESTDIR "
31
43
cd " $TESTDIR /busybench"
32
44
33
- retry npm install pify @types/pify typescript gts @types/node > /dev/null
34
- retry npm install --nodedir=" $NODEDIR " \
45
+ retry npm_install pify @types/pify typescript gts @types/node > /dev/null
46
+ retry npm_install --nodedir=" $NODEDIR " \
35
47
${BINARY_HOST: +--pprof_binary_host_mirror=$BINARY_HOST } \
36
48
" $PROFILER " > /dev/null
37
49
You can’t perform that action at this time.
0 commit comments