Skip to content

Commit b6bb0de

Browse files
chall37gnachman
authored andcommitted
Move performance tests to a new test target which builds with optimizations
Also adds some tests of the slow paths in gang token handling, saved from PR 576
1 parent b162e86 commit b6bb0de

File tree

9 files changed

+1028
-5
lines changed

9 files changed

+1028
-5
lines changed

ModernTests/VT100ScreenTests.swift

Lines changed: 414 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//
2+
// PerformanceTests-Bridging-Header.h
3+
// iTerm2
4+
//
5+
// Use this file to import your target's public headers that you would like to expose to Swift.
6+
//
7+

PerformanceTests/PerformanceTests.swift

Lines changed: 315 additions & 0 deletions
Large diffs are not rendered by default.

iTerm2.xcodeproj/project.pbxproj

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5149,6 +5149,13 @@
51495149
remoteGlobalIDString = 1DFA7C661923E83500DF1410;
51505150
remoteInfo = SSKeychain;
51515151
};
5152+
69D89B58C881DE661DF12C0A /* PBXContainerItemProxy */ = {
5153+
isa = PBXContainerItemProxy;
5154+
containerPortal = 0464AB0C006CD2EC7F000001 /* Project object */;
5155+
proxyType = 1;
5156+
remoteGlobalIDString = 874206460564169600CFC3F1;
5157+
remoteInfo = iTerm2;
5158+
};
51525159
7577E27F2593B77F00905402 /* PBXContainerItemProxy */ = {
51535160
isa = PBXContainerItemProxy;
51545161
containerPortal = 0464AB0C006CD2EC7F000001 /* Project object */;
@@ -5905,6 +5912,7 @@
59055912
20D5CC6404E7AA0500000106 /* iTermApplicationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = iTermApplicationDelegate.m; sourceTree = "<group>"; tabWidth = 4; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
59065913
20E74F4804E9089700000106 /* ITAddressBookMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ITAddressBookMgr.h; sourceTree = "<group>"; tabWidth = 4; };
59075914
20E74F4904E9089700000106 /* ITAddressBookMgr.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = ITAddressBookMgr.m; sourceTree = "<group>"; tabWidth = 4; };
5915+
2205C1FAE857001EC8A263E4 /* PerformanceTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PerformanceTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
59085916
49A6E4081211CC6000D9AD6F /* Compatability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compatability.h; sourceTree = "<group>"; };
59095917
5300984A2259365B00A69348 /* iTermHapticActuator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = iTermHapticActuator.h; sourceTree = "<group>"; };
59105918
5300984B2259365B00A69348 /* iTermHapticActuator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iTermHapticActuator.m; sourceTree = "<group>"; };
@@ -9143,6 +9151,7 @@
91439151
/* End PBXFileReference section */
91449152

91459153
/* Begin PBXFileSystemSynchronizedRootGroup section */
9154+
9C0F690213C696BCC28C2EDF /* PerformanceTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = PerformanceTests; sourceTree = "<group>"; };
91469155
A6A723AF2DC04C2200A8115D /* ModernTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = ModernTests; sourceTree = "<group>"; };
91479156
/* End PBXFileSystemSynchronizedRootGroup section */
91489157

@@ -9310,6 +9319,13 @@
93109319
);
93119320
runOnlyForDeploymentPostprocessing = 0;
93129321
};
9322+
BB285A1CF66CAEC00CEA40E2 /* Frameworks */ = {
9323+
isa = PBXFrameworksBuildPhase;
9324+
buildActionMask = 2147483647;
9325+
files = (
9326+
);
9327+
runOnlyForDeploymentPostprocessing = 0;
9328+
};
93139329
/* End PBXFrameworksBuildPhase section */
93149330

93159331
/* Begin PBXGroup section */
@@ -9335,6 +9351,7 @@
93359351
A6822778280E26CD005DF0B4 /* SwiftyMarkdown */,
93369352
A6A5BDF82A070C3C00F5FD44 /* iTerm2ImportStatus */,
93379353
A6A723AF2DC04C2200A8115D /* ModernTests */,
9354+
9C0F690213C696BCC28C2EDF /* PerformanceTests */,
93389355
A616E6782EA9544D000C0C18 /* pwmplugin */,
93399356
1DD39AD5180B8118004E56D5 /* Frameworks */,
93409357
0464AB32006CD2EC7F000001 /* Products */,
@@ -9768,6 +9785,7 @@
97689785
7596379A2593AE0700E278CC /* iTerm2SandboxedWorker.xpc */,
97699786
A6A5BDF72A070C3800F5FD44 /* iTerm2ImportStatus.app */,
97709787
A6A723AE2DC04C2200A8115D /* ModernTests.xctest */,
9788+
2205C1FAE857001EC8A263E4 /* PerformanceTests.xctest */,
97719789
A69FEEBA2E123B8700AFF7A8 /* iTermSwiftPackages.framework */,
97729790
);
97739791
name = Products;
@@ -15946,6 +15964,29 @@
1594615964
productReference = 1DFA7C671923E83500DF1410 /* libSSKeychain.a */;
1594715965
productType = "com.apple.product-type.library.static";
1594815966
};
15967+
2549E8A336D6EEDF5F73151F /* PerformanceTests */ = {
15968+
isa = PBXNativeTarget;
15969+
buildConfigurationList = AFE316DC78A36A80F9745F35 /* Build configuration list for PBXNativeTarget "PerformanceTests" */;
15970+
buildPhases = (
15971+
02DFDB5F1CE596C1BB2E6FF3 /* Sources */,
15972+
BB285A1CF66CAEC00CEA40E2 /* Frameworks */,
15973+
5ABD906D9F58A2FB375A934F /* Resources */,
15974+
);
15975+
buildRules = (
15976+
);
15977+
dependencies = (
15978+
CC48416BE7001BC48B0F9368 /* PBXTargetDependency */,
15979+
);
15980+
fileSystemSynchronizedGroups = (
15981+
9C0F690213C696BCC28C2EDF /* PerformanceTests */,
15982+
);
15983+
name = PerformanceTests;
15984+
packageProductDependencies = (
15985+
);
15986+
productName = PerformanceTests;
15987+
productReference = 2205C1FAE857001EC8A263E4 /* PerformanceTests.xctest */;
15988+
productType = "com.apple.product-type.bundle.unit-test";
15989+
};
1594915990
759637992593AE0700E278CC /* iTerm2SandboxedWorker */ = {
1595015991
isa = PBXNativeTarget;
1595115992
buildConfigurationList = 759637AA2593AE0700E278CC /* Build configuration list for PBXNativeTarget "iTerm2SandboxedWorker" */;
@@ -16190,6 +16231,10 @@
1619016231
1DFA7C661923E83500DF1410 = {
1619116232
DevelopmentTeam = H7V7XYVQ7D;
1619216233
};
16234+
2549E8A336D6EEDF5F73151F = {
16235+
CreatedOnToolsVersion = 16.1;
16236+
TestTargetID = 874206460564169600CFC3F1;
16237+
};
1619316238
759637992593AE0700E278CC = {
1619416239
CreatedOnToolsVersion = 12.3;
1619516240
DevelopmentTeam = H7V7XYVQ7D;
@@ -16277,6 +16322,7 @@
1627716322
759637992593AE0700E278CC /* iTerm2SandboxedWorker */,
1627816323
A6A5BDF62A070C3800F5FD44 /* iTerm2ImportStatus */,
1627916324
A6A723AD2DC04C2200A8115D /* ModernTests */,
16325+
2549E8A336D6EEDF5F73151F /* PerformanceTests */,
1628016326
A69FEEB92E123B8700AFF7A8 /* iTermSwiftPackages */,
1628116327
);
1628216328
};
@@ -17398,6 +17444,13 @@
1739817444
);
1739917445
runOnlyForDeploymentPostprocessing = 0;
1740017446
};
17447+
5ABD906D9F58A2FB375A934F /* Resources */ = {
17448+
isa = PBXResourcesBuildPhase;
17449+
buildActionMask = 2147483647;
17450+
files = (
17451+
);
17452+
runOnlyForDeploymentPostprocessing = 0;
17453+
};
1740117454
759637982593AE0700E278CC /* Resources */ = {
1740217455
isa = PBXResourcesBuildPhase;
1740317456
buildActionMask = 2147483647;
@@ -18499,6 +18552,13 @@
1849918552
/* End PBXShellScriptBuildPhase section */
1850018553

1850118554
/* Begin PBXSourcesBuildPhase section */
18555+
02DFDB5F1CE596C1BB2E6FF3 /* Sources */ = {
18556+
isa = PBXSourcesBuildPhase;
18557+
buildActionMask = 2147483647;
18558+
files = (
18559+
);
18560+
runOnlyForDeploymentPostprocessing = 0;
18561+
};
1850218562
1D6ED9ED19AEA20D005A7799 /* Sources */ = {
1850318563
isa = PBXSourcesBuildPhase;
1850418564
buildActionMask = 2147483647;
@@ -20284,6 +20344,11 @@
2028420344
isa = PBXTargetDependency;
2028520345
productRef = A6EC804D281BBBE100493544 /* SwiftyMarkdown */;
2028620346
};
20347+
CC48416BE7001BC48B0F9368 /* PBXTargetDependency */ = {
20348+
isa = PBXTargetDependency;
20349+
target = 874206460564169600CFC3F1 /* iTerm2 */;
20350+
targetProxy = 69D89B58C881DE661DF12C0A /* PBXContainerItemProxy */;
20351+
};
2028720352
/* End PBXTargetDependency section */
2028820353

2028920354
/* Begin PBXVariantGroup section */
@@ -20322,6 +20387,70 @@
2032220387
/* End PBXVariantGroup section */
2032320388

2032420389
/* Begin XCBuildConfiguration section */
20390+
01C2D3E4F5061829394A5B6C /* Beta */ = {
20391+
isa = XCBuildConfiguration;
20392+
buildSettings = {
20393+
BUNDLE_LOADER = "$(TEST_HOST)";
20394+
CODE_SIGN_IDENTITY = "-";
20395+
CODE_SIGN_STYLE = Automatic;
20396+
CURRENT_PROJECT_VERSION = 1;
20397+
DEVELOPMENT_TEAM = H7V7XYVQ7D;
20398+
FRAMEWORK_SEARCH_PATHS = (
20399+
"$(inherited)",
20400+
"$(SRCROOT)/build/Development",
20401+
"$(SRCROOT)",
20402+
"$(SRCROOT)/ColorPicker",
20403+
"$(SRCROOT)/ThirdParty",
20404+
"$(SRCROOT)/SearchableComboListView",
20405+
"$(SRCROOT)/BetterFontPicker",
20406+
);
20407+
GENERATE_INFOPLIST_FILE = YES;
20408+
MACOSX_DEPLOYMENT_TARGET = 15.0;
20409+
PRODUCT_BUNDLE_IDENTIFIER = com.iterm2.PerformanceTests;
20410+
PRODUCT_NAME = "$(TARGET_NAME)";
20411+
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PerformanceTests/PerformanceTests-Bridging-Header.h";
20412+
SWIFT_VERSION = 5.0;
20413+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iTerm2.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iTerm2";
20414+
USER_HEADER_SEARCH_PATHS = (
20415+
"$(SRCROOT)/sources",
20416+
"$(SRCROOT)/ThirdParty",
20417+
"$(PROJECT_DIR)/ThirdParty/adblock-rust/include",
20418+
);
20419+
};
20420+
name = Beta;
20421+
};
20422+
12D3E4F5061829394A5B6C7D /* Nightly */ = {
20423+
isa = XCBuildConfiguration;
20424+
buildSettings = {
20425+
BUNDLE_LOADER = "$(TEST_HOST)";
20426+
CODE_SIGN_IDENTITY = "-";
20427+
CODE_SIGN_STYLE = Automatic;
20428+
CURRENT_PROJECT_VERSION = 1;
20429+
DEVELOPMENT_TEAM = H7V7XYVQ7D;
20430+
FRAMEWORK_SEARCH_PATHS = (
20431+
"$(inherited)",
20432+
"$(SRCROOT)/build/Development",
20433+
"$(SRCROOT)",
20434+
"$(SRCROOT)/ColorPicker",
20435+
"$(SRCROOT)/ThirdParty",
20436+
"$(SRCROOT)/SearchableComboListView",
20437+
"$(SRCROOT)/BetterFontPicker",
20438+
);
20439+
GENERATE_INFOPLIST_FILE = YES;
20440+
MACOSX_DEPLOYMENT_TARGET = 15.0;
20441+
PRODUCT_BUNDLE_IDENTIFIER = com.iterm2.PerformanceTests;
20442+
PRODUCT_NAME = "$(TARGET_NAME)";
20443+
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PerformanceTests/PerformanceTests-Bridging-Header.h";
20444+
SWIFT_VERSION = 5.0;
20445+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iTerm2.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iTerm2";
20446+
USER_HEADER_SEARCH_PATHS = (
20447+
"$(SRCROOT)/sources",
20448+
"$(SRCROOT)/ThirdParty",
20449+
"$(PROJECT_DIR)/ThirdParty/adblock-rust/include",
20450+
);
20451+
};
20452+
name = Nightly;
20453+
};
2032520454
1809E7B01665E2CB0069C439 /* Nightly */ = {
2032620455
isa = XCBuildConfiguration;
2032720456
buildSettings = {
@@ -23645,6 +23774,7 @@
2364523774
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
2364623775
CLANG_WARN_UNREACHABLE_CODE = YES;
2364723776
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
23777+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
2364823778
CODE_SIGN_STYLE = Automatic;
2364923779
COPY_PHASE_STRIP = NO;
2365023780
CURRENT_PROJECT_VERSION = 1;
@@ -23732,6 +23862,7 @@
2373223862
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
2373323863
CLANG_WARN_UNREACHABLE_CODE = YES;
2373423864
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
23865+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
2373523866
CODE_SIGN_STYLE = Automatic;
2373623867
COPY_PHASE_STRIP = NO;
2373723868
CURRENT_PROJECT_VERSION = 1;
@@ -23811,6 +23942,7 @@
2381123942
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
2381223943
CLANG_WARN_UNREACHABLE_CODE = YES;
2381323944
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
23945+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
2381423946
CODE_SIGN_STYLE = Automatic;
2381523947
COPY_PHASE_STRIP = NO;
2381623948
CURRENT_PROJECT_VERSION = 1;
@@ -23890,6 +24022,7 @@
2389024022
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
2389124023
CLANG_WARN_UNREACHABLE_CODE = YES;
2389224024
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
24025+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
2389324026
CODE_SIGN_STYLE = Automatic;
2389424027
COPY_PHASE_STRIP = NO;
2389524028
CURRENT_PROJECT_VERSION = 1;
@@ -24637,6 +24770,70 @@
2463724770
};
2463824771
name = Deployment;
2463924772
};
24773+
E9A1B2C3D4E5F60718293A4B /* Development */ = {
24774+
isa = XCBuildConfiguration;
24775+
buildSettings = {
24776+
BUNDLE_LOADER = "$(TEST_HOST)";
24777+
CODE_SIGN_IDENTITY = "-";
24778+
CODE_SIGN_STYLE = Automatic;
24779+
CURRENT_PROJECT_VERSION = 1;
24780+
DEVELOPMENT_TEAM = H7V7XYVQ7D;
24781+
FRAMEWORK_SEARCH_PATHS = (
24782+
"$(inherited)",
24783+
"$(SRCROOT)/build/Development",
24784+
"$(SRCROOT)",
24785+
"$(SRCROOT)/ColorPicker",
24786+
"$(SRCROOT)/ThirdParty",
24787+
"$(SRCROOT)/SearchableComboListView",
24788+
"$(SRCROOT)/BetterFontPicker",
24789+
);
24790+
GENERATE_INFOPLIST_FILE = YES;
24791+
MACOSX_DEPLOYMENT_TARGET = 15.0;
24792+
PRODUCT_BUNDLE_IDENTIFIER = com.iterm2.PerformanceTests;
24793+
PRODUCT_NAME = "$(TARGET_NAME)";
24794+
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PerformanceTests/PerformanceTests-Bridging-Header.h";
24795+
SWIFT_VERSION = 5.0;
24796+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iTerm2.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iTerm2";
24797+
USER_HEADER_SEARCH_PATHS = (
24798+
"$(SRCROOT)/sources",
24799+
"$(SRCROOT)/ThirdParty",
24800+
"$(PROJECT_DIR)/ThirdParty/adblock-rust/include",
24801+
);
24802+
};
24803+
name = Development;
24804+
};
24805+
F0B1C2D3E4F5061728394A5B /* Deployment */ = {
24806+
isa = XCBuildConfiguration;
24807+
buildSettings = {
24808+
BUNDLE_LOADER = "$(TEST_HOST)";
24809+
CODE_SIGN_IDENTITY = "-";
24810+
CODE_SIGN_STYLE = Automatic;
24811+
CURRENT_PROJECT_VERSION = 1;
24812+
DEVELOPMENT_TEAM = H7V7XYVQ7D;
24813+
FRAMEWORK_SEARCH_PATHS = (
24814+
"$(inherited)",
24815+
"$(SRCROOT)/build/Development",
24816+
"$(SRCROOT)",
24817+
"$(SRCROOT)/ColorPicker",
24818+
"$(SRCROOT)/ThirdParty",
24819+
"$(SRCROOT)/SearchableComboListView",
24820+
"$(SRCROOT)/BetterFontPicker",
24821+
);
24822+
GENERATE_INFOPLIST_FILE = YES;
24823+
MACOSX_DEPLOYMENT_TARGET = 15.0;
24824+
PRODUCT_BUNDLE_IDENTIFIER = com.iterm2.PerformanceTests;
24825+
PRODUCT_NAME = "$(TARGET_NAME)";
24826+
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/PerformanceTests/PerformanceTests-Bridging-Header.h";
24827+
SWIFT_VERSION = 5.0;
24828+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iTerm2.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iTerm2";
24829+
USER_HEADER_SEARCH_PATHS = (
24830+
"$(SRCROOT)/sources",
24831+
"$(SRCROOT)/ThirdParty",
24832+
"$(PROJECT_DIR)/ThirdParty/adblock-rust/include",
24833+
);
24834+
};
24835+
name = Deployment;
24836+
};
2464024837
/* End XCBuildConfiguration section */
2464124838

2464224839
/* Begin XCConfigurationList section */
@@ -24783,6 +24980,17 @@
2478324980
defaultConfigurationIsVisible = 0;
2478424981
defaultConfigurationName = Development;
2478524982
};
24983+
AFE316DC78A36A80F9745F35 /* Build configuration list for PBXNativeTarget "PerformanceTests" */ = {
24984+
isa = XCConfigurationList;
24985+
buildConfigurations = (
24986+
E9A1B2C3D4E5F60718293A4B /* Development */,
24987+
F0B1C2D3E4F5061728394A5B /* Deployment */,
24988+
01C2D3E4F5061829394A5B6C /* Beta */,
24989+
12D3E4F5061829394A5B6C7D /* Nightly */,
24990+
);
24991+
defaultConfigurationIsVisible = 0;
24992+
defaultConfigurationName = Deployment;
24993+
};
2478624994
BB024D35096EE4080021E793 /* Build configuration list for PBXNativeTarget "iTerm2" */ = {
2478724995
isa = XCConfigurationList;
2478824996
buildConfigurations = (

0 commit comments

Comments
 (0)