From 13aadbcf315e6b2082e38a9816376363f4ed7126 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 14 Sep 2014 16:42:23 -0700 Subject: [PATCH 1/4] Run slow tests in ksh too --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ba1b1bc..d5b76d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,3 +27,5 @@ env: - SHELL=bash TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=zsh TEST_SUITE=slow - SHELL=zsh TEST_SUITE=slow WITHOUT_CURL=1 + - SHELL=ksh TEST_SUITE=slow + - SHELL=ksh TEST_SUITE=slow WITHOUT_CURL=1 From ba08fa31d878c66335a328f09f591bd7f1c03184 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 14 Sep 2014 17:24:30 -0700 Subject: [PATCH 2/4] Moving actual installation tests to their own suite. --- .travis.yml | 10 ++++++++++ package.json | 3 ++- .../install already installed uses it | 0 .../nvm install => installation}/install from binary | 0 .../nvm install => installation}/install from source | 0 .../install two versions and use the latest one | 0 .../install version specified in .nvmrc from binary | 0 .../install version specified in .nvmrc from source | 0 test/{slow/nvm install => installation}/setup_dir | 0 test/{slow/nvm install => installation}/teardown_dir | 0 10 files changed, 12 insertions(+), 1 deletion(-) rename test/{slow/nvm install => installation}/install already installed uses it (100%) rename test/{slow/nvm install => installation}/install from binary (100%) rename test/{slow/nvm install => installation}/install from source (100%) rename test/{slow/nvm install => installation}/install two versions and use the latest one (100%) rename test/{slow/nvm install => installation}/install version specified in .nvmrc from binary (100%) rename test/{slow/nvm install => installation}/install version specified in .nvmrc from source (100%) rename test/{slow/nvm install => installation}/setup_dir (100%) rename test/{slow/nvm install => installation}/teardown_dir (100%) diff --git a/.travis.yml b/.travis.yml index d5b76d3..313622f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,3 +29,13 @@ env: - SHELL=zsh TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=ksh TEST_SUITE=slow - SHELL=ksh TEST_SUITE=slow WITHOUT_CURL=1 + - SHELL=sh TEST_SUITE=installation + - SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1 + - SHELL=dash TEST_SUITE=installation + - SHELL=dash TEST_SUITE=installation WITHOUT_CURL=1 + - SHELL=bash TEST_SUITE=installation + - SHELL=bash TEST_SUITE=installation WITHOUT_CURL=1 + - SHELL=zsh TEST_SUITE=installation + - SHELL=zsh TEST_SUITE=installation WITHOUT_CURL=1 + - SHELL=ksh TEST_SUITE=installation + - SHELL=ksh TEST_SUITE=installation WITHOUT_CURL=1 diff --git a/package.json b/package.json index 96bc191..1c810ad 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "scripts": { "test": "urchin test", "test/fast": "urchin -f test/fast", - "test/slow": "urchin -f test/slow" + "test/slow": "urchin -f test/slow", + "test/installation": "urchin -f test/installation" }, "repository": { "type": "git", diff --git a/test/slow/nvm install/install already installed uses it b/test/installation/install already installed uses it similarity index 100% rename from test/slow/nvm install/install already installed uses it rename to test/installation/install already installed uses it diff --git a/test/slow/nvm install/install from binary b/test/installation/install from binary similarity index 100% rename from test/slow/nvm install/install from binary rename to test/installation/install from binary diff --git a/test/slow/nvm install/install from source b/test/installation/install from source similarity index 100% rename from test/slow/nvm install/install from source rename to test/installation/install from source diff --git a/test/slow/nvm install/install two versions and use the latest one b/test/installation/install two versions and use the latest one similarity index 100% rename from test/slow/nvm install/install two versions and use the latest one rename to test/installation/install two versions and use the latest one diff --git a/test/slow/nvm install/install version specified in .nvmrc from binary b/test/installation/install version specified in .nvmrc from binary similarity index 100% rename from test/slow/nvm install/install version specified in .nvmrc from binary rename to test/installation/install version specified in .nvmrc from binary diff --git a/test/slow/nvm install/install version specified in .nvmrc from source b/test/installation/install version specified in .nvmrc from source similarity index 100% rename from test/slow/nvm install/install version specified in .nvmrc from source rename to test/installation/install version specified in .nvmrc from source diff --git a/test/slow/nvm install/setup_dir b/test/installation/setup_dir similarity index 100% rename from test/slow/nvm install/setup_dir rename to test/installation/setup_dir diff --git a/test/slow/nvm install/teardown_dir b/test/installation/teardown_dir similarity index 100% rename from test/slow/nvm install/teardown_dir rename to test/installation/teardown_dir From ad604cc068718735664e4ca03765250bb2f3f3af Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 14 Sep 2014 17:25:17 -0700 Subject: [PATCH 3/4] Only run the "installation" tests both with and without curl. --- .travis.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 313622f..d3491ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,25 +10,15 @@ script: - NVM_DIR=$TRAVIS_BUILD_DIR make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin $SHELL env: - SHELL=sh TEST_SUITE=fast - - SHELL=sh TEST_SUITE=fast WITHOUT_CURL=1 - SHELL=dash TEST_SUITE=fast - - SHELL=dash TEST_SUITE=fast WITHOUT_CURL=1 - SHELL=bash TEST_SUITE=fast - - SHELL=bash TEST_SUITE=fast WITHOUT_CURL=1 - SHELL=zsh TEST_SUITE=fast - - SHELL=zsh TEST_SUITE=fast WITHOUT_CURL=1 - SHELL=ksh TEST_SUITE=fast - - SHELL=ksh TEST_SUITE=fast WITHOUT_CURL=1 - SHELL=sh TEST_SUITE=slow - - SHELL=sh TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=dash TEST_SUITE=slow - - SHELL=dash TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=bash TEST_SUITE=slow - - SHELL=bash TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=zsh TEST_SUITE=slow - - SHELL=zsh TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=ksh TEST_SUITE=slow - - SHELL=ksh TEST_SUITE=slow WITHOUT_CURL=1 - SHELL=sh TEST_SUITE=installation - SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=dash TEST_SUITE=installation From 354be52672f228bd4e2a238e6b10769eeff20b25 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 14 Sep 2014 17:51:34 -0700 Subject: [PATCH 4/4] Correct installation test paths --- test/installation/install already installed uses it | 6 +++--- test/installation/install from binary | 6 +++--- test/installation/install from source | 6 +++--- .../install two versions and use the latest one | 10 +++++----- .../install version specified in .nvmrc from binary | 6 +++--- .../install version specified in .nvmrc from source | 6 +++--- test/installation/teardown_dir | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/test/installation/install already installed uses it b/test/installation/install already installed uses it index ffcbb02..8a7dd9a 100755 --- a/test/installation/install already installed uses it +++ b/test/installation/install already installed uses it @@ -2,13 +2,13 @@ die () { echo $@ ; exit 1; } -. ../../../nvm.sh +. ../../nvm.sh [ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message" # Remove the stuff we're clobbering. -[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7 -[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12 +[ -e ../../v0.9.7 ] && rm -R ../../v0.9.7 +[ -e ../../v0.9.12 ] && rm -R ../../v0.9.12 # Install from binary nvm install 0.9.7 diff --git a/test/installation/install from binary b/test/installation/install from binary index 82124e0..9138933 100755 --- a/test/installation/install from binary +++ b/test/installation/install from binary @@ -1,17 +1,17 @@ #!/bin/sh set -e -. ../../../nvm.sh +. ../../nvm.sh NVM_TEST_VERSION=v0.10.7 # Remove the stuff we're clobbering. -[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION +[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION # Install from binary nvm install $NVM_TEST_VERSION # Check -[ -d ../../../$NVM_TEST_VERSION ] +[ -d ../../$NVM_TEST_VERSION ] nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION diff --git a/test/installation/install from source b/test/installation/install from source index fdb5c0e..a535b75 100755 --- a/test/installation/install from source +++ b/test/installation/install from source @@ -1,17 +1,17 @@ #!/bin/sh set -e -. ../../../nvm.sh +. ../../nvm.sh NVM_TEST_VERSION=v0.10.7 # Remove the stuff we're clobbering. -[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION +[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION # Install from source nvm install -s $NVM_TEST_VERSION # Check -[ -d ../../../$NVM_TEST_VERSION ] +[ -d ../../$NVM_TEST_VERSION ] nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION diff --git a/test/installation/install two versions and use the latest one b/test/installation/install two versions and use the latest one index df6670d..9f50510 100755 --- a/test/installation/install two versions and use the latest one +++ b/test/installation/install two versions and use the latest one @@ -1,19 +1,19 @@ #!/bin/sh set -e -. ../../../nvm.sh +. ../../nvm.sh # Remove the stuff we're clobbering. -[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7 -[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12 +[ -e ../../v0.9.7 ] && rm -R ../../v0.9.7 +[ -e ../../v0.9.12 ] && rm -R ../../v0.9.12 # Install from binary nvm install 0.9.7 nvm i 0.9.12 # Check -[ -d ../../../v0.9.7 ] -[ -d ../../../v0.9.12 ] +[ -d ../../v0.9.7 ] +[ -d ../../v0.9.12 ] # Use the first one nvm use 0.9.7 diff --git a/test/installation/install version specified in .nvmrc from binary b/test/installation/install version specified in .nvmrc from binary index 7758afe..b261970 100755 --- a/test/installation/install version specified in .nvmrc from binary +++ b/test/installation/install version specified in .nvmrc from binary @@ -1,12 +1,12 @@ #!/bin/sh set -e -. ../../../nvm.sh +. ../../nvm.sh NVM_TEST_VERSION=v0.10.7 # Remove the stuff we're clobbering. -[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION +[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION # Install from binary echo "$NVM_TEST_VERSION" > .nvmrc @@ -14,7 +14,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc nvm install # Check -[ -d ../../../$NVM_TEST_VERSION ] +[ -d ../../$NVM_TEST_VERSION ] nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION diff --git a/test/installation/install version specified in .nvmrc from source b/test/installation/install version specified in .nvmrc from source index 189fffa..5544d0e 100755 --- a/test/installation/install version specified in .nvmrc from source +++ b/test/installation/install version specified in .nvmrc from source @@ -1,12 +1,12 @@ #!/bin/sh set -e -. ../../../nvm.sh +. ../../nvm.sh NVM_TEST_VERSION=v0.10.7 # Remove the stuff we're clobbering. -[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION +[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION # Install from binary echo "$NVM_TEST_VERSION" > .nvmrc @@ -14,7 +14,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc nvm install -s # Check -[ -d ../../../$NVM_TEST_VERSION ] +[ -d ../../$NVM_TEST_VERSION ] nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION diff --git a/test/installation/teardown_dir b/test/installation/teardown_dir index 3f107c9..7637390 100755 --- a/test/installation/teardown_dir +++ b/test/installation/teardown_dir @@ -1,6 +1,6 @@ #!/bin/sh -. ../../../nvm.sh +. ../../nvm.sh nvm uninstall v0.10.7 if [ -f ".nvmrc" ]; then