Use node instead of nvm run and check v8_use_snapshot in node rather than shell

lukechilds 2015-06-13 18:52:54 +01:00
parent 83466446ce
commit 3b67b3b9bb
1 changed files with 5 additions and 3 deletions

View File

@ -17,10 +17,12 @@ nvm_get_arch() {
# Install from source
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Use new version
nvm use $NVM_TEST_VERSION
# Check Install
[ -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"
node --version | grep $NVM_TEST_VERSION || "'node --version | grep $NVM_TEST_VERSION' failed"
# Check V8 snapshot isn't compiled
nvm run $NVM_TEST_VERSION -p process.config | grep "v8_use_snapshot: false" || "'nvm run $NVM_TEST_VERSION -p process.config | grep \"v8_use_snapshot: false\"' failed"
node -p "if(! process.config.variables.v8_use_snapshot) { console.log('no-snapshot'); }" | grep "no-snapshot" || "'node -p \"if(! process.config.variables.v8_use_snapshot) { console.log('no-snapshot'); }\" | grep \"no-snapshot\"' failed"