get tests working better on Linux, no-dtracey plats

This commit is contained in:
Trent Mick 2013-01-23 00:52:28 +00:00
parent b1c143c87a
commit 0f5baa728b

View file

@ -9,6 +9,14 @@ ifeq ($(shell uname -s),SunOS)
# necessary. # necessary.
SUDO := SUDO :=
endif endif
DTRACE_UP_IN_HERE=
ifeq ($(shell uname -s),SunOS)
DTRACE_UP_IN_HERE=1
endif
ifeq ($(shell uname -s),Darwin)
DTRACE_UP_IN_HERE=1
endif
NODEOPT ?= $(HOME)/opt
@ -67,9 +75,9 @@ distclean:
.PHONY: test .PHONY: test
test: $(NODEUNIT) test: $(NODEUNIT)
[[ -n "$(SKIP_DTRACE)" ]] || \ test -z "$(DTRACE_UP_IN_HERE)" || test -n "$(SKIP_DTRACE)" || \
node -e 'require("dtrace-provider").createDTraceProvider("isthisthingon")' && \ (node -e 'require("dtrace-provider").createDTraceProvider("isthisthingon")' && \
$(SUDO) $(NODEUNIT) test/dtrace.test.js $(SUDO) $(NODEUNIT) test/dtrace.test.js)
$(NODEUNIT) $(NON_DTRACE_TEST_FILES) $(NODEUNIT) $(NON_DTRACE_TEST_FILES)
# Test will all node supported versions (presumes install locations I use on # Test will all node supported versions (presumes install locations I use on
@ -81,16 +89,19 @@ testall: test06 test08
.PHONY: test09 .PHONY: test09
test09: test09:
@echo "# Test node 0.9.x (with node `$(HOME)/opt/node-0.9/bin/node --version`)" @echo "# Test node 0.9.x (with node `$(NODEOPT)/node-0.9/bin/node --version`)"
PATH="$(HOME)/opt/node-0.9/bin:$(PATH)" make distclean all test @$(NODEOPT)/node-0.9/bin/node --version
PATH="$(NODEOPT)/node-0.9/bin:$(PATH)" make distclean all test
.PHONY: test08 .PHONY: test08
test08: test08:
@echo "# Test node 0.8.x (with node `$(HOME)/opt/node-0.8/bin/node --version`)" @echo "# Test node 0.8.x (with node `$(NODEOPT)/node-0.8/bin/node --version`)"
PATH="$(HOME)/opt/node-0.8/bin:$(PATH)" make distclean all test @$(NODEOPT)/node-0.8/bin/node --version
PATH="$(NODEOPT)/node-0.8/bin:$(PATH)" make distclean all test
.PHONY: test06 .PHONY: test06
test06: test06:
@echo "# Test node 0.6.x (with node `$(HOME)/opt/node-0.6/bin/node --version`)" @echo "# Test node 0.6.x (with node `$(NODEOPT)/node-0.6/bin/node --version`)"
PATH="$(HOME)/opt/node-0.6/bin:$(PATH)" make distclean all test @$(NODEOPT)/node-0.6/bin/node --version
PATH="$(NODEOPT)/node-0.6/bin:$(PATH)" make distclean all test
#---- check #---- check