2015-06-13 22:58:27 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2015-06-13 22:58:27 +08:00
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../nvm.sh
|
2015-06-13 22:58:27 +08:00
|
|
|
|
2022-12-23 03:26:27 +08:00
|
|
|
NVM_TEST_VERSION=v18.0.0
|
2015-06-13 22:58:27 +08:00
|
|
|
|
|
|
|
# Remove the stuff we're clobbering.
|
2016-05-09 13:21:33 +08:00
|
|
|
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
|
2015-06-13 22:58:27 +08:00
|
|
|
|
|
|
|
# Fake ARM arch
|
|
|
|
nvm_get_arch() {
|
|
|
|
echo "armv7l"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Install from source
|
|
|
|
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
|
|
|
|
|
|
|
|
# Check Install
|
2016-05-09 13:21:33 +08:00
|
|
|
[ -d ../../$NVM_TEST_VERSION ]
|
2015-06-14 01:52:54 +08:00
|
|
|
node --version | grep $NVM_TEST_VERSION || "'node --version | grep $NVM_TEST_VERSION' failed"
|
2015-06-13 22:58:27 +08:00
|
|
|
|
|
|
|
# Check V8 snapshot isn't compiled
|
2018-02-26 01:02:41 +08:00
|
|
|
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"
|