Skip to content

Commit

Permalink
revert renames of ios specific files
Browse files Browse the repository at this point in the history
  • Loading branch information
maxphillipsdev committed Jan 11, 2025
1 parent 52c80d1 commit c0e5edc
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 67 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ They are placed in `maestro-android/build/outputs/apk`, and are copied over to `

Maestro requires 3 artifacts to run on iOS:

- `maestro-driver` - the host app for the test runner. Does nothing and is not installed.
- `maestro-driverUITests-Runner.app` - the test runner app. Starts an HTTP server inside an infinite XCTest.
- `maestro-driver-config.xctestrun` - the configuration file required to run the test runner app.
- `maestro-driver-ios` - the host app for the test runner. Does nothing and is not installed.
- `maestro-driver-iosUITests-Runner.app` - the test runner app. Starts an HTTP server inside an infinite XCTest.
- `maestro-driver-ios-config.xctestrun` - the configuration file required to run the test runner app.

These artifacts are built by the `build-maestro-ios-runner.sh` script. It places them in `maestro-ios-driver/src/main/resources`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,17 @@ class LocalXCTestInstaller(

logger.info("[Start] Writing xctest run file")
val tempDir = File(tempDir).apply { mkdir() }
val xctestRunFile = File("${tempDir}/maestro-driver-config.xctestrun")
val xctestRunFile = File("${tempDir}/maestro-driver-ios-config.xctestrun")
writeFileToDestination(XCTEST_RUN_PATH, xctestRunFile, isTV)
logger.info("[Done] Writing xctest run file")

logger.info("[Start] Writing maestro-driverUITests-Runner app")
extractZipToApp("maestro-driverUITests-Runner", UI_TEST_RUNNER_PATH, isTV)
logger.info("[Done] Writing maestro-driverUITests-Runner app")
logger.info("[Start] Writing maestro-driver-iosUITests-Runner app")
extractZipToApp("maestro-driver-iosUITests-Runner", UI_TEST_RUNNER_PATH, isTV)
logger.info("[Done] Writing maestro-driver-iosUITests-Runner app")

logger.info("[Start] Writing maestro-driver app")
logger.info("[Start] Writing maestro-driver-ios app")
extractZipToApp("maestro-driver", UI_TEST_HOST_PATH, isTV)
logger.info("[Done] Writing maestro-driver app")
logger.info("[Done] Writing maestro-driver-ios app")

logger.info("[Start] Running XcUITest with `xcodebuild test-without-building`")
xcTestProcess = XCRunnerCLIUtils.runXcTestWithoutBuild(
Expand Down Expand Up @@ -261,10 +261,10 @@ class LocalXCTestInstaller(
}

companion object {
private const val UI_TEST_RUNNER_PATH = "maestro-driverUITests-Runner.zip"
private const val XCTEST_RUN_PATH = "maestro-driver-config.xctestrun"
private const val UI_TEST_HOST_PATH = "maestro-driver.zip"
private const val UI_TEST_RUNNER_APP_BUNDLE_ID = "dev.mobile.maestro-driverUITests.xctrunner"
private const val UI_TEST_RUNNER_PATH = "maestro-driver-iosUITests-Runner.zip"
private const val XCTEST_RUN_PATH = "maestro-driver-ios-config.xctestrun"
private const val UI_TEST_HOST_PATH = "maestro-driver-ios.zip"
private const val UI_TEST_RUNNER_APP_BUNDLE_ID = "dev.mobile.maestro-driver-iosUITests.xctrunner"

private const val SERVER_LAUNCH_TIMEOUT_MS = 120000L
private const val MAESTRO_DRIVER_STARTUP_TIMEOUT = "MAESTRO_DRIVER_STARTUP_TIMEOUT"
Expand Down
32 changes: 16 additions & 16 deletions maestro-ios-xctest-runner/build-maestro-ios-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ xcodebuild \
ARCHS="x86_64 arm64" \
ONLY_ACTIVE_ARCH=NO \
-project ./maestro-ios-xctest-runner/maestro-driver-ios.xcodeproj \
-scheme maestro-driver \
-scheme maestro-driver-ios \
-sdk iphonesimulator \
-destination "generic/platform=iOS Simulator" \
-IDEBuildLocationStyle=Custom \
Expand All @@ -24,7 +24,7 @@ xcodebuild \
ARCHS="x86_64 arm64" \
ONLY_ACTIVE_ARCH=NO \
-project ./maestro-ios-xctest-runner/maestro-driver-ios.xcodeproj \
-scheme maestro-driver \
-scheme maestro-driver-ios \
-sdk appletvsimulator \
-destination "generic/platform=tvOS Simulator" \
-IDEBuildLocationStyle=Custom \
Expand All @@ -34,32 +34,32 @@ xcodebuild \

## Remove intermediates, output and copy runner in maestro-ios-driver
cp -r \
./build/Products/Debug-iphonesimulator/maestro-driverUITests-Runner.app \
./maestro-ios-driver/src/main/resources/ios/maestro-driverUITests-Runner.app
./build/Products/Debug-iphonesimulator/maestro-driver-iosUITests-Runner.app \
./maestro-ios-driver/src/main/resources/ios/maestro-driver-iosUITests-Runner.app

cp -r \
./build/Products/Debug-appletvsimulator/maestro-driverUITests-Runner.app \
./maestro-ios-driver/src/main/resources/tvos/maestro-driverUITests-Runner.app
./build/Products/Debug-appletvsimulator/maestro-driver-iosUITests-Runner.app \
./maestro-ios-driver/src/main/resources/tvos/maestro-driver-iosUITests-Runner.app

cp -r \
./build/Products/Debug-iphonesimulator/maestro-driver.app \
./maestro-ios-driver/src/main/resources/ios/maestro-driver.app
./build/Products/Debug-iphonesimulator/maestro-driver-ios.app \
./maestro-ios-driver/src/main/resources/ios/maestro-driver-ios.app

cp -r \
./build/Products/Debug-appletvsimulator/maestro-driver.app \
./maestro-ios-driver/src/main/resources/tvos/maestro-driver.app
./build/Products/Debug-appletvsimulator/maestro-driver-ios.app \
./maestro-ios-driver/src/main/resources/tvos/maestro-driver-ios.app

cp \
./build/Products/*iphonesimulator*.xctestrun \
./maestro-ios-driver/src/main/resources/ios/maestro-driver-config.xctestrun
./maestro-ios-driver/src/main/resources/ios/maestro-driver-ios-config.xctestrun

cp \
./build/Products/*appletvsimulator*.xctestrun \
./maestro-ios-driver/src/main/resources/tvos/maestro-driver-config.xctestrun
./maestro-ios-driver/src/main/resources/tvos/maestro-driver-ios-config.xctestrun

(cd ./maestro-ios-driver/src/main/resources/ios && zip -r maestro-driverUITests-Runner.zip ./maestro-driverUITests-Runner.app)
(cd ./maestro-ios-driver/src/main/resources/tvos && zip -r maestro-driverUITests-Runner.zip ./maestro-driverUITests-Runner.app)
(cd ./maestro-ios-driver/src/main/resources/ios && zip -r maestro-driver.zip ./maestro-driver.app)
(cd ./maestro-ios-driver/src/main/resources/tvos && zip -r maestro-driver.zip ./maestro-driver.app)
(cd ./maestro-ios-driver/src/main/resources/ios && zip -r maestro-driver-iosUITests-Runner.zip ./maestro-driver-iosUITests-Runner.app)
(cd ./maestro-ios-driver/src/main/resources/tvos && zip -r maestro-driver-iosUITests-Runner.zip ./maestro-driver-iosUITests-Runner.app)
(cd ./maestro-ios-driver/src/main/resources/ios && zip -r maestro-driver-ios.zip ./maestro-driver-ios.app)
(cd ./maestro-ios-driver/src/main/resources/tvos && zip -r maestro-driver-ios.zip ./maestro-driver-ios.app)
rm -r ./maestro-ios-driver/src/main/resources/ios/*.app
rm -r ./maestro-ios-driver/src/main/resources/tvos/*.app
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
44E0074D2D32EFA80038CC62 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
44E0074E2D32EFA80038CC62 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
44E0074F2D32EFA80038CC62 /* maestro_driverApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = maestro_driverApp.swift; sourceTree = "<group>"; };
44F995242C9D6F8800D15B50 /* maestro-driver.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "maestro-driver.app"; sourceTree = BUILT_PRODUCTS_DIR; };
44F995242C9D6F8800D15B50 /* maestro-driver-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "maestro-driver-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
52047F772A7A638E00BF982D /* StatusHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusHandler.swift; sourceTree = "<group>"; };
52049BF3293503A200807AA3 /* maestro-driverUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "maestro-driverUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
52049BF3293503A200807AA3 /* maestro-driver-iosUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "maestro-driver-iosUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
52049BF7293503A200807AA3 /* maestro_driver_iosUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = maestro_driver_iosUITests.swift; sourceTree = "<group>"; };
522785802A54410D008DBC0A /* AppError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppError.swift; sourceTree = "<group>"; };
52E35D422A654F67001D97A8 /* RunningApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunningApp.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -157,22 +157,22 @@
path = "Preview Content";
sourceTree = "<group>";
};
44E007502D32EFA80038CC62 /* maestro-driver */ = {
44E007502D32EFA80038CC62 /* maestro-driver-ios */ = {
isa = PBXGroup;
children = (
44E0074C2D32EFA80038CC62 /* Preview Content */,
44E0074D2D32EFA80038CC62 /* Assets.xcassets */,
44E0074E2D32EFA80038CC62 /* ContentView.swift */,
44E0074F2D32EFA80038CC62 /* maestro_driverApp.swift */,
);
path = "maestro-driver";
path = "maestro-driver-ios";
sourceTree = "<group>";
};
52049BCA2935039F00807AA3 = {
isa = PBXGroup;
children = (
52049BF6293503A200807AA3 /* maestro-driver-iosUITests */,
44E007502D32EFA80038CC62 /* maestro-driver */,
44E007502D32EFA80038CC62 /* maestro-driver-ios */,
52049BD42935039F00807AA3 /* Products */,
5279BFD42935ECE20056C609 /* Frameworks */,
);
Expand All @@ -181,8 +181,8 @@
52049BD42935039F00807AA3 /* Products */ = {
isa = PBXGroup;
children = (
52049BF3293503A200807AA3 /* maestro-driverUITests.xctest */,
44F995242C9D6F8800D15B50 /* maestro-driver.app */,
52049BF3293503A200807AA3 /* maestro-driver-iosUITests.xctest */,
44F995242C9D6F8800D15B50 /* maestro-driver-ios.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -300,9 +300,9 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
44F995232C9D6F8800D15B50 /* maestro-driver */ = {
44F995232C9D6F8800D15B50 /* maestro-driver-ios */ = {
isa = PBXNativeTarget;
buildConfigurationList = 44F995312C9D6F8900D15B50 /* Build configuration list for PBXNativeTarget "maestro-driver" */;
buildConfigurationList = 44F995312C9D6F8900D15B50 /* Build configuration list for PBXNativeTarget "maestro-driver-ios" */;
buildPhases = (
44F995202C9D6F8800D15B50 /* Sources */,
44F995212C9D6F8800D15B50 /* Frameworks */,
Expand All @@ -312,16 +312,16 @@
);
dependencies = (
);
name = "maestro-driver";
name = "maestro-driver-ios";
packageProductDependencies = (
);
productName = "maestro-driver";
productReference = 44F995242C9D6F8800D15B50 /* maestro-driver.app */;
productReference = 44F995242C9D6F8800D15B50 /* maestro-driver-ios.app */;
productType = "com.apple.product-type.application";
};
52049BF2293503A200807AA3 /* maestro-driverUITests */ = {
52049BF2293503A200807AA3 /* maestro-driver-iosUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 52049C03293503A200807AA3 /* Build configuration list for PBXNativeTarget "maestro-driverUITests" */;
buildConfigurationList = 52049C03293503A200807AA3 /* Build configuration list for PBXNativeTarget "maestro-driver-iosUITests" */;
buildPhases = (
52049BEF293503A200807AA3 /* Sources */,
52049BF0293503A200807AA3 /* Frameworks */,
Expand All @@ -332,12 +332,12 @@
dependencies = (
44F995332C9D6FB500D15B50 /* PBXTargetDependency */,
);
name = "maestro-driverUITests";
name = "maestro-driver-iosUITests";
packageProductDependencies = (
5279BFD52935ECE20056C609 /* FlyingFox */,
);
productName = "maestro-driver-iosUITests";
productReference = 52049BF3293503A200807AA3 /* maestro-driverUITests.xctest */;
productReference = 52049BF3293503A200807AA3 /* maestro-driver-iosUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
Expand Down Expand Up @@ -376,8 +376,8 @@
projectDirPath = "";
projectRoot = "";
targets = (
44F995232C9D6F8800D15B50 /* maestro-driver */,
52049BF2293503A200807AA3 /* maestro-driverUITests */,
44F995232C9D6F8800D15B50 /* maestro-driver-ios */,
52049BF2293503A200807AA3 /* maestro-driver-iosUITests */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -470,7 +470,7 @@
/* Begin PBXTargetDependency section */
44F995332C9D6FB500D15B50 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 44F995232C9D6F8800D15B50 /* maestro-driver */;
target = 44F995232C9D6F8800D15B50 /* maestro-driver-ios */;
targetProxy = 44F995322C9D6FB500D15B50 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
Expand All @@ -495,14 +495,13 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driver";
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driver-ios";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
Expand Down Expand Up @@ -532,14 +531,13 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driver";
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driver-ios";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
Expand Down Expand Up @@ -676,7 +674,7 @@
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driverUITests";
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driver-iosUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
Expand Down Expand Up @@ -704,7 +702,7 @@
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driverUITests";
PRODUCT_BUNDLE_IDENTIFIER = "dev.mobile.maestro-driver-iosUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
Expand All @@ -720,7 +718,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
44F995312C9D6F8900D15B50 /* Build configuration list for PBXNativeTarget "maestro-driver" */ = {
44F995312C9D6F8900D15B50 /* Build configuration list for PBXNativeTarget "maestro-driver-ios" */ = {
isa = XCConfigurationList;
buildConfigurations = (
44F9952F2C9D6F8900D15B50 /* Debug */,
Expand All @@ -738,7 +736,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
52049C03293503A200807AA3 /* Build configuration list for PBXNativeTarget "maestro-driverUITests" */ = {
52049C03293503A200807AA3 /* Build configuration list for PBXNativeTarget "maestro-driver-iosUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
52049C04293503A200807AA3 /* Debug */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "44F995232C9D6F8800D15B50"
BuildableName = "maestro-driver.app"
BlueprintName = "maestro-driver"
BuildableName = "maestro-driver-ios.app"
BlueprintName = "maestro-driver-ios"
ReferencedContainer = "container:maestro-driver-ios.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -35,8 +35,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52049BF2293503A200807AA3"
BuildableName = "maestro-driverUITests.xctest"
BlueprintName = "maestro-driverUITests"
BuildableName = "maestro-driver-iosUITests.xctest"
BlueprintName = "maestro-driver-iosUITests"
ReferencedContainer = "container:maestro-driver-ios.xcodeproj">
</BuildableReference>
</TestableReference>
Expand All @@ -57,8 +57,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "44F995232C9D6F8800D15B50"
BuildableName = "maestro-driver.app"
BlueprintName = "maestro-driver"
BuildableName = "maestro-driver-ios.app"
BlueprintName = "maestro-driver-ios"
ReferencedContainer = "container:maestro-driver-ios.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand All @@ -74,8 +74,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "44F995232C9D6F8800D15B50"
BuildableName = "maestro-driver.app"
BlueprintName = "maestro-driver"
BuildableName = "maestro-driver-ios.app"
BlueprintName = "maestro-driver-ios"
ReferencedContainer = "container:maestro-driver-ios.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
8 changes: 4 additions & 4 deletions maestro-ios-xctest-runner/test-maestro-ios-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ if [ "$(basename "$PWD")" != "maestro" ]; then
exit 1
fi

if [ ! -d ./build/Products/Debug-iphonesimulator/maestro-driver-UITests-Runner.app ]; then
echo "XCTest runner app not found in ./build/Products/Debug-iphonesimulator/maestro-driver-UITests-Runner.app"
if [ ! -d ./build/Products/Debug-iphonesimulator/maestro-driver-iosUITests-Runner.app ]; then
echo "XCTest runner app not found in ./build/Products/Debug-iphonesimulator/maestro-driver-iosUITests-Runner.app"
exit 1
fi

if [ ! -d ./build/Products/Debug-iphonesimulator/maestro-driver.app ]; then
echo "Dummy test app not found in ./build/Products/Debug-iphonesimulator/maestro-driver.app"
if [ ! -d ./build/Products/Debug-iphonesimulator/maestro-driver-ios.app ]; then
echo "Dummy test app not found in ./build/Products/Debug-iphonesimulator/maestro-driver-ios.app"
exit 1
fi

Expand Down

0 comments on commit c0e5edc

Please sign in to comment.