Skip to content

Commit

Permalink
Xcode 15.1 (#568)
Browse files Browse the repository at this point in the history
* Support Xcode 15.0

Signed-off-by: Nan Wang <[email protected]>

* add testBundleDisconnectTimeout

Signed-off-by: Nan Wang <[email protected]>

* try xcode 15.1

Signed-off-by: Nan Wang <[email protected]>

* Fix test flakiness

Signed-off-by: Nan Wang <[email protected]>

* Split tests

Signed-off-by: Nan Wang <[email protected]>

---------

Signed-off-by: Nan Wang <[email protected]>
  • Loading branch information
nanwng committed Jan 29, 2024
1 parent ff9f45f commit a3f6f4b
Show file tree
Hide file tree
Showing 18 changed files with 240 additions and 106 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
# First machine, runs BP tests batch 1
integration_tests1:
name: Instance Test 1
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests1
- name: Capture xcresult files
Expand All @@ -25,12 +25,12 @@ jobs:
# Second machine, runs BP tests batch 2
integration_tests2:
name: Instance Test 2
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests2
- name: Capture xcresult files
Expand All @@ -41,15 +41,34 @@ jobs:
path: build/**/*.xcresult
retention-days: 14

# Third machine, runs Bluepill tests and makes release build
# Third machine, runs BP tests batch 3
integration_tests3:
name: Instance Test 3
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests3
- name: Capture xcresult files
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: xcresults-bp-tests2
path: build/**/*.xcresult
retention-days: 14

# Fourth machine, runs Bluepill tests and makes release build
build:
name: Bluepill Test and build
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh runner_tests
- name: Capture xcresult files
Expand Down
39 changes: 29 additions & 10 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
# First machine, runs BP tests batch 1
integration_tests1:
name: Instance Test 1
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests1
- name: Capture xcresult files
Expand All @@ -30,12 +30,12 @@ jobs:
# Second machine, runs BP tests batch 2
integration_tests2:
name: Instance Test 2
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests2
- name: Capture xcresult files
Expand All @@ -46,15 +46,34 @@ jobs:
path: build/**/*.xcresult
retention-days: 14

# Third machine, runs Bluepill tests and makes release build
# Third machine, runs BP tests batch 3
integration_tests3:
name: Instance Test 3
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests3
- name: Capture xcresult files
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: xcresults-bp-tests2
path: build/**/*.xcresult
retention-days: 14

# Fourth machine, runs Bluepill tests and makes release build
build:
name: Bluepill Test and build
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh runner_tests
- name: Capture xcresult files
Expand Down
39 changes: 29 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
# First machine, runs BP tests batch 1
integration_tests1:
name: Instance Test 1
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests1
- name: Capture xcresult files
Expand All @@ -28,12 +28,12 @@ jobs:
# Second machine, runs BP tests batch 2
integration_tests2:
name: Instance Test 2
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests2
- name: Capture xcresult files
Expand All @@ -44,18 +44,37 @@ jobs:
path: build/**/*.xcresult
retention-days: 14

# Third machine, runs Bluepill tests and makes release build
# Third machine, runs BP tests batch 3
integration_tests3:
name: Instance Test 3
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the SHA1 because tags can be re-written in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh instance_tests3
- name: Capture xcresult files
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: xcresults-bp-tests2
path: build/**/*.xcresult
retention-days: 14

# Fourth machine, runs Bluepill tests and makes release build
build:
name: BP Test and build
runs-on: macos-12
runs-on: macos-13
steps:
# actions/checkout@v2 but we use the sha because tags can be rewritten in git
- uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598
- name: Report event trigger data
run: |
echo "Event ${{ github.event_name }}, ref: ${{ github.ref }}"
- name: Select Xcode 14.0
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Run Bluepill tests
run: ./scripts/bluepill.sh runner_tests
- name: Capture xcresult files
Expand Down
4 changes: 4 additions & 0 deletions bluepill/bluepill.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,11 @@
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 57Y47U492U;
DSTROOT = "";
FRAMEWORK_SEARCH_PATHS = /Library/Developer/PrivateFrameworks/;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/..\"";
INFOPLIST_FILE = tests/Info.plist;
INSTALL_ROOT = /;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = LI.BluepillRunnerTests;
Expand All @@ -376,9 +378,11 @@
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 57Y47U492U;
DSTROOT = "";
FRAMEWORK_SEARCH_PATHS = /Library/Developer/PrivateFrameworks/;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/..\"";
INFOPLIST_FILE = tests/Info.plist;
INSTALL_ROOT = /;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = LI.BluepillRunnerTests;
Expand Down
18 changes: 14 additions & 4 deletions bp/bp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
018D5C1025B4FF4200B0314B /* BPIntTestCase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BPIntTestCase.h; sourceTree = "<group>"; };
018D5C1125B4FF4200B0314B /* BPIntTestCase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BPIntTestCase.m; sourceTree = "<group>"; };
018D5C1C25B6696000B0314B /* BPReportTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BPReportTests.m; sourceTree = "<group>"; };
71D4D0F82AEA1B4F00859482 /* SimDeviceBootInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimDeviceBootInfo.h; sourceTree = "<group>"; };
7A202A3D1DAED04900D935E3 /* BPExitStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BPExitStatus.h; sourceTree = "<group>"; };
7A202A3F1DB0066100D935E3 /* BPWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BPWriter.h; sourceTree = "<group>"; };
7A202A401DB0066100D935E3 /* BPWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BPWriter.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -527,6 +528,7 @@
BA954F651D6D1AB3007D011D /* NSString-SIMPackedVersion.h */,
BA954F671D6D1AB3007D011D /* NSUserDefaults-SimDefaults.h */,
BA954F681D6D1AB3007D011D /* SimDevice.h */,
71D4D0F82AEA1B4F00859482 /* SimDeviceBootInfo.h */,
BA954F691D6D1AB3007D011D /* SimDeviceIO.h */,
BA954F6A1D6D1AB3007D011D /* SimDeviceIOClient.h */,
BA954F6B1D6D1AB3007D011D /* SimDeviceIOInterface-Protocol.h */,
Expand Down Expand Up @@ -1017,6 +1019,7 @@
buildSettings = {
DEPLOYMENT_LOCATION = NO;
"DEVELOPER_PRIVATE_FRAMEWORKS_DIR[arch=*]" = /Library/Developer/PrivateFrameworks/;
DSTROOT = "";
FRAMEWORK_SEARCH_PATHS = (
"\"/Library/Developer/PrivateFrameworks\"",
"\"$(PRIVATE_FRAMEWORKS_DIR)\"",
Expand All @@ -1031,6 +1034,7 @@
"$(SRCROOT)/src",
);
INFOPLIST_FILE = "$(SRCROOT)/src/Info.plist";
INSTALL_ROOT = /;
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "-DBP_USE_PRIVATE_FRAMEWORKS";
OTHER_LDFLAGS = (
Expand All @@ -1056,6 +1060,7 @@
buildSettings = {
DEPLOYMENT_LOCATION = NO;
"DEVELOPER_PRIVATE_FRAMEWORKS_DIR[arch=*]" = /Library/Developer/PrivateFrameworks/;
DSTROOT = "";
FRAMEWORK_SEARCH_PATHS = (
"\"/Library/Developer/PrivateFrameworks\"",
"\"$(PRIVATE_FRAMEWORKS_DIR)\"",
Expand All @@ -1070,6 +1075,7 @@
"$(SRCROOT)/src",
);
INFOPLIST_FILE = "$(SRCROOT)/src/Info.plist";
INSTALL_ROOT = /;
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "-DBP_USE_PRIVATE_FRAMEWORKS";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -1106,6 +1112,7 @@
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
"DEVELOPER_PRIVATE_FRAMEWORKS_DIR[arch=*]" = /Library/Developer/PrivateFrameworks;
DSTROOT = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
Expand All @@ -1115,6 +1122,7 @@
"$(SRCROOT)/src",
);
INFOPLIST_FILE = "$(SRCROOT)/src/Info.plist";
INSTALL_ROOT = /;
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_LDFLAGS = "";
Expand Down Expand Up @@ -1143,6 +1151,7 @@
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
"DEVELOPER_PRIVATE_FRAMEWORKS_DIR[arch=*]" = /Library/Developer/PrivateFrameworks;
DSTROOT = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
Expand All @@ -1152,6 +1161,7 @@
"$(SRCROOT)/src",
);
INFOPLIST_FILE = "$(SRCROOT)/src/Info.plist";
INSTALL_ROOT = /;
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_LDFLAGS = "";
Expand All @@ -1169,17 +1179,17 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 57Y47U492U;
DSTROOT = "";
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/..",
"$(SRCROOT)/src",
);
INFOPLIST_FILE = tests/Info.plist;
INSTALL_ROOT = /;
LD_RUNPATH_SEARCH_PATHS = "\"$(DEVELOPER_DIR)/Library/PrivateFrameworks\"";
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "-DBP_USE_PRIVATE_FRAMEWORKS";
OTHER_LDFLAGS = (
"-weak_framework",
DVTFoundation,
"-weak_framework",
CoreSimulator,
"-weak_framework",
Expand All @@ -1201,17 +1211,17 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 57Y47U492U;
DSTROOT = "";
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/..",
"$(SRCROOT)/src",
);
INFOPLIST_FILE = tests/Info.plist;
INSTALL_ROOT = /;
LD_RUNPATH_SEARCH_PATHS = "\"$(DEVELOPER_DIR)/Library/PrivateFrameworks\"";
MACOSX_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "-DBP_USE_PRIVATE_FRAMEWORKS";
OTHER_LDFLAGS = (
"-weak_framework",
DVTFoundation,
"-weak_framework",
CoreSimulator,
"-weak_framework",
Expand Down
1 change: 1 addition & 0 deletions bp/src/BPConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ typedef NS_ENUM(NSInteger, BPProgram) {
@property (nonatomic, strong) NSNumber *launchTimeout;
@property (nonatomic, strong) NSNumber *deleteTimeout;
@property (nonatomic) BOOL keepIndividualTestReports;
@property (nonatomic, strong) NSNumber *testBundleDisconnectTimeout;

@property (nonatomic, strong) NSArray<NSString *> *commandLineArguments; // command line arguments for the app
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> *environmentVariables;
Expand Down
2 changes: 2 additions & 0 deletions bp/src/BPConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ typedef NS_OPTIONS(NSUInteger, BPOptionType) {
"Directory where videos of test runs will be saved. If not provided, videos are not recorded."},
{368, "keep-passing-videos", BLUEPILL_BINARY | BP_BINARY, NO, NO, no_argument, "Off", BP_VALUE | BP_BOOL, "keepPassingVideos",
"Whether recorded videos should be kept if the test passed. They are deleted by default."},
{369, "test-bundle-disconnect-timeout", BLUEPILL_BINARY | BP_BINARY, NO, NO, required_argument, "60", BP_VALUE | BP_INTEGER, "testBundleDisconnectTimeout",
"The maximum amount of time, in seconds, to wait while a test bundle is disconnected but might still generate output."},
{0, 0, 0, 0, 0, 0, 0}
};

Expand Down
8 changes: 4 additions & 4 deletions bp/src/BPConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#import <Foundation/Foundation.h>

#pragma mark - Version Constants
#define BP_DEFAULT_XCODE_VERSION "14.0"
#define BP_DEFAULT_RUNTIME "iOS 16.0"
#define BP_DEFAULT_BASE_SDK "16.0"
#define BP_DEFAULT_XCODE_VERSION "15.1"
#define BP_DEFAULT_RUNTIME "iOS 17.2"
#define BP_DEFAULT_BASE_SDK "17.2"

#define BP_DEFAULT_DEVICE_TYPE "iPhone 8"
#define BP_DEFAULT_DEVICE_TYPE "iPhone SE (3rd generation)"

#define BP_DAEMON_PROTOCOL_VERSION 26
#define BP_MAX_PROCESSES_PERCENT 0.75
Expand Down
Loading

0 comments on commit a3f6f4b

Please sign in to comment.