From 79203ba5d02c894af08256c51960d4668629e4e2 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Fri, 9 May 2014 16:23:14 +0200 Subject: [PATCH 1/7] split tests by shell --- .travis.yml | 10 ++++++++-- Makefile | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1620f2c..f9be6f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,11 @@ install: before_script: - curl -o /tmp/urchin https://raw.githubusercontent.com/scraperwiki/urchin/master/urchin && chmod +x /tmp/urchin script: - - NVM_DIR=$TRAVIS_BUILD_DIR make URCHIN=/tmp/urchin test - + - NVM_DIR=$TRAVIS_BUILD_DIR make URCHIN=/tmp/urchin test_shell +env: + - SHELL=sh TEST_SUITE=fast + - SHELL=dash TEST_SUITE=fast + - SHELL=bash TEST_SUITE=fast + - SHELL=zsh TEST_SUITE=fast + - SHELL=ksh TEST_SUITE=fast +# - SHELL=bash TEST_SUITE=slow diff --git a/Makefile b/Makefile index cb14573..090ebf6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ URCHIN=`which urchin` SHELLS=sh bash dash ksh zsh -.PHONY: $(SHELLS) test +.PHONY: $(SHELLS) test test_shell fast: $(SHELLS) @@ -12,5 +12,8 @@ $(SHELLS): test: fast @$(URCHIN) -f test/slow +test_shell: + @$(SHELL) $(URCHIN) -f test/$(TEST_SUITE) + default: test From 8fbbeb8fc51fd59de455caa6708399f054742c08 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Fri, 9 May 2014 16:30:04 +0200 Subject: [PATCH 2/7] ensure correct shell usage --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 090ebf6..323628c 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ test: fast @$(URCHIN) -f test/slow test_shell: + @printf '\n\033[0;34m%s\033[0m\n' "Running tests in $(SHELL)" @$(SHELL) $(URCHIN) -f test/$(TEST_SUITE) default: test From 7e20a77c89fb0ffe0d502462e4067001b22e3dbf Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Fri, 9 May 2014 16:34:45 +0200 Subject: [PATCH 3/7] pass env vars to makefile --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f9be6f4..ae98843 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ install: before_script: - curl -o /tmp/urchin https://raw.githubusercontent.com/scraperwiki/urchin/master/urchin && chmod +x /tmp/urchin script: - - NVM_DIR=$TRAVIS_BUILD_DIR make URCHIN=/tmp/urchin test_shell + - NVM_DIR=$TRAVIS_BUILD_DIR make SHELL=$SHELL TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin test_shell env: - SHELL=sh TEST_SUITE=fast - SHELL=dash TEST_SUITE=fast From 61de5f9ca3c27b54e9271370efcb9c347b5a4fd6 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Sat, 10 May 2014 12:15:19 +0200 Subject: [PATCH 4/7] enable slow test suite for sh --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae98843..78b7ad3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ env: - SHELL=bash TEST_SUITE=fast - SHELL=zsh TEST_SUITE=fast - SHELL=ksh TEST_SUITE=fast -# - SHELL=bash TEST_SUITE=slow + - SHELL=sh TEST_SUITE=slow From 24e22dd8bc8b4ffea3335e54e23726f3ff704458 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Sat, 10 May 2014 12:27:11 +0200 Subject: [PATCH 5/7] no need for the extra task, every shell name is already a task --- .travis.yml | 2 +- Makefile | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78b7ad3..36fbc86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ install: before_script: - curl -o /tmp/urchin https://raw.githubusercontent.com/scraperwiki/urchin/master/urchin && chmod +x /tmp/urchin script: - - NVM_DIR=$TRAVIS_BUILD_DIR make SHELL=$SHELL TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin test_shell + - NVM_DIR=$TRAVIS_BUILD_DIR make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin $SHELL env: - SHELL=sh TEST_SUITE=fast - SHELL=dash TEST_SUITE=fast diff --git a/Makefile b/Makefile index 323628c..cb14573 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ URCHIN=`which urchin` SHELLS=sh bash dash ksh zsh -.PHONY: $(SHELLS) test test_shell +.PHONY: $(SHELLS) test fast: $(SHELLS) @@ -12,9 +12,5 @@ $(SHELLS): test: fast @$(URCHIN) -f test/slow -test_shell: - @printf '\n\033[0;34m%s\033[0m\n' "Running tests in $(SHELL)" - @$(SHELL) $(URCHIN) -f test/$(TEST_SUITE) - default: test From 5925bd5e37497e7f899086502e9b8d05cd2ee457 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Sat, 10 May 2014 18:59:34 +0200 Subject: [PATCH 6/7] make suite for shell task configurable --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cb14573..551824b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ URCHIN=`which urchin` SHELLS=sh bash dash ksh zsh +TEST_SUITE=fast .PHONY: $(SHELLS) test @@ -7,7 +8,7 @@ fast: $(SHELLS) $(SHELLS): @printf '\n\033[0;34m%s\033[0m\n' "Running tests in $@" - @$@ $(URCHIN) -f test/fast + @$@ $(URCHIN) -f test/$(TEST_SUITE) test: fast @$(URCHIN) -f test/slow From 88595f09aa3ed7eb5929959618e0bcf16b60a7d3 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Sat, 10 May 2014 19:03:50 +0200 Subject: [PATCH 7/7] remove fast task --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 551824b..67d860b 100644 --- a/Makefile +++ b/Makefile @@ -4,13 +4,11 @@ TEST_SUITE=fast .PHONY: $(SHELLS) test -fast: $(SHELLS) - $(SHELLS): @printf '\n\033[0;34m%s\033[0m\n' "Running tests in $@" @$@ $(URCHIN) -f test/$(TEST_SUITE) -test: fast +test: $(SHELLS) @$(URCHIN) -f test/slow default: test