@@ -1180,7 +1180,7 @@ exit 1
11801180test ( 'installIosApp on iOS physical device accepts .ipa and installs extracted .app payload' , async ( ) => {
11811181 const tmpDir = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'agent-device-ios-install-ipa-test-' ) ) ;
11821182 const xcrunPath = path . join ( tmpDir , 'xcrun' ) ;
1183- const dittoPath = path . join ( tmpDir , 'ditto ' ) ;
1183+ const unzipPath = path . join ( tmpDir , 'unzip ' ) ;
11841184 const argsLogPath = path . join ( tmpDir , 'args.log' ) ;
11851185 const ipaPath = path . join ( tmpDir , 'Sample.ipa' ) ;
11861186 await fs . writeFile ( ipaPath , 'placeholder' , 'utf8' ) ;
@@ -1191,8 +1191,8 @@ test('installIosApp on iOS physical device accepts .ipa and installs extracted .
11911191 'utf8' ,
11921192 ) ;
11931193 await fs . chmod ( xcrunPath , 0o755 ) ;
1194- await fs . writeFile ( dittoPath , '#!/bin/sh\nmkdir -p "$4/Payload/Sample.app"\nexit 0\n' , 'utf8' ) ;
1195- await fs . chmod ( dittoPath , 0o755 ) ;
1194+ await fs . writeFile ( unzipPath , '#!/bin/sh\nmkdir -p "$4/Payload/Sample.app"\nexit 0\n' , 'utf8' ) ;
1195+ await fs . chmod ( unzipPath , 0o755 ) ;
11961196
11971197 const previousPath = process . env . PATH ;
11981198 const previousArgsFile = process . env . AGENT_DEVICE_TEST_ARGS_FILE ;
@@ -1230,7 +1230,7 @@ test('installIosApp on iOS physical device accepts .ipa and installs extracted .
12301230test ( 'installIosApp returns bundleId and launchTarget for nested archive sources' , async ( ) => {
12311231 const tmpDir = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'agent-device-ios-install-archive-test-' ) ) ;
12321232 const xcrunPath = path . join ( tmpDir , 'xcrun' ) ;
1233- const dittoPath = path . join ( tmpDir , 'ditto ' ) ;
1233+ const unzipPath = path . join ( tmpDir , 'unzip ' ) ;
12341234 const plutilPath = path . join ( tmpDir , 'plutil' ) ;
12351235 const argsLogPath = path . join ( tmpDir , 'args.log' ) ;
12361236 const archivePath = path . join ( tmpDir , 'Sample.zip' ) ;
@@ -1243,10 +1243,10 @@ test('installIosApp returns bundleId and launchTarget for nested archive sources
12431243 ) ;
12441244 await fs . chmod ( xcrunPath , 0o755 ) ;
12451245 await fs . writeFile (
1246- dittoPath ,
1246+ unzipPath ,
12471247 [
12481248 '#!/bin/sh' ,
1249- 'src="$3 "' ,
1249+ 'src="$2 "' ,
12501250 'out="$4"' ,
12511251 'case "$src" in' ,
12521252 ' *.zip)' ,
@@ -1264,7 +1264,7 @@ test('installIosApp returns bundleId and launchTarget for nested archive sources
12641264 ] . join ( '\n' ) ,
12651265 'utf8' ,
12661266 ) ;
1267- await fs . chmod ( dittoPath , 0o755 ) ;
1267+ await fs . chmod ( unzipPath , 0o755 ) ;
12681268 await fs . writeFile (
12691269 plutilPath ,
12701270 [
@@ -1318,7 +1318,7 @@ test('installIosApp on iOS physical device resolves multi-app .ipa using bundle
13181318 path . join ( os . tmpdir ( ) , 'agent-device-ios-install-ipa-multi-test-' ) ,
13191319 ) ;
13201320 const xcrunPath = path . join ( tmpDir , 'xcrun' ) ;
1321- const dittoPath = path . join ( tmpDir , 'ditto ' ) ;
1321+ const unzipPath = path . join ( tmpDir , 'unzip ' ) ;
13221322 const plutilPath = path . join ( tmpDir , 'plutil' ) ;
13231323 const argsLogPath = path . join ( tmpDir , 'args.log' ) ;
13241324 const ipaPath = path . join ( tmpDir , 'Sample.ipa' ) ;
@@ -1331,11 +1331,11 @@ test('installIosApp on iOS physical device resolves multi-app .ipa using bundle
13311331 ) ;
13321332 await fs . chmod ( xcrunPath , 0o755 ) ;
13331333 await fs . writeFile (
1334- dittoPath ,
1334+ unzipPath ,
13351335 '#!/bin/sh\nmkdir -p "$4/Payload/Sample.app"\nmkdir -p "$4/Payload/Companion.app"\nexit 0\n' ,
13361336 'utf8' ,
13371337 ) ;
1338- await fs . chmod ( dittoPath , 0o755 ) ;
1338+ await fs . chmod ( unzipPath , 0o755 ) ;
13391339 await fs . writeFile (
13401340 plutilPath ,
13411341 [
@@ -1385,19 +1385,19 @@ test('installIosApp rejects multi-app .ipa when no hint is provided', async () =
13851385 path . join ( os . tmpdir ( ) , 'agent-device-ios-install-ipa-multi-missing-hint-test-' ) ,
13861386 ) ;
13871387 const xcrunPath = path . join ( tmpDir , 'xcrun' ) ;
1388- const dittoPath = path . join ( tmpDir , 'ditto ' ) ;
1388+ const unzipPath = path . join ( tmpDir , 'unzip ' ) ;
13891389 const plutilPath = path . join ( tmpDir , 'plutil' ) ;
13901390 const ipaPath = path . join ( tmpDir , 'Sample.ipa' ) ;
13911391 await fs . writeFile ( ipaPath , 'placeholder' , 'utf8' ) ;
13921392
13931393 await fs . writeFile ( xcrunPath , '#!/bin/sh\nexit 0\n' , 'utf8' ) ;
13941394 await fs . chmod ( xcrunPath , 0o755 ) ;
13951395 await fs . writeFile (
1396- dittoPath ,
1396+ unzipPath ,
13971397 '#!/bin/sh\nmkdir -p "$4/Payload/Sample.app"\nmkdir -p "$4/Payload/Companion.app"\nexit 0\n' ,
13981398 'utf8' ,
13991399 ) ;
1400- await fs . chmod ( dittoPath , 0o755 ) ;
1400+ await fs . chmod ( unzipPath , 0o755 ) ;
14011401 await fs . writeFile (
14021402 plutilPath ,
14031403 [
@@ -1442,14 +1442,14 @@ test('installIosApp rejects invalid .ipa payloads without embedded .app', async
14421442 path . join ( os . tmpdir ( ) , 'agent-device-ios-install-ipa-invalid-test-' ) ,
14431443 ) ;
14441444 const xcrunPath = path . join ( tmpDir , 'xcrun' ) ;
1445- const dittoPath = path . join ( tmpDir , 'ditto ' ) ;
1445+ const unzipPath = path . join ( tmpDir , 'unzip ' ) ;
14461446 const ipaPath = path . join ( tmpDir , 'Broken.ipa' ) ;
14471447 await fs . writeFile ( ipaPath , 'placeholder' , 'utf8' ) ;
14481448
14491449 await fs . writeFile ( xcrunPath , '#!/bin/sh\nexit 0\n' , 'utf8' ) ;
14501450 await fs . chmod ( xcrunPath , 0o755 ) ;
1451- await fs . writeFile ( dittoPath , '#!/bin/sh\nmkdir -p "$4/NoPayload"\nexit 0\n' , 'utf8' ) ;
1452- await fs . chmod ( dittoPath , 0o755 ) ;
1451+ await fs . writeFile ( unzipPath , '#!/bin/sh\nmkdir -p "$4/NoPayload"\nexit 0\n' , 'utf8' ) ;
1452+ await fs . chmod ( unzipPath , 0o755 ) ;
14531453
14541454 const previousPath = process . env . PATH ;
14551455 process . env . PATH = `${ tmpDir } ${ path . delimiter } ${ previousPath ?? '' } ` ;
0 commit comments