Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WGSL] Port WGSLUnitTests to TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=245061 rdar://problem/99808942 Reviewed by Elliott Williams. So we can run the tests on EWS, port the XCTest-based WGSLUnitTests to gtest-based standalone executable TestWGSL. This was a straight-forward change of ObjC interfaces to C++ classes and renaming of testing macros. * Tools/Scripts/run-api-tests: * Tools/Scripts/webkitpy/port/darwin.py: (DarwinPort): * Tools/TestWebKitAPI/Configurations/TestWGSL.xcconfig: Added. * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWGSL.xcscheme: Added. * Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp: Added. (TestWebKitAPI::checkSingleToken): (TestWebKitAPI::checkSingleLiteral): (TestWebKitAPI::checkNextTokenIs): (TestWebKitAPI::checkNextTokenIsIdentifier): (TestWebKitAPI::checkNextTokenIsLiteral): (TestWebKitAPI::checkNextTokensAreBuiltinAttr): (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp: Added. (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/mac/mainMac.mm: (main): Canonical link: https://commits.webkit.org/254813@main
- Loading branch information
Showing
9 changed files
with
1,071 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (C) 2022 Apple Inc. All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions | ||
// are met: | ||
// 1. Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// 2. Redistributions in binary form must reproduce the above copyright | ||
// notice, this list of conditions and the following disclaimer in the | ||
// documentation and/or other materials provided with the distribution. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY | ||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR | ||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
PRODUCT_NAME = TestWGSL; | ||
|
||
PROJECT_HEADER_SEARCH_PATHS = $(SRCROOT)/../../Source/WebGPU/WGSL $(SRCROOT)/../../Source/WebGPU/WGSL/AST $(SRCROOT)/../../Source/WebGPU/WGSL/AST/Expressions $(SRCROOT)/../../Source/WebGPU/WGSL/AST/Statements $(inherited); | ||
|
||
GCC_ENABLE_OBJC_EXCEPTIONS = YES; | ||
|
||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BUILDING_TEST_WGSL GTEST_API_= | ||
|
||
// Workaround for "WebKit is not available..." error (rdar://91668054) | ||
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES; | ||
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES; | ||
|
||
WK_UIKITMACHELPER_LDFLAGS = $(WK_UIKITMACHELPER_LDFLAGS_$(WK_PLATFORM_NAME)); | ||
WK_UIKITMACHELPER_LDFLAGS_maccatalyst = -framework UIKitMacHelper; | ||
|
||
OTHER_LDFLAGS = $(inherited) $(WK_UIKITMACHELPER_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)); | ||
OTHER_LDFLAGS_PLATFORM_ = -framework Cocoa -framework Carbon; | ||
OTHER_LDFLAGS_PLATFORM_cocoatouch = -framework CoreGraphics; | ||
|
||
STRIP_STYLE = debugging; | ||
|
||
ENTITLEMENTS_REQUIRED = $(ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_$(USE_INTERNAL_SDK)) | ||
ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_ = NO; | ||
ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_NO = NO; | ||
ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_YES = $(ENTITLEMENTS_REQUIRED); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.