From dac509cd768ddcfa26575e7498ef5c7c0463c0ac Mon Sep 17 00:00:00 2001 From: HeyImChris <48299693+HeyImChris@users.noreply.github.com> Date: Mon, 11 Nov 2019 17:34:21 -0800 Subject: [PATCH] Add a mac test plan to improve our confidence in fixes going into RN moving forward. Check for safe memory usage and concurrency problems (#190) --- .../RNTesterTestPlan_mac.xctestplan | 54 +++++++++++++++++++ RNTester/RNTester.xcodeproj/project.pbxproj | 2 + .../xcschemes/RNTester-macOS.xcscheme | 8 ++- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 RNTester/RNTester-macOS/RNTesterTestPlan_mac.xctestplan diff --git a/RNTester/RNTester-macOS/RNTesterTestPlan_mac.xctestplan b/RNTester/RNTester-macOS/RNTesterTestPlan_mac.xctestplan new file mode 100644 index 0000000000..d545f135c7 --- /dev/null +++ b/RNTester/RNTester-macOS/RNTesterTestPlan_mac.xctestplan @@ -0,0 +1,54 @@ +{ + "configurations" : [ + { + "id" : "AFD9E2BD-E33C-4C4A-A384-5EAE06C9A403", + "name" : "Memory Checking", + "options" : { + "addressSanitizer" : { + "detectStackUseAfterReturn" : true, + "enabled" : true + }, + "nsZombieEnabled" : true + } + }, + { + "id" : "25FE48EC-9A2D-4569-A6B2-13F09014C2AB", + "name" : "Concurrency", + "options" : { + "testExecutionOrdering" : "random", + "undefinedBehaviorSanitizerEnabled" : true + } + } + ], + "defaultOptions" : { + "codeCoverage" : false, + "environmentVariableEntries" : [ + { + "key" : "CI_USE_PACKAGER", + "value" : "1" + } + ], + "targetForVariableExpansion" : { + "containerPath" : "container:RNTester.xcodeproj", + "identifier" : "18FC77851EF4770B002B3F17", + "name" : "RNTester-macOS" + } + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:RNTester.xcodeproj", + "identifier" : "18FC779A1EF4770B002B3F17", + "name" : "RNTester-macOSUnitTests" + } + }, + { + "target" : { + "containerPath" : "container:RNTester.xcodeproj", + "identifier" : "18FC77A51EF4770B002B3F17", + "name" : "RNTester-macOSIntegrationTests" + } + } + ], + "version" : 1 +} diff --git a/RNTester/RNTester.xcodeproj/project.pbxproj b/RNTester/RNTester.xcodeproj/project.pbxproj index af9d0c0434..0ff65a8ae6 100644 --- a/RNTester/RNTester.xcodeproj/project.pbxproj +++ b/RNTester/RNTester.xcodeproj/project.pbxproj @@ -916,6 +916,7 @@ 8385CF051B8747A000C6273E /* RCTImageLoaderHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTImageLoaderHelpers.h; sourceTree = ""; }; 9F1534BD233AB44F006DFE44 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 9F1C4D00236CB06B0022EC0D /* RNTesterTestPlan_iOS.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = RNTesterTestPlan_iOS.xctestplan; sourceTree = ""; }; + 9F4D1F022375E7A10012B4A9 /* RNTesterTestPlan_mac.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = RNTesterTestPlan_mac.xctestplan; sourceTree = ""; }; 9F5C1923230F46CB00E3E5A7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 9FBFA513233C7E4C003D9A8D /* RNTesterBundle-macOS.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "RNTesterBundle-macOS.bundle"; sourceTree = BUILT_PRODUCTS_DIR; }; 9FBFA515233C7E4C003D9A8D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -1362,6 +1363,7 @@ 18FC77871EF4770B002B3F17 /* RNTester-macOS */ = { isa = PBXGroup; children = ( + 9F4D1F022375E7A10012B4A9 /* RNTesterTestPlan_mac.xctestplan */, 18FC77881EF4770B002B3F17 /* AppDelegate.h */, 18FC77891EF4770B002B3F17 /* AppDelegate.m */, 18FC778E1EF4770B002B3F17 /* ViewController.h */, diff --git a/RNTester/RNTester.xcodeproj/xcshareddata/xcschemes/RNTester-macOS.xcscheme b/RNTester/RNTester.xcodeproj/xcshareddata/xcschemes/RNTester-macOS.xcscheme index f5c9cefcf6..3a9f028b0f 100644 --- a/RNTester/RNTester.xcodeproj/xcshareddata/xcschemes/RNTester-macOS.xcscheme +++ b/RNTester/RNTester.xcodeproj/xcshareddata/xcschemes/RNTester-macOS.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -64,6 +64,12 @@ ReferencedContainer = "container:RNTester.xcodeproj"> + + + +