Skip to content

Commit 3279ad2

Browse files
thymikeeclaude
andcommitted
test(host): scenarios name their own host env; the harness no longer forwards the process's Swift cache
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent b7380a3 commit 3279ad2

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎test/integration/provider-scenarios/android-recording-fixtures.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function stopAndroidRecording(
2525
* The daemon's host for an Android recording scenario: no real tool on its PATH, so the Swift
2626
* helpers cannot compile, and a Swift cache of its own.
2727
*/
28-
export function androidRecordingHostEnv(tmpDir: string): Readonly<Record<string, string>> {
28+
function androidRecordingHostEnv(tmpDir: string): Readonly<Record<string, string>> {
2929
return { PATH: tmpDir, AGENT_DEVICE_SWIFT_CACHE_DIR: path.join(tmpDir, 'swift-cache') };
3030
}
3131

‎test/integration/provider-scenarios/harness.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ export async function createProviderScenarioHarness(
111111
PATH: process.env.PATH,
112112
HOME: process.env.HOME,
113113
TMPDIR: process.env.TMPDIR,
114-
// A scenario that isolates the Swift helper cache names it through the process.
115-
AGENT_DEVICE_SWIFT_CACHE_DIR: process.env.AGENT_DEVICE_SWIFT_CACHE_DIR,
116114
// A scenario that seeds claims for its daemon names the directory through the process.
117115
AGENT_DEVICE_CLAIMS_DIR: process.env.AGENT_DEVICE_CLAIMS_DIR ?? path.join(testRoot, 'claims'),
118116
AGENT_DEVICE_DAEMON_IDLE_TIMEOUT_MS: '3600000',

‎test/integration/provider-scenarios/ios-record-trace.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ test('iOS simulator recording reports host contention and recovers through the f
111111
appleSimulatorScreenRecordingTransport: () => recordingTransport,
112112
deviceInventoryProvider: async () => [PROVIDER_SCENARIO_IOS_SIMULATOR],
113113
});
114-
const previousPath = process.env.PATH;
115-
const previousSwiftCacheDir = process.env.AGENT_DEVICE_SWIFT_CACHE_DIR;
116-
process.env.PATH = tmpDir;
117-
process.env.AGENT_DEVICE_SWIFT_CACHE_DIR = path.join(tmpDir, 'swift-cache');
118-
119114
try {
120115
const open = await daemon.callCommand('open', ['com.apple.Preferences'], {
121116
platform: 'ios',

‎test/integration/provider-scenarios/macos-world.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export async function createMacOsDesktopWorld(
4848
},
4949
},
5050
});
51+
// Recording finalization runs the Swift validator; the process's warm cache keeps it from compiling.
52+
const swiftCacheDir = process.env.AGENT_DEVICE_SWIFT_CACHE_DIR;
5153
const daemon = await createProviderScenarioHarness({
54+
...(swiftCacheDir ? { env: { AGENT_DEVICE_SWIFT_CACHE_DIR: swiftCacheDir } } : {}),
5255
appleRunnerProvider: options.appleRunnerProvider
5356
? () => options.appleRunnerProvider
5457
: undefined,

0 commit comments

Comments
 (0)