2019-08-29 00:35:36 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2019-06-05 10:19:20 -07:00
|
|
|
echo "test the standard workflow (as close as possible to how a user would do it, in the shell)"
|
2019-08-29 00:35:36 -07:00
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
set -e
|
|
|
|
|
|
2021-03-05 12:51:04 -08:00
|
|
|
# Test that arbitrary (non-released) versions can be installed and
|
|
|
|
|
# activated.
|
2023-06-20 11:57:05 -07:00
|
|
|
./emsdk install sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
|
|
|
|
|
./emsdk activate sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
|
2021-03-05 12:51:04 -08:00
|
|
|
source ./emsdk_env.sh
|
|
|
|
|
which emcc
|
|
|
|
|
emcc -v
|
|
|
|
|
|
2023-06-20 11:57:05 -07:00
|
|
|
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
|
2021-04-29 08:43:20 -07:00
|
|
|
|
|
|
|
|
# Install the latest version of the SDK which is the expected precondition
|
|
|
|
|
# of test.py.
|
2019-06-05 10:19:20 -07:00
|
|
|
./emsdk install latest
|
|
|
|
|
./emsdk activate latest
|
|
|
|
|
source ./emsdk_env.sh --build=Release
|
2021-04-29 08:43:20 -07:00
|
|
|
# Test that EM_CACHE was unset
|
|
|
|
|
test -z "$EM_CACHE"
|
|
|
|
|
|
2020-07-21 10:21:02 -07:00
|
|
|
# On mac and windows python3 should be in the path and point to the
|
|
|
|
|
# bundled version.
|
|
|
|
|
which python3
|
2021-03-05 12:51:04 -08:00
|
|
|
which emcc
|
2019-06-26 13:13:48 -07:00
|
|
|
emcc -v
|