File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,9 @@ test-debugger: all
241
241
test-inspector : all
242
242
$(PYTHON ) tools/test.py inspector
243
243
244
+ test-node-inspect : $(NODE_EXE )
245
+ NODE=$(NODE ) tools/test-node-inspect.sh
246
+
244
247
test-tick-processor : all
245
248
$(PYTHON ) tools/test.py tick-processor
246
249
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # always change the working directory to the project's root directory
6
+ cd $( dirname $0 ) /..
7
+
8
+ # pass a $NODE environment variable from something like Makefile
9
+ # it should point to either ./node or ./node.exe, depending on the platform
10
+ if [ -z $NODE ]; then
11
+ echo " No node executable provided. Bailing." >&2
12
+ exit 0
13
+ fi
14
+
15
+ rm -rf test-node-inspect
16
+
17
+ # make a copy of deps/node-inspect to run the tests on
18
+ cp -r deps/node-inspect test-node-inspect
19
+
20
+ cd test-node-inspect
21
+
22
+ # make sure our test does not leak into the general file system
23
+ mkdir npm-cache npm-tmp npm-prefix
24
+ export npm_config_cache=" $( pwd) /npm-cache"
25
+ export npm_config_prefix=" $( pwd) /npm-prefix"
26
+ export npm_config_tmp=" $( pwd) /npm-tmp"
27
+
28
+ # ensure npm always uses the local node
29
+ export PATH=" $( ../$NODE -p ' require("path").resolve("..")' ) :$PATH "
30
+ unset NODE
31
+
32
+ node ../deps/npm/cli.js install
33
+
34
+ node ./node_modules/.bin/tap ' test/**/*.test.js'
35
+
36
+ # clean up everything one single shot
37
+ cd .. && rm -rf test-node-inspect
You can’t perform that action at this time.
0 commit comments