File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,9 +79,24 @@ stop_recording() {
7979 REC_FILE=" "
8080}
8181
82+ # Function to clean up stale XCTest processes (iOS only)
83+ cleanup_xctest_processes () {
84+ if [ " $PLATFORM " != " ios" ]; then
85+ return 0
86+ fi
87+ echo " 🧹 Cleaning up stale XCTest processes..."
88+ # Kill any leftover XCTest runner processes that might be blocking driver initialization
89+ pkill -9 -f " XCTRunner" 2> /dev/null || true
90+ pkill -9 -f " xctest" 2> /dev/null || true
91+ pkill -9 -f " maestro.*driver" 2> /dev/null || true
92+ sleep 2
93+ }
94+
8295# Function to restart the iOS simulator
8396restart_simulator () {
8497 echo " 🔄 Restarting iOS Simulator..."
98+ # Clean up XCTest processes first
99+ cleanup_xctest_processes
85100 # Shut down whatever is booted; the device is auto-selected in prepare_ios.sh,
86101 # so we don't depend on a hardcoded device name here.
87102 xcrun simctl shutdown all || true
Original file line number Diff line number Diff line change @@ -97,6 +97,16 @@ run_jsactions_tests() {
9797 fi
9898}
9999
100+ # Clean up any stale XCTest processes before starting (iOS only)
101+ if [ " $PLATFORM " == " ios" ]; then
102+ cleanup_xctest_processes
103+ fi
104+
105+ # Fast-fail smoke check before running jsActions tests (same as widget tests)
106+ if ! smoke_check; then
107+ exit 1
108+ fi
109+
100110# Run jsActions tests
101111run_jsactions_tests
102112if [ $? -ne 0 ]; then
You can’t perform that action at this time.
0 commit comments