Skip to content

Commit c2975de

Browse files
abueideclaude
andcommitted
fix(rn): only stop Metro in pure mode during E2E cleanup
Metro was being stopped unconditionally in dev mode, breaking the app and preventing iteration. Now Metro only stops in pure mode, matching the behavior for emulators/simulators/apps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9e437d5 commit c2975de

4 files changed

Lines changed: 16 additions & 18 deletions

File tree

examples/react-native/tests/test-suite-all-e2e.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,9 @@ processes:
254254
# Cleanup - runs when both platforms complete
255255
cleanup:
256256
command: |
257-
echo "Stopping Metro bundler..."
258-
metro.sh stop all || true
259-
260257
if [ "${DEVBOX_PURE_SHELL:-}" = "1" ]; then
261258
echo "Cleaning up (pure mode)..."
259+
metro.sh stop all || true
262260
263261
# Cleanup Android
264262
android.sh app stop || true
@@ -268,9 +266,9 @@ processes:
268266
ios.sh app stop || true
269267
ios.sh simulator stop || true
270268
271-
echo "Both platforms cleaned up"
269+
echo "Metro, apps, and emulator/simulator stopped"
272270
else
273-
echo "Test complete - apps and emulator/simulator still running"
271+
echo "Test complete - Metro, apps, and emulator/simulator still running for iteration"
274272
fi
275273
depends_on:
276274
mark-passed:

examples/react-native/tests/test-suite-android-e2e.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,14 @@ processes:
138138
# Cleanup
139139
cleanup:
140140
command: |
141-
echo "Stopping Metro bundler..."
142-
metro.sh stop android || true
143-
144141
if [ "${DEVBOX_PURE_SHELL:-}" = "1" ]; then
145142
echo "Cleaning up (pure mode)..."
143+
metro.sh stop android || true
146144
android.sh app stop || true
147145
android.sh emulator stop || true
148-
echo "App stopped, emulator stopped"
146+
echo "Metro, app, and emulator stopped"
149147
else
150-
echo "Test complete - app and emulator still running"
148+
echo "Test complete - Metro, app, and emulator still running for iteration"
151149
fi
152150
depends_on:
153151
verify-app-running:

examples/react-native/tests/test-suite-ios-e2e.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,14 @@ processes:
143143
# Cleanup - runs after verify completes
144144
cleanup:
145145
command: |
146-
echo "Stopping Metro bundler..."
147-
metro.sh stop ios || true
148-
149146
if [ "${DEVBOX_PURE_SHELL:-}" = "1" ]; then
150147
echo "Cleaning up (pure mode)..."
148+
metro.sh stop ios || true
151149
ios.sh app stop || true
152150
ios.sh simulator stop
153-
echo "App stopped, test simulator deleted"
151+
echo "Metro, app, and test simulator stopped"
154152
else
155-
echo "Test complete - app and simulator still running"
153+
echo "Test complete - Metro, app, and simulator still running for iteration"
156154
fi
157155
depends_on:
158156
verify-app-running:

examples/react-native/tests/test-suite-web-e2e.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,13 @@ processes:
113113
# Cleanup
114114
cleanup:
115115
command: |
116-
echo "Stopping Metro bundler..."
117-
metro.sh stop web || true
118-
echo "✓ Test complete"
116+
if [ "${DEVBOX_PURE_SHELL:-}" = "1" ]; then
117+
echo "Cleaning up (pure mode)..."
118+
metro.sh stop web || true
119+
echo "Metro stopped"
120+
else
121+
echo "Test complete - Metro still running for iteration"
122+
fi
119123
depends_on:
120124
verify-web-serving:
121125
condition: process_completed

0 commit comments

Comments
 (0)