From 6d5f506c99ac31014949e166e2fedcc428a38d60 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 4 Feb 2015 00:27:45 +0000 Subject: [PATCH] Re-enable io.js support on .travis.yml On the 3rd of February, the planned roll out on Travis was reverted and is now rescheduled for a later date. This commit re-enables io.js support on Travis due the original one being reverted. --- .travis.yml | 1 + Makefile | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3cf7bc..f26f553 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: node_js node_js: - "0.11" + - iojs script: "make test-travis" after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls" diff --git a/Makefile b/Makefile index 19755f9..af3deba 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,32 @@ - SRC = lib/*.js include node_modules/make-lint/index.mk +BIN = iojs + +ifeq ($(findstring io.js, $(shell which node)),) + BIN = node +endif + +ifeq (node, $(BIN)) + FLAGS = --harmony-generators +endif + TESTS = test/application \ test/context/* \ test/request/* \ test/response/* test: - @NODE_ENV=test ./node_modules/.bin/mocha \ + @NODE_ENV=test $(BIN) $(FLAGS) \ + ./node_modules/.bin/_mocha \ --require should \ - --harmony \ $(TESTS) \ --bail test-cov: - @NODE_ENV=test node --harmony \ - node_modules/.bin/istanbul cover \ + @NODE_ENV=test $(BIN) $(FLAGS) \ + ./node_modules/.bin/istanbul cover \ ./node_modules/.bin/_mocha \ -- -u exports \ --require should \ @@ -25,8 +34,8 @@ test-cov: --bail test-travis: - @NODE_ENV=test node --harmony \ - node_modules/.bin/istanbul cover \ + @NODE_ENV=test $(BIN) $(FLAGS) \ + ./node_modules/.bin/istanbul cover \ ./node_modules/.bin/_mocha \ --report lcovonly \ -- -u exports \