ignoring test if node is not present
authorHenrique <henrique@henrique-vb.(none)>
Fri, 10 May 2013 23:24:59 +0000 (01:24 +0200)
committerHenrique <henrique@henrique-vb.(none)>
Fri, 10 May 2013 23:24:59 +0000 (01:24 +0200)
test/nodejs/Makefile.am

index 8f74ba8..06e2eec 100755 (executable)
@@ -22,14 +22,15 @@ stubs: ../ThriftTest.thrift
        $(THRIFT) --gen js:node ../ThriftTest.thrift
 
 check: stubs
-       @if which expresso &> /dev/null ; then \
+       @if which nodeunit &> /dev/null ; then \
                echo "   Testing thrift/binary"; \
                NODE_PATH=../../lib/nodejs/lib:../../lib/nodejs/lib/thrift:$(NODE_PATH) nodeunit ../../lib/nodejs/test/binary.test.js; \
        fi
-       timeout 2 $(MAKE) server &
-       @sleep 1
-       $(MAKE) client
-       @sleep 1
+       @if which node &> /dev/null ; then \
+               echo "   Testing Client/Server"; \
+               timeout 2 $(MAKE) server & \
+               sleep 1; $(MAKE) client; sleep 1; \
+       fi
 
 clean-local:
        $(RM) -r gen-nodejs