[Tests] set -ex options on more tests
parent
d3d768adcd
commit
54cc3a383e
|
@ -1,23 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
set +e # TODO: fix
|
||||
. ../../nvm.sh
|
||||
set -e
|
||||
|
||||
nvm deactivate || die 'deactivate failed'
|
||||
|
||||
nvm unalias default || die 'unable to unalias default'
|
||||
|
||||
NVM_TEST_VERSION=v0.10.7
|
||||
|
||||
# Remove the stuff we're clobbering.
|
||||
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
|
||||
nvm uninstall "${NVM_TEST_VERSION}" || die 'nvm uninstall failed'
|
||||
|
||||
# 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
|
||||
[ -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"
|
||||
[ -d ../../$NVM_TEST_VERSION ] || die "../../${NVM_TEST_VERSION} is not a directory"
|
||||
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
|
||||
NVM_CURRENT_DEFAULT="$(nvm_alias default)"
|
||||
[ "$NVM_CURRENT_DEFAULT" = "$NVM_TEST_VERSION" ] || die "wrong default alias: $(nvm alias)"
|
||||
[ "${NVM_CURRENT_DEFAULT}" = "${NVM_TEST_VERSION}" ] || die "wrong default alias: $(nvm alias)"
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
set +e # TODO: fix
|
||||
. ../../nvm.sh
|
||||
set -e
|
||||
|
||||
nvm deactivate || die 'deactivate failed'
|
||||
|
||||
NVM_TEST_VERSION=v0.8.5
|
||||
|
||||
# Remove the stuff we're clobbering.
|
||||
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
|
||||
nvm uninstall "${NVM_TEST_VERSION}" || die 'uninstall failed'
|
||||
|
||||
# Install from source implicitly (v0.8.6 is when binaries started)
|
||||
nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../nvm.sh
|
||||
|
|
Loading…
Reference in New Issue