-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Expand file tree
/
Copy pathdrive-example.sh
More file actions
executable file
·44 lines (39 loc) · 1.78 KB
/
Copy pathdrive-example.sh
File metadata and controls
executable file
·44 lines (39 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
ACTION=$1
if [ "$ACTION" == "android" ]
then
# Sleep to allow emulator to settle.
sleep 15
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=integration_test -- \
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS --dart-define=CI=true
exit
fi
if [ "$ACTION" == "ios" ]
then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SIMULATOR="${SIMULATOR:-iPhone 16}"
export SIMULATOR
"${SCRIPT_DIR}/ensure-simulator-ready.sh"
xcrun simctl logverbose "$SIMULATOR" enable
# Uncomment following line to have simulator logs printed out for debugging purposes.
# xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' &
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=integration_test -- \
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS -d \"$SIMULATOR\" --dart-define=CI=true
MELOS_EXIT_CODE=$?
xcrun simctl shutdown "$SIMULATOR"
exit $MELOS_EXIT_CODE
fi
if [ "$ACTION" == "macos" ]
then
melos exec -c 1 --fail-fast --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \
flutter test integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart $FLUTTER_COMMAND_FLAGS -d macos --dart-define=CI=true
exit
fi
if [ "$ACTION" == "web" ]
then
melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE"
chromedriver --port=4444 &
melos exec -c 1 --scope="$FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \
flutter drive $FLUTTER_COMMAND_FLAGS --verbose-system-logs --device-id=web-server --target=./integration_test/MELOS_PARENT_PACKAGE_NAME_e2e_test.dart --driver=./test_driver/integration_test.dart --dart-define=CI=true
exit
fi