⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285913 in webkit


Ignore:
Timestamp:
Nov 16, 2021, 7:14:06 PM (5 years ago)
Author:
mmaxfield@apple.com
Message:

[WebGPU] Add WGSLUnitTests XCTest target for WebGPU
https://bugs.webkit.org/show_bug.cgi?id=233227

Reviewed by Robin Morisset.

For now, this new target isn't hooked up to any automated testing - it's just a local target which developers can run.

  • Configurations/WGSLUnitTests.xcconfig: Added.
  • WGSLUnitTests/WGSLUnitTests.mm: Added.

(-[WGSLUnitTests testExample]):

  • WebGPU.xcodeproj/project.pbxproj:
  • WebGPU.xcodeproj/xcshareddata/xcschemes/WGSL.xcscheme:
  • WebGPU.xcodeproj/xcshareddata/xcschemes/WGSLUnitTests.xcscheme: Copied from Source/WebGPU/WebGPU.xcodeproj/xcshareddata/xcschemes/WGSL.xcscheme.
Location:
trunk/Source/WebGPU
Files:
3 added
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebGPU/ChangeLog

    r285792 r285913  
     12021-11-16  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [WebGPU] Add WGSLUnitTests XCTest target for WebGPU
     4        https://bugs.webkit.org/show_bug.cgi?id=233227
     5
     6        Reviewed by Robin Morisset.
     7
     8        For now, this new target isn't hooked up to any automated testing - it's just a local target which developers can run.
     9
     10        * Configurations/WGSLUnitTests.xcconfig: Added.
     11        * WGSLUnitTests/WGSLUnitTests.mm: Added.
     12        (-[WGSLUnitTests testExample]):
     13        * WebGPU.xcodeproj/project.pbxproj:
     14        * WebGPU.xcodeproj/xcshareddata/xcschemes/WGSL.xcscheme:
     15        * WebGPU.xcodeproj/xcshareddata/xcschemes/WGSLUnitTests.xcscheme: Copied from Source/WebGPU/WebGPU.xcodeproj/xcshareddata/xcschemes/WGSL.xcscheme.
     16
    1172021-11-14  Myles C. Maxfield  <mmaxfield@apple.com>
    218
  • trunk/Source/WebGPU/WebGPU.xcodeproj/project.pbxproj

    r285527 r285913  
    88
    99/* Begin PBXBuildFile section */
     10                1C023D3F27449070001DB734 /* WGSLUnitTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C023D3E27449070001DB734 /* WGSLUnitTests.mm */; };
     11                1C023D4027449070001DB734 /* libwgsl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CEBD7F22716B2CC00A5254D /* libwgsl.a */; };
     12                1C023D4B274495B9001DB734 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C023D4A274495B9001DB734 /* JavaScriptCore.framework */; };
    1013                1C2CEDEE271E8A7300EDC16F /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C2CEDED271E8A7300EDC16F /* Metal.framework */; };
    1114                1C5ACA94273A41C20095F8D5 /* Instance.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C5ACA92273A41C20095F8D5 /* Instance.mm */; };
     
    4245
    4346/* Begin PBXContainerItemProxy section */
     47                1C023D4127449070001DB734 /* PBXContainerItemProxy */ = {
     48                        isa = PBXContainerItemProxy;
     49                        containerPortal = 1CEBD7DA2716AFBA00A5254D /* Project object */;
     50                        proxyType = 1;
     51                        remoteGlobalIDString = 1CEBD7F12716B2CC00A5254D;
     52                        remoteInfo = WGSL;
     53                };
    4454                1CEBD8272716CACC00A5254D /* PBXContainerItemProxy */ = {
    4555                        isa = PBXContainerItemProxy;
     
    5262
    5363/* Begin PBXFileReference section */
     64                1C023D3C27449070001DB734 /* WGSLUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WGSLUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
     65                1C023D3E27449070001DB734 /* WGSLUnitTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WGSLUnitTests.mm; sourceTree = "<group>"; };
     66                1C023D472744916D001DB734 /* WGSLUnitTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WGSLUnitTests.xcconfig; sourceTree = "<group>"; };
     67                1C023D4A274495B9001DB734 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
    5468                1C2CEDED271E8A7300EDC16F /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
    5569                1C5ACA92273A41C20095F8D5 /* Instance.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Instance.mm; sourceTree = "<group>"; };
     
    125139
    126140/* Begin PBXFrameworksBuildPhase section */
     141                1C023D3927449070001DB734 /* Frameworks */ = {
     142                        isa = PBXFrameworksBuildPhase;
     143                        buildActionMask = 2147483647;
     144                        files = (
     145                                1C023D4B274495B9001DB734 /* JavaScriptCore.framework in Frameworks */,
     146                                1C023D4027449070001DB734 /* libwgsl.a in Frameworks */,
     147                        );
     148                        runOnlyForDeploymentPostprocessing = 0;
     149                };
    127150                1CEBD7E02716AFBA00A5254D /* Frameworks */ = {
    128151                        isa = PBXFrameworksBuildPhase;
     
    145168
    146169/* Begin PBXGroup section */
     170                1C023D3D27449070001DB734 /* WGSLUnitTests */ = {
     171                        isa = PBXGroup;
     172                        children = (
     173                                1C023D3E27449070001DB734 /* WGSLUnitTests.mm */,
     174                        );
     175                        path = WGSLUnitTests;
     176                        sourceTree = "<group>";
     177                };
    147178                1CEBD7D92716AFBA00A5254D = {
    148179                        isa = PBXGroup;
     
    152183                                1CEBD7F62716B33100A5254D /* WGSL */,
    153184                                1CEBD7E52716AFBA00A5254D /* WebGPU */,
     185                                1C023D3D27449070001DB734 /* WGSLUnitTests */,
    154186                                1CEBD7E42716AFBA00A5254D /* Products */,
    155187                                1CEBD8252716CACC00A5254D /* Frameworks */,
     
    162194                                1CEBD7F22716B2CC00A5254D /* libwgsl.a */,
    163195                                1CEBD7E32716AFBA00A5254D /* WebGPU.framework */,
     196                                1C023D3C27449070001DB734 /* WGSLUnitTests.xctest */,
    164197                        );
    165198                        name = Products;
     
    244277                                1CEBD7FC2716B64400A5254D /* WebGPU.xcconfig */,
    245278                                1CEBD7FD2716B64F00A5254D /* WGSL.xcconfig */,
     279                                1C023D472744916D001DB734 /* WGSLUnitTests.xcconfig */,
    246280                        );
    247281                        path = Configurations;
     
    253287                                1CEBD82B2716CAFB00A5254D /* CoreFoundation.framework */,
    254288                                1CEBD82D2716CB1600A5254D /* Foundation.framework */,
     289                                1C023D4A274495B9001DB734 /* JavaScriptCore.framework */,
    255290                                1CBAB0912718CCA0006080BB /* JavaScriptCore.framework */,
    256291                                1CEBD8302716CB3800A5254D /* libicucore.tbd */,
     
    285320
    286321/* Begin PBXNativeTarget section */
     322                1C023D3B27449070001DB734 /* WGSLUnitTests */ = {
     323                        isa = PBXNativeTarget;
     324                        buildConfigurationList = 1C023D4627449070001DB734 /* Build configuration list for PBXNativeTarget "WGSLUnitTests" */;
     325                        buildPhases = (
     326                                1C023D3827449070001DB734 /* Sources */,
     327                                1C023D3927449070001DB734 /* Frameworks */,
     328                                1C023D3A27449070001DB734 /* Resources */,
     329                        );
     330                        buildRules = (
     331                        );
     332                        dependencies = (
     333                                1C023D4227449070001DB734 /* PBXTargetDependency */,
     334                        );
     335                        name = WGSLUnitTests;
     336                        productName = WGSLUnitTests;
     337                        productReference = 1C023D3C27449070001DB734 /* WGSLUnitTests.xctest */;
     338                        productType = "com.apple.product-type.bundle.unit-test";
     339                };
    287340                1CEBD7E22716AFBA00A5254D /* WebGPU */ = {
    288341                        isa = PBXNativeTarget;
     
    330383                                LastUpgradeCheck = 1330;
    331384                                TargetAttributes = {
     385                                        1C023D3B27449070001DB734 = {
     386                                                CreatedOnToolsVersion = 13.3;
     387                                        };
    332388                                        1CEBD7E22716AFBA00A5254D = {
    333389                                                CreatedOnToolsVersion = 13.3;
     
    353409                                1CEBD7E22716AFBA00A5254D /* WebGPU */,
    354410                                1CEBD7F12716B2CC00A5254D /* WGSL */,
     411                                1C023D3B27449070001DB734 /* WGSLUnitTests */,
    355412                        );
    356413                };
     
    358415
    359416/* Begin PBXResourcesBuildPhase section */
     417                1C023D3A27449070001DB734 /* Resources */ = {
     418                        isa = PBXResourcesBuildPhase;
     419                        buildActionMask = 2147483647;
     420                        files = (
     421                        );
     422                        runOnlyForDeploymentPostprocessing = 0;
     423                };
    360424                1CEBD7E12716AFBA00A5254D /* Resources */ = {
    361425                        isa = PBXResourcesBuildPhase;
     
    368432
    369433/* Begin PBXSourcesBuildPhase section */
     434                1C023D3827449070001DB734 /* Sources */ = {
     435                        isa = PBXSourcesBuildPhase;
     436                        buildActionMask = 2147483647;
     437                        files = (
     438                                1C023D3F27449070001DB734 /* WGSLUnitTests.mm in Sources */,
     439                        );
     440                        runOnlyForDeploymentPostprocessing = 0;
     441                };
    370442                1CEBD7DF2716AFBA00A5254D /* Sources */ = {
    371443                        isa = PBXSourcesBuildPhase;
     
    409481
    410482/* Begin PBXTargetDependency section */
     483                1C023D4227449070001DB734 /* PBXTargetDependency */ = {
     484                        isa = PBXTargetDependency;
     485                        target = 1CEBD7F12716B2CC00A5254D /* WGSL */;
     486                        targetProxy = 1C023D4127449070001DB734 /* PBXContainerItemProxy */;
     487                };
    411488                1CEBD8282716CACC00A5254D /* PBXTargetDependency */ = {
    412489                        isa = PBXTargetDependency;
     
    417494
    418495/* Begin XCBuildConfiguration section */
     496                1C023D4327449070001DB734 /* Debug */ = {
     497                        isa = XCBuildConfiguration;
     498                        baseConfigurationReference = 1C023D472744916D001DB734 /* WGSLUnitTests.xcconfig */;
     499                        buildSettings = {
     500                        };
     501                        name = Debug;
     502                };
     503                1C023D4427449070001DB734 /* Release */ = {
     504                        isa = XCBuildConfiguration;
     505                        baseConfigurationReference = 1C023D472744916D001DB734 /* WGSLUnitTests.xcconfig */;
     506                        buildSettings = {
     507                        };
     508                        name = Release;
     509                };
     510                1C023D4527449070001DB734 /* Production */ = {
     511                        isa = XCBuildConfiguration;
     512                        baseConfigurationReference = 1C023D472744916D001DB734 /* WGSLUnitTests.xcconfig */;
     513                        buildSettings = {
     514                        };
     515                        name = Production;
     516                };
    419517                1CEBD7E82716AFBA00A5254D /* Debug */ = {
    420518                        isa = XCBuildConfiguration;
     
    483581
    484582/* Begin XCConfigurationList section */
     583                1C023D4627449070001DB734 /* Build configuration list for PBXNativeTarget "WGSLUnitTests" */ = {
     584                        isa = XCConfigurationList;
     585                        buildConfigurations = (
     586                                1C023D4327449070001DB734 /* Debug */,
     587                                1C023D4427449070001DB734 /* Release */,
     588                                1C023D4527449070001DB734 /* Production */,
     589                        );
     590                        defaultConfigurationIsVisible = 0;
     591                        defaultConfigurationName = Production;
     592                };
    485593                1CEBD7DD2716AFBA00A5254D /* Build configuration list for PBXProject "WebGPU" */ = {
    486594                        isa = XCConfigurationList;
  • trunk/Source/WebGPU/WebGPU.xcodeproj/xcshareddata/xcschemes/WGSL.xcscheme

    r285480 r285913  
    2929      shouldUseLaunchSchemeArgsEnv = "YES">
    3030      <Testables>
     31         <TestableReference
     32            skipped = "NO">
     33            <BuildableReference
     34               BuildableIdentifier = "primary"
     35               BlueprintIdentifier = "1C023D3B27449070001DB734"
     36               BuildableName = "WGSLUnitTests.xctest"
     37               BlueprintName = "WGSLUnitTests"
     38               ReferencedContainer = "container:WebGPU.xcodeproj">
     39            </BuildableReference>
     40         </TestableReference>
    3141      </Testables>
    3242   </TestAction>
  • trunk/Source/WebGPU/WebGPU.xcodeproj/xcshareddata/xcschemes/WGSLUnitTests.xcscheme

    r285912 r285913  
    66      parallelizeBuildables = "YES"
    77      buildImplicitDependencies = "YES">
    8       <BuildActionEntries>
    9          <BuildActionEntry
    10             buildForTesting = "YES"
    11             buildForRunning = "YES"
    12             buildForProfiling = "YES"
    13             buildForArchiving = "YES"
    14             buildForAnalyzing = "YES">
    15             <BuildableReference
    16                BuildableIdentifier = "primary"
    17                BlueprintIdentifier = "1CEBD7F12716B2CC00A5254D"
    18                BuildableName = "libwgsl.a"
    19                BlueprintName = "WGSL"
    20                ReferencedContainer = "container:WebGPU.xcodeproj">
    21             </BuildableReference>
    22          </BuildActionEntry>
    23       </BuildActionEntries>
    248   </BuildAction>
    259   <TestAction
     
    2913      shouldUseLaunchSchemeArgsEnv = "YES">
    3014      <Testables>
     15         <TestableReference
     16            skipped = "NO">
     17            <BuildableReference
     18               BuildableIdentifier = "primary"
     19               BlueprintIdentifier = "1C023D3B27449070001DB734"
     20               BuildableName = "WGSLUnitTests.xctest"
     21               BlueprintName = "WGSLUnitTests"
     22               ReferencedContainer = "container:WebGPU.xcodeproj">
     23            </BuildableReference>
     24         </TestableReference>
    3125      </Testables>
    3226   </TestAction>
     
    4842      useCustomWorkingDirectory = "NO"
    4943      debugDocumentVersioning = "YES">
    50       <MacroExpansion>
    51          <BuildableReference
    52             BuildableIdentifier = "primary"
    53             BlueprintIdentifier = "1CEBD7F12716B2CC00A5254D"
    54             BuildableName = "libwgsl.a"
    55             BlueprintName = "WGSL"
    56             ReferencedContainer = "container:WebGPU.xcodeproj">
    57          </BuildableReference>
    58       </MacroExpansion>
    5944   </ProfileAction>
    6045   <AnalyzeAction
Note: See TracChangeset for help on using the changeset viewer.