Skip to content

Commit dda108b

Browse files
fix: correct shell loop in instrumented orchestrator tests
1 parent abe23e3 commit dda108b

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ jobs:
5858
disable-animations: true
5959
script: |
6060
# Disable animations and clean up test packages
61-
/bin/bash -c "
61+
bash -eo pipefail -c '
6262
adb shell settings put global transition_animation_scale 0.0
6363
adb shell settings put global animator_duration_scale 0.0
6464
6565
for pkg in com.mparticle.kittests com.mparticle.kits.test com.mparticle.legacyTest com.mparticle.test; do
66-
if adb shell pm list packages | grep -q \"\$pkg\"; then
67-
adb uninstall \"\$pkg\"
66+
if adb shell pm list packages | grep -q "$pkg"; then
67+
adb uninstall "$pkg"
6868
fi
6969
done
70-
"
70+
'
7171
7272
./gradlew connectedCheck --info --stacktrace
7373
@@ -130,11 +130,7 @@ jobs:
130130
adb shell settings put global transition_animation_scale 0.0
131131
adb shell settings put global animator_duration_scale 0.0
132132
133-
for pkg in com.mparticle.kittests com.mparticle.kits.test com.mparticle.legacyTest com.mparticle.test; do
134-
if adb shell pm list packages | grep -q "$pkg"; then
135-
adb uninstall "$pkg"
136-
fi
137-
done
133+
for pkg in com.mparticle.kittests com.mparticle.kits.test com.mparticle.legacyTest com.mparticle.test; do adb shell pm list packages | grep -q "$pkg" && adb uninstall "$pkg"; done
138134
139135
./gradlew connectedCheck --stacktrace
140136
./gradlew -Porchestrator=true :android-core:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none

0 commit comments

Comments
 (0)