This commit is contained in:
John Smith
2022-11-27 22:33:41 -05:00
parent a34da6ff75
commit d99273334d
66 changed files with 374 additions and 254 deletions

View File

@@ -1,9 +1,26 @@
#!/bin/bash
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd $SCRIPTDIR 2>/dev/null
if [[ "$1" == "wasm" ]]; then
WASM_BINDGEN_TEST_TIMEOUT=120 wasm-pack test --chrome --headless
elif [[ "$1" == "ios" ]]; then
SYMROOT=/tmp/testout
APPNAME=veilidtools-tests
BUNDLENAME=com.veilid.veilidtools-tests
xcrun xcodebuild -project src/tests/ios/$APPNAME/$APPNAME.xcodeproj/ -scheme $APPNAME -destination "generic/platform=iOS Simulator" SYMROOT=$SYMROOT
ID=$(xcrun simctl create test-iphone com.apple.CoreSimulator.SimDeviceType.iPhone-14-Pro com.apple.CoreSimulator.SimRuntime.iOS-16-1 2>/dev/null)
xcrun simctl boot $ID
xcrun simctl bootstatus $ID
xcrun simctl install $ID $SYMROOT/Debug-iphonesimulator/$APPNAME.app
xcrun simctl launch --console $ID $BUNDLENAME
xcrun simctl delete all
rm -rf /tmp/testout
else
cargo test --features=rt-tokio
cargo test --features=rt-async-std
cargo test --features=rt-tokio,log --no-default-features
cargo test --features=rt-async-std,log --no-default-features
fi
popd 2>/dev/null