mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
Revert "Create new src/tests BUILD.gn file."
This reverts commit 0a7ddd43d7.
Reason for revert: Broke compile in https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/linux-rel/12314
See also: https://chromium-review.googlesource.com/c/chromium/src/+/1364694
Original change's description:
> Create new src/tests BUILD.gn file.
>
> Move all test-related build stuff into its own BUILD.gn file. This
> required moving the dawn_generator template into a common file, so it
> can be called by both BUILD.gn and src/tests/BUILD.gn.
>
> Bug: dawn:61
>
> Change-Id: Icaa459270bdaa60306e053b93835812e70dba6f5
> Reviewed-on: https://dawn-review.googlesource.com/c/2940
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,senorblanco@chromium.org
Change-Id: If6d8c759f63c12b244471016f10e92c07299303f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:61
Reviewed-on: https://dawn-review.googlesource.com/c/3000
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
0a7ddd43d7
commit
bdd887fce7
@@ -1,140 +0,0 @@
|
||||
# Copyright 2018 The Dawn Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build_overrides/build.gni")
|
||||
import("../../scripts/dawn_overrides_with_defaults.gni")
|
||||
import("${dawn_root}/scripts/dawn_features.gni")
|
||||
import("${dawn_root}/generator/dawn_generator.gni")
|
||||
|
||||
import("//testing/test.gni")
|
||||
|
||||
dawn_generator("mock_dawn_gen") {
|
||||
target = "mock_dawn"
|
||||
outputs = [
|
||||
"mock/mock_dawn.h",
|
||||
"mock/mock_dawn.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
test("dawn_unittests") {
|
||||
configs += [ "${dawn_root}:dawn_internal" ]
|
||||
|
||||
deps = [
|
||||
":mock_dawn_gen",
|
||||
"${dawn_root}:dawn_common",
|
||||
"${dawn_root}:dawn_headers",
|
||||
"${dawn_root}:dawn_utils",
|
||||
"${dawn_root}:libdawn",
|
||||
"${dawn_root}:libdawn_native_sources",
|
||||
"${dawn_root}:libdawn_wire",
|
||||
"${dawn_root}/third_party:gmock_and_gtest",
|
||||
]
|
||||
|
||||
# Add internal Dawn Native headers and config for internal unittests.
|
||||
deps += [ "${dawn_root}:libdawn_native_headers" ]
|
||||
configs += [ "${dawn_root}:libdawn_native_internal" ]
|
||||
|
||||
sources = get_target_outputs(":mock_dawn_gen")
|
||||
sources += [
|
||||
"unittests/BitSetIteratorTests.cpp",
|
||||
"unittests/CommandAllocatorTests.cpp",
|
||||
"unittests/EnumClassBitmasksTests.cpp",
|
||||
"unittests/ErrorTests.cpp",
|
||||
"unittests/MathTests.cpp",
|
||||
"unittests/ObjectBaseTests.cpp",
|
||||
"unittests/PerStageTests.cpp",
|
||||
"unittests/RefCountedTests.cpp",
|
||||
"unittests/ResultTests.cpp",
|
||||
"unittests/SerialMapTests.cpp",
|
||||
"unittests/SerialQueueTests.cpp",
|
||||
"unittests/ToBackendTests.cpp",
|
||||
"unittests/WireTests.cpp",
|
||||
"unittests/validation/BindGroupValidationTests.cpp",
|
||||
"unittests/validation/BlendStateValidationTests.cpp",
|
||||
"unittests/validation/BufferValidationTests.cpp",
|
||||
"unittests/validation/CommandBufferValidationTests.cpp",
|
||||
"unittests/validation/ComputeValidationTests.cpp",
|
||||
"unittests/validation/CopyCommandsValidationTests.cpp",
|
||||
"unittests/validation/DepthStencilStateValidationTests.cpp",
|
||||
"unittests/validation/DynamicStateCommandValidationTests.cpp",
|
||||
"unittests/validation/FenceValidationTests.cpp",
|
||||
"unittests/validation/InputStateValidationTests.cpp",
|
||||
"unittests/validation/PushConstantsValidationTests.cpp",
|
||||
"unittests/validation/QueueSubmitValidationTests.cpp",
|
||||
"unittests/validation/RenderPassDescriptorValidationTests.cpp",
|
||||
"unittests/validation/RenderPipelineValidationTests.cpp",
|
||||
"unittests/validation/ShaderModuleValidationTests.cpp",
|
||||
"unittests/validation/TextureViewValidationTests.cpp",
|
||||
"unittests/validation/ValidationTest.cpp",
|
||||
"unittests/validation/ValidationTest.h",
|
||||
"unittests/validation/VertexBufferValidationTests.cpp",
|
||||
]
|
||||
|
||||
if (dawn_enable_d3d12) {
|
||||
sources += [ "unittests/d3d12/CopySplitTests.cpp" ]
|
||||
}
|
||||
|
||||
# When building inside Chromium, use their gtest main function because it is
|
||||
# needed to run in swarming correctly.
|
||||
if (build_with_chromium) {
|
||||
sources += [ "//gpu/dawn_unittests_main.cc" ]
|
||||
} else {
|
||||
sources += [ "UnittestsMain.cpp" ]
|
||||
}
|
||||
}
|
||||
|
||||
test("dawn_end2end_tests") {
|
||||
configs += [ "${dawn_root}:dawn_internal" ]
|
||||
|
||||
deps = [
|
||||
"${dawn_root}:dawn_common",
|
||||
"${dawn_root}:dawn_utils",
|
||||
"${dawn_root}:libdawn",
|
||||
"${dawn_root}:libdawn_native",
|
||||
"${dawn_root}:libdawn_wire",
|
||||
"${dawn_root}/third_party:glfw",
|
||||
"${dawn_root}/third_party:gmock_and_gtest",
|
||||
]
|
||||
|
||||
sources = [
|
||||
"DawnTest.cpp",
|
||||
"DawnTest.h",
|
||||
"end2end/BasicTests.cpp",
|
||||
"end2end/BindGroupTests.cpp",
|
||||
"end2end/BlendStateTests.cpp",
|
||||
"end2end/BufferTests.cpp",
|
||||
"end2end/ComputeCopyStorageBufferTests.cpp",
|
||||
"end2end/CopyTests.cpp",
|
||||
"end2end/DepthStencilStateTests.cpp",
|
||||
"end2end/DrawElementsTests.cpp",
|
||||
"end2end/FenceTests.cpp",
|
||||
"end2end/IndexFormatTests.cpp",
|
||||
"end2end/InputStateTests.cpp",
|
||||
"end2end/PrimitiveTopologyTests.cpp",
|
||||
"end2end/PushConstantTests.cpp",
|
||||
"end2end/RenderPassLoadOpTests.cpp",
|
||||
"end2end/SamplerTests.cpp",
|
||||
"end2end/ScissorTests.cpp",
|
||||
"end2end/TextureViewTests.cpp",
|
||||
"end2end/ViewportOrientationTests.cpp",
|
||||
]
|
||||
|
||||
# When building inside Chromium, use their gtest main function because it is
|
||||
# needed to run in swarming correctly.
|
||||
if (build_with_chromium) {
|
||||
sources += [ "//gpu/dawn_end2end_tests_main.cc" ]
|
||||
} else {
|
||||
sources += [ "End2EndTestsMain.cpp" ]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user