Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update team ID and bundle ID in test fixtures #1564

Merged
merged 6 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/app_and_device_attributes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Feature: App and Device attributes present
And the error payload field "events.0.app.bundleVersion" is not null
#And the error payload field "events.0.app.dsymUUIDs" is a non-empty array # Fails, == nil
And the error payload field "events.0.app.id" equals the platform-dependent string:
| ios | com.bugsnag.iOSTestApp |
| macos | com.bugsnag.macOSTestApp |
| ios | com.bugsnag.fixtures.iOSTestApp |
| macos | com.bugsnag.fixtures.macOSTestApp |
And the error payload field "events.0.app.isLaunching" is true
And the error payload field "events.0.app.releaseStage" equals "development"
And the error payload field "events.0.app.type" equals the platform-dependent string:
Expand Down
4 changes: 2 additions & 2 deletions features/app_hangs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Feature: App hangs
And the error payload field "events.0.app.bundleVersion" is not null
#And the error payload field "events.0.app.dsymUUIDs" is a non-empty array # Fails, == nil
And the error payload field "events.0.app.id" equals the platform-dependent string:
| ios | com.bugsnag.iOSTestApp |
| macos | com.bugsnag.macOSTestApp |
| ios | com.bugsnag.fixtures.iOSTestApp |
| macos | com.bugsnag.fixtures.macOSTestApp |
And the error payload field "events.0.app.isLaunching" is true
And the error payload field "events.0.app.releaseStage" equals "development"
And the error payload field "events.0.app.type" equals the platform-dependent string:
Expand Down
10 changes: 5 additions & 5 deletions features/barebone_tests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Feature: Barebone tests
And the event "app.binaryArch" matches "(arm|x86)"
And the event "app.bundleVersion" equals "12301"
And the event "app.id" equals the platform-dependent string:
| ios | com.bugsnag.iOSTestApp |
| macos | com.bugsnag.macOSTestApp |
| watchos | com.bugsnag.watchOSTestApp.watchkitapp.watchkitextension |
| ios | com.bugsnag.fixtures.iOSTestApp |
| macos | com.bugsnag.fixtures.macOSTestApp |
| watchos | com.bugsnag.fixtures.watchOSTestApp.watchkitapp.watchkitextension |
And the event "app.inForeground" is true
And the event "app.isLaunching" is true
And the event "app.releaseStage" equals "development"
Expand Down Expand Up @@ -270,8 +270,8 @@ Feature: Barebone tests
And the event "app.bundleVersion" equals "321.123"
And the event "app.dsymUUIDs" is not null
And the event "app.id" equals the platform-dependent string:
| ios | com.bugsnag.iOSTestApp |
| macos | com.bugsnag.macOSTestApp |
| ios | com.bugsnag.fixtures.iOSTestApp |
| macos | com.bugsnag.fixtures.macOSTestApp |
And the event "app.inForeground" is true
And the event "app.isLaunching" is true
And the event "app.releaseStage" equals "staging"
Expand Down
2 changes: 1 addition & 1 deletion features/fixtures/ios/exportOptions.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>teamID</key>
<string>372ZUL2ZB7</string>
<string>7W9PZ27Y5F</string>
<key>stripSwiftSymbols</key>
<false/>
<key>compileBitcode</key>
Expand Down
8 changes: 4 additions & 4 deletions features/fixtures/ios/iOSTestApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
ENABLE_TESTABILITY = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
Expand All @@ -1105,7 +1105,7 @@
LINKER_DISPLAYS_MANGLED_NAMES = NO;
OTHER_SWIFT_FLAGS = "-Onone";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.iOSTestApp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.iOSTestApp;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = all;
Expand All @@ -1132,7 +1132,7 @@
"DEBUG_INFORMATION_FORMAT[sdk=iphoneos*]" = "dwarf-with-dsym";
"DEBUG_INFORMATION_FORMAT[sdk=iphonesimulator*]" = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
ENABLE_NS_ASSERTIONS = YES;
ENABLE_TESTABILITY = NO;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
Expand All @@ -1148,7 +1148,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_SWIFT_FLAGS = "-Onone";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.iOSTestApp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.iOSTestApp;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = all;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ int main(int argc, const char * argv[]) {
// These threads make a deadlock more likely if any of the notify threads are doing something they shouldn't.

dispatch_async(dispatch_get_global_queue(QOS_CLASS_UTILITY, 0), ^{
NSThread.currentThread.name = @"com.bugsnag.stress-test-malloc";
NSThread.currentThread.name = @"com.bugsnag.fixtures.stress-test-malloc";
while (1) {
free(malloc(1024 * 1024));
}
});

dispatch_async(dispatch_get_global_queue(QOS_CLASS_UTILITY, 0), ^{
NSThread.currentThread.name = @"com.bugsnag.stress-test-objc";
NSThread.currentThread.name = @"com.bugsnag.fixtures.stress-test-objc";
while (1) {
@autoreleasepool {
[[NSArray arrayWithObjects:@0, @1, @3, @4, nil] sortedArrayUsingSelector:@selector(compare:)];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
);
INFOPLIST_FILE = macOSTestApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.macOSTestApp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.macOSTestApp;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
Expand All @@ -1131,7 +1131,7 @@
);
INFOPLIST_FILE = macOSTestApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.macOSTestApp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.macOSTestApp;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_SWIFT_SYMBOLS = NO;
Expand Down
4 changes: 2 additions & 2 deletions features/fixtures/macos/macOSTestApp/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ int main(int argc, const char * argv[]) {
NSString *tmpdir = [[[NSProcessInfo processInfo] environment] objectForKey:@"TMPDIR"];
[[NSFileManager defaultManager] removeItemAtPath:
// Avoids a crash observed in -[NSPersistentUICrashHandler inspectCrashDataWithModification:handler:]
// that seems to occur if "$TMPDIR/com.bugsnag.macOSTestApp.savedState" is corrupted
[tmpdir stringByAppendingPathComponent:@"com.bugsnag.macOSTestApp.savedState"] error:nil];
// that seems to occur if "$TMPDIR/com.bugsnag.fixtures.macOSTestApp.savedState" is corrupted
[tmpdir stringByAppendingPathComponent:@"com.bugsnag.fixtures.macOSTestApp.savedState"] error:nil];

[[NSUserDefaults standardUserDefaults] registerDefaults:@{
// Disable state restoration to prevent the following dialog being shown after crashes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>com.bugsnag.watchOSTestApp.watchkitapp</string>
<string>com.bugsnag.fixtures.watchOSTestApp.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = (
Expand All @@ -525,7 +525,7 @@
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.watchOSTestApp.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.watchOSTestApp.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -544,7 +544,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = (
Expand All @@ -564,7 +564,7 @@
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.watchOSTestApp.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.watchOSTestApp.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -583,13 +583,13 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
GENERATE_INFOPLIST_FILE = YES;
IBSC_MODULE = watchOSTestApp_WatchKit_Extension;
INFOPLIST_KEY_CFBundleDisplayName = "watchOSTestApp WatchKit App";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.watchOSTestApp.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.watchOSTestApp.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -607,13 +607,13 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
GENERATE_INFOPLIST_FILE = YES;
IBSC_MODULE = watchOSTestApp_WatchKit_Extension;
INFOPLIST_KEY_CFBundleDisplayName = "watchOSTestApp WatchKit App";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.watchOSTestApp.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.watchOSTestApp.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -628,9 +628,9 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.watchOSTestApp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.watchOSTestApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
Expand All @@ -641,9 +641,9 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 372ZUL2ZB7;
DEVELOPMENT_TEAM = 7W9PZ27Y5F;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.watchOSTestApp;
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.fixtures.watchOSTestApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
Expand Down
2 changes: 1 addition & 1 deletion features/out_of_memory.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: Out of memory errors
And the event "metaData.device.timezone" is not null
And the event "metaData.device.simulator" is false
And the event "metaData.device.wordSize" is not null
And the event "app.id" equals "com.bugsnag.iOSTestApp"
And the event "app.id" equals "com.bugsnag.fixtures.iOSTestApp"
And the event "metaData.app.name" equals "iOSTestApp"
And the event "app.inForeground" is true
And the event "app.type" equals "iOS"
Expand Down
2 changes: 1 addition & 1 deletion features/scripts/foreground_ios_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Bring a previously running app to the foreground

xcrun simctl launch "$iOS_Simulator" com.bugsnag.iOSTestApp \
xcrun simctl launch "$iOS_Simulator" com.bugsnag.fixtures.iOSTestApp \
"EVENT_TYPE=AutoCaptureRunScenario" \
"BUGSNAG_API_KEY=$BUGSNAG_API_KEY" \
"MOCK_API_PATH=http://localhost:$MOCK_API_PORT"
4 changes: 2 additions & 2 deletions features/steps/app_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
wait_for_true do
case Maze::Helper.get_current_platform
when 'ios'
Maze.driver.app_state('com.bugsnag.iOSTestApp') == :not_running
Maze.driver.app_state('com.bugsnag.fixtures.iOSTestApp') == :not_running
when 'macos'
`lsappinfo info -only pid -app com.bugsnag.macOSTestApp`.empty?
`lsappinfo info -only pid -app com.bugsnag.fixtures.macOSTestApp`.empty?
else
raise "Don't know how to query app state on this platform"
end
Expand Down
4 changes: 2 additions & 2 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

if Maze.config.os == 'ios' && Maze.config.farm == :local
# Recent Appium versions don't always uninstall the old version of the app ¯\_(ツ)_/¯
system('ideviceinstaller --uninstall com.bugsnag.iOSTestApp')
system('ideviceinstaller --uninstall com.bugsnag.fixtures.iOSTestApp')
end

if Maze.config.os == 'ios'
Expand Down Expand Up @@ -134,7 +134,7 @@ def skip_between(os, version_lo, version_hi)
end
when 'ios'
begin
data = Maze.driver.pull_file '@com.bugsnag.iOSTestApp/Documents/kscrash.log'
data = Maze.driver.pull_file '@com.bugsnag.fixtures.iOSTestApp/Documents/kscrash.log'
File.open(File.join(path, 'kscrash.log'), 'wb') { |file| file << data }
rescue StandardError
puts "Maze.driver.pull_file failed: #{$ERROR_INFO}"
Expand Down