Skip to content

Commit

Permalink
check-result, support tests. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
BB9z committed Jan 21, 2024
1 parent 52dde26 commit 68b4f23
Show file tree
Hide file tree
Showing 8 changed files with 599 additions and 252 deletions.
597 changes: 399 additions & 198 deletions check-result

Large diffs are not rendered by default.

149 changes: 98 additions & 51 deletions tests/samples/BuildTests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
11930B9A2B5A54EB001A4419 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11930B992B5A54EB001A4419 /* main.swift */; };
11930BAC2B5A562E001A4419 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11930BAB2B5A561C001A4419 /* main.swift */; };
D58D563D2B5BEE0D009CE60D /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58D56332B5BED7B009CE60D /* main.swift */; };
D5D01F872B5CAC7500376B84 /* UnitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D01F862B5CAC7500376B84 /* UnitTests.swift */; };
D5D01F872B5CAC7500376B84 /* File1.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D01F862B5CAC7500376B84 /* File1.swift */; };
D5D01F982B5CB92E00376B84 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D5D01F8B2B5CB18400376B84 /* main.m */; };
D5D01F9B2B5D01F600376B84 /* File2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D01F9A2B5D01F600376B84 /* File2.swift */; };
D5D01FA92B5D02B300376B84 /* File2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D01F9D2B5D025F00376B84 /* File2.swift */; };
D5D01FAA2B5D02B600376B84 /* File1.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D01F9E2B5D025F00376B84 /* File1.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -61,9 +64,13 @@
D58D56332B5BED7B009CE60D /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
D58D563C2B5BED84009CE60D /* HasError */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = HasError; sourceTree = BUILT_PRODUCTS_DIR; };
D5D01F842B5CAC7500376B84 /* TestsOK.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestsOK.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
D5D01F862B5CAC7500376B84 /* UnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnitTests.swift; sourceTree = "<group>"; };
D5D01F862B5CAC7500376B84 /* File1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File1.swift; sourceTree = "<group>"; };
D5D01F8B2B5CB18400376B84 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
D5D01F972B5CB90100376B84 /* ClangAnalyz */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ClangAnalyz; sourceTree = BUILT_PRODUCTS_DIR; };
D5D01F9A2B5D01F600376B84 /* File2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File2.swift; sourceTree = "<group>"; };
D5D01F9D2B5D025F00376B84 /* File2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File2.swift; sourceTree = "<group>"; };
D5D01F9E2B5D025F00376B84 /* File1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File1.swift; sourceTree = "<group>"; };
D5D01FA82B5D02A000376B84 /* TestsFail.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestsFail.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -102,6 +109,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D5D01FA32B5D02A000376B84 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -121,6 +135,7 @@
D58D563C2B5BED84009CE60D /* HasError */,
11930BAA2B5A55C9001A4419 /* HasWarning */,
11930B962B5A54EB001A4419 /* NoWarning */,
D5D01FA82B5D02A000376B84 /* TestsFail.xctest */,
D5D01F842B5CAC7500376B84 /* TestsOK.xctest */,
);
name = Products;
Expand Down Expand Up @@ -164,6 +179,7 @@
D5D01F852B5CAC7500376B84 /* UnitTests */ = {
isa = PBXGroup;
children = (
D5D01F9C2B5D025F00376B84 /* TestsFail */,
D5D01F992B5CC1F500376B84 /* TestsOK */,
);
path = UnitTests;
Expand All @@ -180,11 +196,21 @@
D5D01F992B5CC1F500376B84 /* TestsOK */ = {
isa = PBXGroup;
children = (
D5D01F862B5CAC7500376B84 /* UnitTests.swift */,
D5D01F862B5CAC7500376B84 /* File1.swift */,
D5D01F9A2B5D01F600376B84 /* File2.swift */,
);
path = TestsOK;
sourceTree = "<group>";
};
D5D01F9C2B5D025F00376B84 /* TestsFail */ = {
isa = PBXGroup;
children = (
D5D01F9E2B5D025F00376B84 /* File1.swift */,
D5D01F9D2B5D025F00376B84 /* File2.swift */,
);
path = TestsFail;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -274,6 +300,23 @@
productReference = D5D01F972B5CB90100376B84 /* ClangAnalyz */;
productType = "com.apple.product-type.tool";
};
D5D01F9F2B5D02A000376B84 /* TestsFail */ = {
isa = PBXNativeTarget;
buildConfigurationList = D5D01FA52B5D02A000376B84 /* Build configuration list for PBXNativeTarget "TestsFail" */;
buildPhases = (
D5D01FA02B5D02A000376B84 /* Sources */,
D5D01FA32B5D02A000376B84 /* Frameworks */,
D5D01FA42B5D02A000376B84 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TestsFail;
productName = UnitTests;
productReference = D5D01FA82B5D02A000376B84 /* TestsFail.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand Down Expand Up @@ -313,6 +356,7 @@
11930B952B5A54EB001A4419 /* NoWarning */,
D5D01F8E2B5CB90100376B84 /* ClangAnalyz */,
D5D01F832B5CAC7500376B84 /* TestsOK */,
D5D01F9F2B5D02A000376B84 /* TestsFail */,
);
};
/* End PBXProject section */
Expand All @@ -325,6 +369,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D5D01FA42B5D02A000376B84 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -376,7 +427,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D5D01F872B5CAC7500376B84 /* UnitTests.swift in Sources */,
D5D01F872B5CAC7500376B84 /* File1.swift in Sources */,
D5D01F9B2B5D01F600376B84 /* File2.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -388,6 +440,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D5D01FA02B5D02A000376B84 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D5D01FAA2B5D02B600376B84 /* File1.swift in Sources */,
D5D01FA92B5D02B300376B84 /* File2.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -424,6 +485,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -441,14 +503,19 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "test.$(TARGET_NAME)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -485,6 +552,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -497,119 +565,89 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "test.$(TARGET_NAME)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_VERSION = 5.0;
};
name = Release;
};
11930B9E2B5A54EB001A4419 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
11930B9F2B5A54EB001A4419 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
11930BA82B5A55C9001A4419 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
11930BA92B5A55C9001A4419 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
D58D563A2B5BED84009CE60D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
D58D563B2B5BED84009CE60D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
D5D01F882B5CAC7500376B84 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = Y85RFN6NXZ;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = b9.UnitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
D5D01F892B5CAC7500376B84 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = Y85RFN6NXZ;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = b9.UnitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
};
name = Release;
};
D5D01F952B5CB90100376B84 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
D5D01F962B5CB90100376B84 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
D5D01FA62B5D02A000376B84 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Debug;
};
D5D01FA72B5D02A000376B84 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Release;
};
Expand Down Expand Up @@ -670,6 +708,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D5D01FA52B5D02A000376B84 /* Build configuration list for PBXNativeTarget "TestsFail" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D5D01FA62B5D02A000376B84 /* Debug */,
D5D01FA72B5D02A000376B84 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 11930B8E2B5A54EB001A4419 /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5D01F9F2B5D02A000376B84"
BuildableName = "TestsFail.xctest"
BlueprintName = "TestsFail"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit 68b4f23

Please sign in to comment.