Skip to content

Commit c7aa09c

Browse files
abueideclaude
andcommitted
fix(ios): fix pod install in pure mode and consolidate test summaries
Fix two bugs that cause CocoaPods/xcodebuild failures in devbox --pure: 1. Set LANG=en_US.UTF-8 in iOS plugin.json so Ruby's unicode_normalize doesn't crash with Encoding::CompatibilityError in pure mode. 2. Fix devbox_omit_nix_env() premature flag bug: DEVBOX_OMIT_NIX_ENV_APPLIED was set before resolving the devbox binary, so if resolution failed the flag blocked all retries and Darwin cleanup (CC, DEVELOPER_DIR, SDKROOT) never ran. Move flag to end of function and move Darwin cleanup outside the devbox_bin gate so it runs unconditionally. 3. Remove ios_xcodebuild() wrapper — devbox_omit_nix_env() is the single source of truth for Nix env cleanup. All call sites now use xcodebuild directly. 4. Replace 3 duplicate test-summary.sh scripts with test-framework.sh in all 6 E2E YAML files, unifying reporting between unit and E2E tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 430b98d commit c7aa09c

15 files changed

Lines changed: 83 additions & 202 deletions

File tree

examples/android/tests/test-suite.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,14 @@ processes:
106106

107107
# Summary - always runs, checks marker file for pass/fail
108108
summary:
109-
command: "bash tests/test-summary.sh 'Android E2E Test Suite' 'reports/android-e2e-logs' 'reports/.e2e-passed'"
109+
command: |
110+
set -e
111+
export REPO_ROOT="$(cd ../.. && pwd)"
112+
. "$REPO_ROOT/plugins/tests/test-framework.sh"
113+
log_test "Android E2E Test Suite"
114+
assert_file_exists "reports/.e2e-passed" "E2E pipeline completed"
115+
rm -f reports/.e2e-passed
116+
test_summary "android-e2e"
110117
depends_on:
111118
cleanup-app:
112119
condition: process_completed

examples/android/tests/test-summary.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

examples/ios/tests/test-suite.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,14 @@ processes:
113113

114114
# Summary - always runs, checks marker file for pass/fail
115115
summary:
116-
command: "bash tests/test-summary.sh 'iOS E2E Test Suite' 'reports/ios-e2e-logs' 'reports/.e2e-passed'"
116+
command: |
117+
set -e
118+
export REPO_ROOT="$(cd ../.. && pwd)"
119+
. "$REPO_ROOT/plugins/tests/test-framework.sh"
120+
log_test "iOS E2E Test Suite"
121+
assert_file_exists "reports/.e2e-passed" "E2E pipeline completed"
122+
rm -f reports/.e2e-passed
123+
test_summary "ios-e2e"
117124
depends_on:
118125
cleanup:
119126
condition: process_completed

examples/ios/tests/test-summary.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,14 @@ processes:
280280

281281
# Summary - always runs, checks marker file for pass/fail
282282
summary:
283-
command: "bash tests/test-summary.sh 'React Native All Platforms E2E Test Suite' 'reports/react-native-all-e2e-logs' 'reports/.e2e-passed'"
283+
command: |
284+
set -e
285+
export REPO_ROOT="$(cd ../.. && pwd)"
286+
. "$REPO_ROOT/plugins/tests/test-framework.sh"
287+
log_test "React Native All Platforms E2E Test Suite"
288+
assert_file_exists "reports/.e2e-passed" "E2E pipeline completed"
289+
rm -f reports/.e2e-passed
290+
test_summary "rn-all-e2e"
284291
depends_on:
285292
cleanup:
286293
condition: process_completed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,14 @@ processes:
157157

158158
# Summary - always runs, checks marker file for pass/fail
159159
summary:
160-
command: "bash tests/test-summary.sh 'React Native Android E2E Test Suite' 'reports/react-native-android-e2e-logs' 'reports/.e2e-passed'"
160+
command: |
161+
set -e
162+
export REPO_ROOT="$(cd ../.. && pwd)"
163+
. "$REPO_ROOT/plugins/tests/test-framework.sh"
164+
log_test "React Native Android E2E Test Suite"
165+
assert_file_exists "reports/.e2e-passed" "E2E pipeline completed"
166+
rm -f reports/.e2e-passed
167+
test_summary "rn-android-e2e"
161168
depends_on:
162169
cleanup:
163170
condition: process_completed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ environment:
55
- "SUITE_NAME=rn-ios-e2e"
66
- "ANDROID_SKIP_SETUP=1"
77
- "TEST_TUI=${TEST_TUI:-false}"
8-
- "LANG=en_US.UTF-8"
9-
- "LC_ALL=en_US.UTF-8"
108
- "REACT_NATIVE_VIRTENV=${REACT_NATIVE_VIRTENV}"
119

1210
log_location: "reports/react-native-ios-e2e-logs"
@@ -164,7 +162,14 @@ processes:
164162

165163
# Summary - always runs, checks marker file for pass/fail
166164
summary:
167-
command: "bash tests/test-summary.sh 'React Native iOS E2E Test Suite' 'reports/react-native-ios-e2e-logs' 'reports/.e2e-passed'"
165+
command: |
166+
set -e
167+
export REPO_ROOT="$(cd ../.. && pwd)"
168+
. "$REPO_ROOT/plugins/tests/test-framework.sh"
169+
log_test "React Native iOS E2E Test Suite"
170+
assert_file_exists "reports/.e2e-passed" "E2E pipeline completed"
171+
rm -f reports/.e2e-passed
172+
test_summary "rn-ios-e2e"
168173
depends_on:
169174
cleanup:
170175
condition: process_completed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ processes:
124124

125125
# Summary - always runs, checks marker file for pass/fail
126126
summary:
127-
command: "bash tests/test-summary.sh 'React Native Web E2E Test Suite' 'reports/react-native-web-e2e-logs' 'reports/.e2e-passed'"
127+
command: |
128+
set -e
129+
export REPO_ROOT="$(cd ../.. && pwd)"
130+
. "$REPO_ROOT/plugins/tests/test-framework.sh"
131+
log_test "React Native Web E2E Test Suite"
132+
assert_file_exists "reports/.e2e-passed" "E2E pipeline completed"
133+
rm -f reports/.e2e-passed
134+
test_summary "rn-web-e2e"
128135
depends_on:
129136
cleanup:
130137
condition: process_completed

examples/react-native/tests/test-summary.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

plugins/ios/REFERENCE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ Use this in `devbox.json` build scripts instead of manually stripping Nix flags:
197197
}
198198
```
199199

200-
Also available as the `ios_xcodebuild()` shell function (from `platform/core.sh`) for use within plugin scripts.
201-
202-
> **Note:** Since the iOS init hook now strips Nix compilation variables (`LD`, `LDFLAGS`, `NIX_LDFLAGS`, `NIX_CFLAGS_COMPILE`, `NIX_CFLAGS_LINK`) at shell startup, `xcodebuild` works natively in devbox shell without the wrapper. The `ios.sh xcodebuild` wrapper and `ios_xcodebuild()` function are kept for backward compatibility and use outside devbox shell.
200+
The iOS init hook (`devbox_omit_nix_env()`) strips Nix compilation variables at shell startup, so `xcodebuild` works natively in devbox shell. The `ios.sh xcodebuild` subcommand forwards directly to `xcodebuild`.
203201

204202
### Run App
205203

0 commit comments

Comments
 (0)