File tree Expand file tree Collapse file tree 2 files changed +58
-3
lines changed Expand file tree Collapse file tree 2 files changed +58
-3
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash -u
2
+
3
+ echo " --- 📋 Checking Android SDK"
4
+ echo " adb --version"
5
+ adb --version
6
+ echo " emulator -list-avds"
7
+ emulator -list-avds
8
+ echo " "
9
+
10
+ echo " --- 🤖 Launching Emulator(s)"
11
+ echo " emulator -avd pixel5api34 -no-snapshot -no-boot-anim -no-audio &"
12
+ emulator -avd pixel5api34 -no-snapshot -no-boot-anim -no-audio &
13
+ echo " "
14
+
15
+ echo " --- 🤖 Waiting for Emulator(s) to Start"
16
+ echo " adb wait-for-device"
17
+ adb wait-for-device
18
+ echo " while [ " $( adb shell getprop sys.boot_completed | tr -d ' \r' ) " != " 1" ]; do"
19
+ echo " sleep 1"
20
+ echo " done"
21
+ while [ " $( adb shell getprop sys.boot_completed | tr -d ' \r' ) " != " 1" ]; do
22
+ sleep 1
23
+ done
24
+ echo " "
25
+
26
+ echo " --- 🤖 Unlock Emulator(s)"
27
+ echo " adb shell dumpsys window | grep mDreamingLockscreen"
28
+ adb shell dumpsys window | grep mDreamingLockscreen
29
+ echo " adb -s emulator-5554 shell input keyevent 82"
30
+ adb -s emulator-5554 shell input keyevent 82
31
+ echo " "
32
+
33
+ echo " --- 🤖 Checking Emulator(s)"
34
+ echo " adb devices"
35
+ adb devices
36
+ echo " adb shell dumpsys window | grep mDreamingLockscreen"
37
+ adb shell dumpsys window | grep mDreamingLockscreen
38
+ echo " "
39
+
40
+ echo " --- 🧪 Testing"
41
+ ./gradlew :WooCommerce:connectedVanillaDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.woocommerce.android.e2e.tests.ui.ReviewsUITest
42
+ ui_test_exit_code=$?
43
+ echo " "
44
+
45
+ echo " --- 🤖 Checking Emulator(s)"
46
+ echo " adb devices"
47
+ adb devices
48
+ echo " "
49
+
50
+ echo " --- 🤖 Stopping Emulator(s)"
51
+ echo " adb -s emulator-5554 emu kill"
52
+ adb -s emulator-5554 emu kill
53
+ echo " adb devices"
54
+ while adb devices | grep -q emulator-5554; do sleep 1; done
55
+ echo " "
56
+
57
+ exit $ui_test_exit_code
Original file line number Diff line number Diff line change 22
22
queue : " mac-metal"
23
23
24
24
- label : " Instrumented tests without GMD (ReviewsUITest)"
25
- command : |
26
- echo "--- 🧪 Testing"
27
- ./gradlew :WooCommerce:connectedVanillaDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.woocommerce.android.e2e.tests.ui.ReviewsUITest
25
+ command : .buildkite/commands/run-instrumented-tests-emulator.sh
28
26
plugins : [ $CI_TOOLKIT ]
29
27
artifact_paths :
30
28
- " **/build/reports/androidTests/connected/**/**/**/*"
You can’t perform that action at this time.
0 commit comments