2019-11-25 00:42:27 +00:00
|
|
|
#!/bin/bash
|
2021-01-28 16:10:15 +00:00
|
|
|
|
2021-02-10 11:49:34 +00:00
|
|
|
readonly SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
|
|
|
readonly PROJECT_DIR="$(dirname $SCRIPT_PATH)"
|
|
|
|
|
2021-02-10 03:14:58 +00:00
|
|
|
function error() {
|
|
|
|
echo "$@" 1>&2
|
|
|
|
}
|
|
|
|
|
2019-12-14 15:08:15 +00:00
|
|
|
# on linux/macOS local IP can be found using $(ipconfig getifaddr en0)
|
2019-11-25 00:42:27 +00:00
|
|
|
export NODE_SERVER_IP=$1
|
2021-02-10 03:14:58 +00:00
|
|
|
FAILED=0
|
|
|
|
|
2021-02-10 11:49:34 +00:00
|
|
|
dart $PROJECT_DIR/tool/env.dart
|
2021-02-10 03:14:58 +00:00
|
|
|
|
2021-02-10 11:49:34 +00:00
|
|
|
cd $PROJECT_DIR/nodejs_server_test_auth_basic_and_ssl
|
2019-11-25 00:42:27 +00:00
|
|
|
node index.js &
|
2021-02-10 03:14:58 +00:00
|
|
|
|
2020-05-11 00:48:41 +00:00
|
|
|
flutter clean
|
2021-02-10 11:49:34 +00:00
|
|
|
cd $PROJECT_DIR/example
|
2020-05-09 02:36:07 +00:00
|
|
|
flutter clean
|
2021-01-28 16:10:15 +00:00
|
|
|
flutter driver --driver=test_driver/integration_test.dart --target=integration_test/webview_flutter_test.dart
|
2021-02-10 03:14:58 +00:00
|
|
|
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Integration tests passed successfully."
|
|
|
|
else
|
|
|
|
error "Some integration tests failed."
|
|
|
|
FAILED=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
kill $(jobs -p)
|
|
|
|
|
|
|
|
exit $FAILED
|