Skip to content

Commit 3f68058

Browse files
Correct macOS profile overlap probe setup
2 parents 4bac9ad + 61991ac commit 3f68058

1 file changed

Lines changed: 23 additions & 17 deletions

File tree

‎.github/workflows/check-managed-macos-command.yml‎

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
100100
import pytest
101101
102-
from agents import Agent, Environment, LocalStorage, NativeError, NativeProvider
102+
from agents import Agent, Environment, LocalStorage, NativeProvider
103103
from tests.native_fixtures import assistant_output, responses as responses
104104
105105
@@ -139,7 +139,7 @@ jobs:
139139
async with provider, agent.session(storage=storage, environment=environment) as session:
140140
turn = await session.submit("Persist the synthetic turn.")
141141
assert (await turn.get_result()).final_output == "rollout persisted"
142-
except NativeError as error:
142+
except RuntimeError as error:
143143
if "writable roots must stay outside native SDK storage" not in str(error):
144144
raise
145145
assert responses.requests == []
@@ -157,7 +157,7 @@ jobs:
157157
f"ADMITTED rollout_physically_inside_grant={aliased}"
158158
)
159159
PROBE
160-
printf '%s %s\n' 9e63a2f0b27e5d37f97d27a84dfe8f636c2b248d49b35197e42a0dd8a35e910e "$probe" | tee "$proof/fixture.sha256" | shasum -a 256 -c -
160+
printf '%s %s\n' d39444ce83c259489fc780447de2904ffbb510a8c09ec0a68165426150e63012 "$probe" | tee "$proof/fixture.sha256" | shasum -a 256 -c -
161161
scratch="$(mktemp -d "$RUNNER_TEMP/agents-profile-volume.XXXXXX")"
162162
volume="$scratch/mounted"
163163
attached=0
@@ -170,35 +170,41 @@ jobs:
170170
trap cleanup EXIT
171171
mkdir "$volume" "$scratch/HostCaseProbe"
172172
if [[ -d "$scratch/hostcaseprobe" ]]; then
173-
host_kind=insensitive
173+
host_kind=folded
174174
volume_kind=sensitive
175-
volume_fs=APFSX
175+
volume_fs='Case-sensitive APFS'
176+
fallback_fs=JHFSX
176177
else
177178
host_kind=sensitive
178-
volume_kind=insensitive
179+
volume_kind=folded
179180
volume_fs=APFS
181+
fallback_fs=JHFS+
182+
fi
183+
printf 'host=%s alternate=%s\n' "$host_kind" "$volume_kind" | tee "$proof/filesystems.txt"
184+
node="$probe::test_physical_profile_directory_overlap"
185+
run_probe() {
186+
local variant="$1" root="$2"
187+
.venv/bin/python -Bu -m pytest -vv -s -rA --color=no --tb=short -p no:cacheprovider \
188+
--basetemp="$root/$variant-tests" --junitxml="$proof/$variant.xml" "$node" 2>&1 | tee "$proof/$variant.log"
189+
}
190+
run_probe "$host_kind" "$scratch"
191+
192+
hdiutil create -listfs | tee -a "$proof/filesystems.txt"
193+
if ! hdiutil create -size 512m -fs "$volume_fs" -volname AgentsProfileControl -type SPARSE "$scratch/control"; then
194+
rm -f "$scratch/control.sparseimage"
195+
hdiutil create -size 512m -fs "$fallback_fs" -volname AgentsProfileControl -type SPARSE "$scratch/control"
180196
fi
181-
hdiutil create -size 512m -fs "$volume_fs" -volname AgentsProfileControl -type SPARSE "$scratch/control"
182197
hdiutil attach -owners off -nobrowse -mountpoint "$volume" "$scratch/control.sparseimage"
183198
attached=1
184199
test "$(stat -f %d "$scratch")" != "$(stat -f %d "$volume")"
185200
mkdir "$volume/VolumeCaseProbe"
186201
if [[ "$volume_kind" = sensitive ]]; then
187202
test ! -e "$volume/volumecaseprobe"
188-
folded="$scratch"
189-
sensitive="$volume"
190203
else
191204
test -d "$volume/volumecaseprobe"
192-
folded="$volume"
193-
sensitive="$scratch"
194205
fi
195-
printf 'host=%s alternate=%s\n' "$host_kind" "$volume_kind" | tee "$proof/filesystems.txt"
196206
diskutil info "$volume" | tee -a "$proof/filesystems.txt"
197-
node="$probe::test_physical_profile_directory_overlap"
198-
.venv/bin/python -Bu -m pytest -vv -s -rA --color=no --tb=short -p no:cacheprovider \
199-
--basetemp="$folded/folded-tests" --junitxml="$proof/folded.xml" "$node" 2>&1 | tee "$proof/folded.log"
200-
.venv/bin/python -Bu -m pytest -vv -s -rA --color=no --tb=short -p no:cacheprovider \
201-
--basetemp="$sensitive/sensitive-tests" --junitxml="$proof/sensitive.xml" "$node" 2>&1 | tee "$proof/sensitive.log"
207+
run_probe "$volume_kind" "$volume"
202208
.venv/bin/python -IB - "$proof" <<'PY'
203209
from pathlib import Path
204210
import sys

0 commit comments

Comments
 (0)