Run `node` and `io.js` installation test suites separately.

Jordan Harband 2016-05-08 22:21:33 -07:00
parent d000624489
commit c9b7ccdaea
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
22 changed files with 78 additions and 66 deletions

View File

@ -30,13 +30,23 @@ env:
- SHELL=bash TEST_SUITE=sourcing - SHELL=bash TEST_SUITE=sourcing
- SHELL=zsh TEST_SUITE=sourcing - SHELL=zsh TEST_SUITE=sourcing
# - SHELL=ksh TEST_SUITE=sourcing # - SHELL=ksh TEST_SUITE=sourcing
- SHELL=sh TEST_SUITE=installation - SHELL=sh TEST_SUITE=installation_node
# - SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1 # - SHELL=sh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation - SHELL=dash TEST_SUITE=installation_node
# - SHELL=dash TEST_SUITE=installation WITHOUT_CURL=1 # - SHELL=dash TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=bash TEST_SUITE=installation - SHELL=bash TEST_SUITE=installation_node
# - SHELL=bash TEST_SUITE=installation WITHOUT_CURL=1 # - SHELL=bash TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation - SHELL=zsh TEST_SUITE=installation_node
# - SHELL=zsh TEST_SUITE=installation WITHOUT_CURL=1 # - SHELL=zsh TEST_SUITE=installation_node WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation # - SHELL=ksh TEST_SUITE=installation_node
# - SHELL=ksh TEST_SUITE=installation WITHOUT_CURL=1 # - SHELL=ksh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=sh TEST_SUITE=installation_iojs
# - SHELL=sh TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation_iojs
# - SHELL=dash TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=bash TEST_SUITE=installation_iojs
# - SHELL=bash TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation_iojs
# - SHELL=zsh TEST_SUITE=installation_iojs WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_iojs
# - SHELL=ksh TEST_SUITE=installation_iojs WITHOUT_CURL=1

View File

@ -10,7 +10,9 @@
"test/fast": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell", "test/fast": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell",
"test/slow": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell", "test/slow": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell",
"test/install_script": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=install_script test-$shell", "test/install_script": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=install_script test-$shell",
"test/installation": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation test-$shell", "test/installation": "npm run --silent test/installation/node && npm run --silent test/installation/iojs",
"test/installation/node": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_node test-$shell",
"test/installation/iojs": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_iojs test-$shell",
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell" "test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell"
}, },
"repository": { "repository": {

View File

@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; } 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" [ "$(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"

View File

@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION="v1.0.0" NVM_TEST_VERSION="v1.0.0"
NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION" NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"

View File

@ -2,19 +2,19 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
# Remove the stuff we're clobbering. # Remove the stuff we're clobbering.
[ -e ../../../versions/io.js/v1.0.0 ] && rm -R ../../../versions/io.js/v1.0.0 [ -e ../../versions/io.js/v1.0.0 ] && rm -R ../../versions/io.js/v1.0.0
[ -e ../../../versions/io.js/v1.0.1 ] && rm -R ../../../versions/io.js/v1.0.1 [ -e ../../versions/io.js/v1.0.1 ] && rm -R ../../versions/io.js/v1.0.1
# Install from binary # Install from binary
nvm install iojs-v1.0.0 || die "'nvm install iojs-v1.0.0' failed" nvm install iojs-v1.0.0 || die "'nvm install iojs-v1.0.0' failed"
nvm i iojs-v1.0.1 || die "'nvm i iojs-v1.0.1' failed" nvm i iojs-v1.0.1 || die "'nvm i iojs-v1.0.1' failed"
# Check # Check
[ -d ../../../versions/io.js/v1.0.0 ] || die "iojs v1.0.0 didn't exist" [ -d ../../versions/io.js/v1.0.0 ] || die "iojs v1.0.0 didn't exist"
[ -d ../../../versions/io.js/v1.0.1 ] || die "iojs v1.0.1 didn't exist" [ -d ../../versions/io.js/v1.0.1 ] || die "iojs v1.0.1 didn't exist"
# Use the first one # Use the first one
nvm use iojs-1.0.0 || die "'nvm use iojs-1.0.0' failed" nvm use iojs-1.0.0 || die "'nvm use iojs-1.0.0' failed"

View File

@ -2,11 +2,11 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION=v1.0.0 NVM_TEST_VERSION=v1.0.0
NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION" NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"
VERSION_PATH="../../../versions/io.js/$NVM_TEST_VERSION" VERSION_PATH="../../versions/io.js/$NVM_TEST_VERSION"
# Remove the stuff we're clobbering. # Remove the stuff we're clobbering.
[ -e $VERSION_PATH ] && rm -R $VERSION_PATH [ -e $VERSION_PATH ] && rm -R $VERSION_PATH

View File

@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
# Remove the stuff we're clobbering. # Remove the stuff we're clobbering.
[ -e ../../../versions/io.js/v1.0.0 ] && rm -R ../../../versions/io.js/v1.0.0 [ -e ../../versions/io.js/v1.0.0 ] && rm -R ../../versions/io.js/v1.0.0
[ -e ../../../versions/io.js/v1.0.1 ] && rm -R ../../../versions/io.js/v1.0.1 [ -e ../../versions/io.js/v1.0.1 ] && rm -R ../../versions/io.js/v1.0.1
# Install from binary # Install from binary
nvm install iojs-v1.0.0 nvm install iojs-v1.0.0
# Check # Check
[ -d ../../../versions/io.js/v1.0.0 ] || die "nvm install iojs-v1.0.0 didn't install" [ -d ../../versions/io.js/v1.0.0 ] || die "nvm install iojs-v1.0.0 didn't install"
node --version | grep v1.0.0 > /dev/null || die "nvm install didn't use iojs-v1.0.0" node --version | grep v1.0.0 > /dev/null || die "nvm install didn't use iojs-v1.0.0"
@ -23,7 +23,7 @@ nvm ls iojs-1 | grep iojs-v1.0.0 > /dev/null || die "nvm ls iojs-1 didn't show i
nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 || die "nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 failed" nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 || die "nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 failed"
[ -d ../../../versions/io.js/v1.0.1 ] || die "nvm install iojs-v1.0.1 didn't install" [ -d ../../versions/io.js/v1.0.1 ] || die "nvm install iojs-v1.0.1 didn't install"
nvm use iojs-1 nvm use iojs-1
node --version | grep v1.0.1 > /dev/null || die "nvm use iojs-1 didn't use v1.0.1" node --version | grep v1.0.1 > /dev/null || die "nvm use iojs-1 didn't use v1.0.1"

View File

@ -2,19 +2,19 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_VERSION="v1" NVM_VERSION="v1"
NVM_PREFIXED_TEST_VERSION="$(nvm ls-remote "$NVM_VERSION" | tail -n1 | sed 's/^[ ]*//;s/[ ]*$//')" NVM_PREFIXED_TEST_VERSION="$(nvm ls-remote "$NVM_VERSION" | tail -n1 | sed 's/^[ ]*//;s/[ ]*$//')"
NVM_TEST_VERSION="$(nvm_strip_iojs_prefix "$NVM_PREFIXED_TEST_VERSION")" NVM_TEST_VERSION="$(nvm_strip_iojs_prefix "$NVM_PREFIXED_TEST_VERSION")"
# Remove the stuff we're clobbering. # 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 # Install from binary
nvm install "$NVM_VERSION" || die "nvm install $NVM_VERSION failed" nvm install "$NVM_VERSION" || die "nvm install $NVM_VERSION failed"
# Check # Check
[ -d ../../../versions/io.js/$NVM_TEST_VERSION ] [ -d ../../versions/io.js/$NVM_TEST_VERSION ]
nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../nvm.sh
nvm deactivate nvm deactivate
nvm uninstall iojs-v1.0.0 nvm uninstall iojs-v1.0.0

View File

@ -2,13 +2,13 @@
die () { echo $@ ; exit 1; } 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" [ "$(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. # Remove the stuff we're clobbering.
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7 [ -e ../../v0.9.7 ] && rm -R ../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12 [ -e ../../v0.9.12 ] && rm -R ../../v0.9.12
# Install from binary # Install from binary
nvm install 0.9.7 nvm install 0.9.7

View File

@ -2,20 +2,20 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
nvm unalias default || die 'unable to unalias default' nvm unalias default || die 'unable to unalias default'
NVM_TEST_VERSION=v0.10.7 NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering. # 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 # Install from binary
nvm install $NVM_TEST_VERSION || die "install $NVM_TEST_VERSION failed" nvm install $NVM_TEST_VERSION || die "install $NVM_TEST_VERSION failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
# ensure default is set # ensure default is set

View File

@ -2,20 +2,20 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
nvm unalias default || die 'unable to unalias default' nvm unalias default || die 'unable to unalias default'
NVM_TEST_VERSION=v0.10.7 NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering. # 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 # Install from source
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
# ensure default is set # ensure default is set

View File

@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION=v0.8.5 NVM_TEST_VERSION=v0.8.5
# Remove the stuff we're clobbering. # 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 implicitly (v0.8.6 is when binaries started) # Install from source implicitly (v0.8.6 is when binaries started)
nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,20 +2,20 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION=v0.10.41 NVM_TEST_VERSION=v0.10.41
# STAGE 1 # # STAGE 1 #
# Remove the stuff we're clobbering. # 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 with 1 make job # Install from source with 1 make job
nvm install -s -j 1 $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" nvm install -s -j 1 $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
@ -23,11 +23,11 @@ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_T
# STAGE 2 # # STAGE 2 #
# Remove the stuff we're clobbering. # 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 with 2 make jobs (and swapped arg order) # Install from source with 2 make jobs (and swapped arg order)
nvm install -j 2 -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" nvm install -j 2 -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION=v0.10.7 NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering. # Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION [ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Fake ARM arch # Fake ARM arch
nvm_get_arch() { nvm_get_arch() {
@ -18,7 +18,7 @@ nvm_get_arch() {
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check Install # Check Install
[ -d ../../../$NVM_TEST_VERSION ] [ -d ../../$NVM_TEST_VERSION ]
node --version | grep $NVM_TEST_VERSION || "'node --version | grep $NVM_TEST_VERSION' failed" node --version | grep $NVM_TEST_VERSION || "'node --version | grep $NVM_TEST_VERSION' failed"
# Check V8 snapshot isn't compiled # Check V8 snapshot isn't compiled

View File

@ -2,19 +2,19 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
# Remove the stuff we're clobbering. # Remove the stuff we're clobbering.
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7 [ -e ../../v0.9.7 ] && rm -R ../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12 [ -e ../../v0.9.12 ] && rm -R ../../v0.9.12
# Install from binary # Install from binary
nvm install 0.9.7 || die "'nvm install 0.9.7' failed" nvm install 0.9.7 || die "'nvm install 0.9.7' failed"
nvm i 0.9.12 || die "'nvm i 0.9.12' failed" nvm i 0.9.12 || die "'nvm i 0.9.12' failed"
# Check # Check
[ -d ../../../v0.9.7 ] || die "v0.9.7 didn't exist" [ -d ../../v0.9.7 ] || die "v0.9.7 didn't exist"
[ -d ../../../v0.9.12 ] || die "v0.9.12 didn't exist" [ -d ../../v0.9.12 ] || die "v0.9.12 didn't exist"
# Use the first one # Use the first one
nvm use 0.9.7 || die "'nvm use 0.9.7' failed" nvm use 0.9.7 || die "'nvm use 0.9.7' failed"

View File

@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION=v0.10.7 NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering. # 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 # Install from binary
echo "$NVM_TEST_VERSION" > .nvmrc echo "$NVM_TEST_VERSION" > .nvmrc
@ -15,7 +15,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc
nvm install || die "'nvm install' failed" nvm install || die "'nvm install' failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist" [ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
NVM_TEST_VERSION=v0.10.7 NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering. # 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 # Install from binary
echo "$NVM_TEST_VERSION" > .nvmrc echo "$NVM_TEST_VERSION" > .nvmrc
@ -15,7 +15,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc
nvm install -s || "'nvm install -s' failed" nvm install -s || "'nvm install -s' failed"
# Check # Check
[ -d ../../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist" [ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed" || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../nvm.sh
# Remove the stuff we're clobbering. # Remove the stuff we're clobbering.
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7 [ -e ../../v0.9.7 ] && rm -R ../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12 [ -e ../../v0.9.12 ] && rm -R ../../v0.9.12
# Install from binary # Install from binary
nvm install 0.9.7 nvm install 0.9.7
# Check # Check
[ -d ../../../v0.9.7 ] || die "nvm install 0.9.7 didn't install" [ -d ../../v0.9.7 ] || die "nvm install 0.9.7 didn't install"
nvm use 0.9.7 nvm use 0.9.7
@ -25,7 +25,7 @@ nvm ls 0.9 | grep v0.9.7 > /dev/null || die "nvm ls 0.9 didn't show v0.9.7"
nvm install 0.9.12 --reinstall-packages-from=0.9 || die "nvm install 0.9.12 --reinstall-packages-from=0.9 failed" nvm install 0.9.12 --reinstall-packages-from=0.9 || die "nvm install 0.9.12 --reinstall-packages-from=0.9 failed"
[ -d ../../../v0.9.12 ] || die "nvm install 0.9.12 didn't install" [ -d ../../v0.9.12 ] || die "nvm install 0.9.12 didn't install"
nvm use 0.9 nvm use 0.9
node --version | grep v0.9.12 > /dev/null || die "nvm ls 0.9 didn't use v0.9.12" node --version | grep v0.9.12 > /dev/null || die "nvm ls 0.9 didn't use v0.9.12"

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../nvm.sh
nvm deactivate nvm deactivate
nvm uninstall v0.10.7 nvm uninstall v0.10.7