Update node, 15.14.0 -> 16.20.0 (#1232)
This allows us to use the native ARM64 version on MacOS. Also update the test scripts to work on ARM64 mac, and skip tests that aren't relevant.
This commit is contained in:
13
test/test.py
13
test/test.py
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -9,6 +10,7 @@ import unittest
|
||||
|
||||
WINDOWS = sys.platform.startswith('win')
|
||||
MACOS = sys.platform == 'darwin'
|
||||
MACOS_ARM64 = MACOS and platform.machine() == 'arm64'
|
||||
|
||||
emconfig = os.path.abspath('.emscripten')
|
||||
assert os.path.exists(emconfig)
|
||||
@@ -197,6 +199,8 @@ int main() {
|
||||
check_call(upstream_emcc + ' hello_world.c --closure=1')
|
||||
|
||||
def test_specific_version(self):
|
||||
if MACOS_ARM64:
|
||||
self.skipTest('Old sdk versions do not have ARM64 binaries')
|
||||
print('test specific release (new, short name)')
|
||||
run_emsdk('install 1.38.33')
|
||||
print('another install, but no need for re-download')
|
||||
@@ -204,6 +208,8 @@ int main() {
|
||||
run_emsdk('activate 1.38.33')
|
||||
|
||||
def test_specific_version_full(self):
|
||||
if MACOS_ARM64:
|
||||
self.skipTest('Old sdk versions do not have ARM64 binaries')
|
||||
print('test specific release (new, full name)')
|
||||
run_emsdk('install sdk-1.38.33-64bit')
|
||||
run_emsdk('activate sdk-1.38.33-64bit')
|
||||
@@ -220,7 +226,8 @@ int main() {
|
||||
def test_no_32bit(self):
|
||||
print('test 32-bit error')
|
||||
emsdk_hacked = hack_emsdk('not is_os_64bit()', 'True')
|
||||
failing_call_with_output('python %s install latest' % emsdk_hacked, 'this tool is only provided for 64-bit OSes')
|
||||
failing_call_with_output('%s %s install latest' % (sys.executable, emsdk_hacked),
|
||||
'this tool is only provided for 64-bit OSes')
|
||||
os.remove(emsdk_hacked)
|
||||
|
||||
def test_update_no_git(self):
|
||||
@@ -243,10 +250,10 @@ int main() {
|
||||
|
||||
def test_install_arbitrary(self):
|
||||
# Test that its possible to install arbrary emscripten-releases SDKs
|
||||
run_emsdk('install 5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2')
|
||||
run_emsdk('install 1b7f7bc6002a3ca73647f41fc10e1fac7f06f804')
|
||||
|
||||
# Check that its not re-downloaded
|
||||
checked_call_with_output(emsdk + ' install 5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2', expected='Skipped', unexpected='Downloading:')
|
||||
checked_call_with_output(emsdk + ' install 1b7f7bc6002a3ca73647f41fc10e1fac7f06f804', expected='Skipped', unexpected='Downloading:')
|
||||
|
||||
def test_install_tool(self):
|
||||
# Test that its possible to install emscripten as tool instead of SDK
|
||||
|
||||
22
test/test.sh
22
test/test.sh
@@ -7,20 +7,22 @@ set -e
|
||||
|
||||
# Test that arbitrary (non-released) versions can be installed and
|
||||
# activated.
|
||||
./emsdk install sdk-upstream-5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2
|
||||
./emsdk activate sdk-upstream-5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2
|
||||
./emsdk install sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
|
||||
./emsdk activate sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
|
||||
source ./emsdk_env.sh
|
||||
which emcc
|
||||
emcc -v
|
||||
|
||||
# Install an older version of the SDK that requires EM_CACHE to be
|
||||
# set in the environment, so that we can test it is later removed
|
||||
./emsdk install sdk-1.39.15
|
||||
./emsdk activate sdk-1.39.15
|
||||
source ./emsdk_env.sh
|
||||
which emcc
|
||||
emcc -v
|
||||
test -n "$EM_CACHE"
|
||||
if [[ $(uname -m) == "x86_64" ]]; then
|
||||
# Install an older version of the SDK that requires EM_CACHE to be
|
||||
# set in the environment, so that we can test it is later removed
|
||||
./emsdk install sdk-1.39.15
|
||||
./emsdk activate sdk-1.39.15
|
||||
source ./emsdk_env.sh
|
||||
which emcc
|
||||
emcc -v
|
||||
test -n "$EM_CACHE"
|
||||
fi
|
||||
|
||||
# Install the latest version of the SDK which is the expected precondition
|
||||
# of test.py.
|
||||
|
||||
Reference in New Issue
Block a user