diff --git a/BUILD.gn b/BUILD.gn index 7f9a6a9b53d..4862c88c34b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -19,8 +19,9 @@ group("all") { deps = [ "src/dawn/fuzzers", "src/dawn/native:webgpu_dawn", + "src/dawn/tests", "src/fuzzers/dawn:dawn_fuzzers", - "src/tests:dawn_tests", + "src/tests", # TODO(crbug.com/dawn/1275) - remove ] if (dawn_standalone) { deps += [ "samples/dawn:samples" ] diff --git a/docs/dawn/overview.md b/docs/dawn/overview.md index c15ef1c6192..50907b84769 100644 --- a/docs/dawn/overview.md +++ b/docs/dawn/overview.md @@ -18,16 +18,16 @@ This repository contains the implementation of Dawn, which is itself composed of - [`fuzzers`](../src/dawn/fuzzers): various fuzzers for Dawn that are running in [Clusterfuzz](https://google.github.io/clusterfuzz/). - [`native`](../src/dawn/native): code for the implementation of WebGPU on top of graphics APIs. Files in this folder are the "frontend" while subdirectories are "backends". - ``: code for the implementation of the backend on a specific graphics API, for example `d3d12`, `metal` or `vulkan`. + - [`tests`](../src/dawn/tests): + - [`end2end`](../src/dawn/tests/end2end): tests for the execution of the WebGPU API and require a GPU to run. + - [`perf_tests`](../src/dawn/tests/perf_tests): benchmarks for various aspects of Dawn. + - [`unittests`](../src/dawn/tests/unittests): code unittests of internal classes, but also by extension WebGPU API tests that don't require a GPU to run. + - [`validation`](../src/dawn/tests/unittests/validation): WebGPU validation tests not using the GPU (frontend tests) + - [`white_box`](../src/dawn/tests/white_box): tests using the GPU that need to access the internals of `dawn_native` or `dawn_wire`. - [`wire`](../src/dawn/wire): code for an implementation of WebGPU as a client-server architecture. - [`utils`](../src/dawn/utils): helper code to use Dawn used by tests and samples but disallowed for `dawn_native` and `dawn_wire`. - [`platform`](../src/dawn/platform): definition of interfaces for dependency injection in `dawn_native` or `dawn_wire`. - [`include`](../src/include): public headers with subdirectories for each library. Note that some headers are auto-generated and not present directly in the directory. - - [`tests`](../src/tests): - - [`end2end`](../src/tests/end2end): tests for the execution of the WebGPU API and require a GPU to run. - - [`perf_tests`](../src/tests/perf_tests): benchmarks for various aspects of Dawn. - - [`unittests`](../src/tests/unittests): code unittests of internal classes, but also by extension WebGPU API tests that don't require a GPU to run. - - [`validation`](../src/tests/unittests/validation): WebGPU validation tests not using the GPU (frontend tests) - - [`white_box`](../src/tests/white_box): tests using the GPU that need to access the internals of `dawn_native` or `dawn_wire`. - [`third_party`](../third_party): directory where dependencies live as well as their buildfiles. ## Dawn Native (`dawn_native`) diff --git a/docs/dawn/testing.md b/docs/dawn/testing.md index a37d0b5ad16..749736ba261 100644 --- a/docs/dawn/testing.md +++ b/docs/dawn/testing.md @@ -19,7 +19,7 @@ A Chromium checkout is required for the highest optimization flags. It is possib - Step: A group of Iterations run together. The number of `iterationsPerStep` is provided to the constructor of `DawnPerfTestBase`. - Trial: A group of Steps run consecutively. `kNumTrials` are run for each test. A Step in a Trial is run repetitively for approximately `kCalibrationRunTimeSeconds`. Metrics are accumlated per-trial and reported as the total time divided by `numSteps * iterationsPerStep`. `maxStepsInFlight` is passed to the `DawnPerfTestsBase` constructor to limit the number of Steps pipelined. -(See [`//src/tests/perf_tests/DawnPerfTest.h`](https://cs.chromium.org/chromium/src/third_party/dawn/src/tests/perf_tests/DawnPerfTest.h) for the values of the constants). +(See [`//src/dawn/tests/perf_tests/DawnPerfTest.h`](https://cs.chromium.org/chromium/src/third_party/dawn/src/dawn/tests/perf_tests/DawnPerfTest.h) for the values of the constants). ### Metrics diff --git a/src/dawn/common/BUILD.gn b/src/dawn/common/BUILD.gn index 0ef484b804c..e47e9f0d3d8 100644 --- a/src/dawn/common/BUILD.gn +++ b/src/dawn/common/BUILD.gn @@ -86,8 +86,8 @@ config("internal_config") { # this BUILD.gn file and related subdirs. visibility = [ "${dawn_root}/samples/dawn/*", - "${dawn_root}/src/*", "${dawn_root}/src/dawn/*", + "${dawn_root}/src/tests/*", # TODO(crbug.com/dawn/1275) - remove this ] cflags = [] diff --git a/src/dawn/native/d3d12/TextureCopySplitter.h b/src/dawn/native/d3d12/TextureCopySplitter.h index 9073df1e474..d549b906dad 100644 --- a/src/dawn/native/d3d12/TextureCopySplitter.h +++ b/src/dawn/native/d3d12/TextureCopySplitter.h @@ -60,7 +60,7 @@ namespace dawn::native::d3d12 { // counterparts. These arguments should strictly conform to particular invariants. Otherwise, // D3D12 driver may report validation errors when we call CopyTextureRegion. Some important // invariants are listed below. For more details - // of these invariants, see src/tests/unittests/d3d12/CopySplitTests.cpp. + // of these invariants, see src/dawn/tests/unittests/d3d12/CopySplitTests.cpp. // - Inside each copy region: 1) its buffer offset plus copy size should be less than its // buffer size, 2) its buffer offset on y-axis should be less than copy format's // blockInfo.height, 3) its buffer offset on z-axis should be 0. diff --git a/src/dawn/tests/BUILD.gn b/src/dawn/tests/BUILD.gn new file mode 100644 index 00000000000..4f7a559b16f --- /dev/null +++ b/src/dawn/tests/BUILD.gn @@ -0,0 +1,644 @@ +# Copyright 2012 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("../../../scripts/dawn_overrides_with_defaults.gni") + +import("//testing/test.gni") +import("${dawn_root}/generator/dawn_generator.gni") +import("${dawn_root}/scripts/dawn_features.gni") + +group("tests") { + testonly = true + deps = [ + ":dawn_end2end_tests", + ":dawn_perf_tests", + ":dawn_unittests", + ] +} + +############################################################################### +# Gtest Gmock - Handle building inside and outside of Chromium. +############################################################################### + +# When building outside of Chromium we need to define our own targets for GTest +# and GMock. However when compiling inside of Chromium we need to reuse the +# existing targets, both because Chromium has a special harness for swarming +# and because otherwise the "gn check" fails. + +if (!build_with_chromium) { + # When we aren't in Chromium we define out own targets based on the location + # of the googletest repo. + googletest_dir = dawn_googletest_dir + + config("gtest_config") { + include_dirs = [ + "${googletest_dir}/googletest", + "${googletest_dir}/googletest/include", + ] + } + + static_library("gtest") { + testonly = true + sources = [ "${googletest_dir}/googletest/src/gtest-all.cc" ] + public_configs = [ ":gtest_config" ] + } + + config("gmock_config") { + include_dirs = [ + "${googletest_dir}/googlemock", + "${googletest_dir}/googlemock/include", + "${googletest_dir}/googletest/include", + ] + } + + static_library("gmock") { + testonly = true + sources = [ "${googletest_dir}/googlemock/src/gmock-all.cc" ] + public_configs = [ ":gmock_config" ] + } + + group("gmock_and_gtest") { + testonly = true + public_deps = [ + ":gmock", + ":gtest", + ] + } +} else { + # When we are in Chromium we reuse its targets, and also add some deps that + # are needed to launch the test in swarming mode. + group("gmock_and_gtest") { + testonly = true + public_deps = [ + "//base", + "//base/test:test_support", + "//testing/gmock", + "//testing/gtest", + ] + } +} + +############################################################################### +# Wrapping of Chromium targets +############################################################################### + +# These targets are separated because they are Chromium sources files that +# can't use the dawn_internal config, otherwise Dawn's warning flags get +# applied while compiling a bunch of Chromium's //base (via header inclusion) +if (build_with_chromium) { + source_set("unittests_main") { + testonly = true + deps = [ ":gmock_and_gtest" ] + sources = [ "//gpu/dawn_unittests_main.cc" ] + } + source_set("end2end_tests_main") { + testonly = true + deps = [ ":gmock_and_gtest" ] + sources = [ "//gpu/dawn_end2end_tests_main.cc" ] + } + source_set("perf_tests_main") { + testonly = true + deps = [ ":gmock_and_gtest" ] + sources = [ "//gpu/dawn_perf_tests_main.cc" ] + } +} + +############################################################################### +# Dawn test template +############################################################################### +template("dawn_test") { + test(target_name) { + # Copy all variables except "configs", which has a default value + forward_variables_from(invoker, "*", [ "configs" ]) + if (defined(invoker.configs)) { + configs += invoker.configs + } + + configs += [ "${dawn_root}/src/dawn/common:internal_config" ] + } +} + +############################################################################### +# Dawn unittests +############################################################################### + +dawn_json_generator("mock_webgpu_gen") { + target = "mock_api" + outputs = [ + "src/dawn/mock_webgpu.h", + "src/dawn/mock_webgpu.cpp", + ] +} + +# Source code for mocks used for unit testing are separated from the rest of +# sources so that they aren't included in non-test builds. +source_set("native_mocks_sources") { + testonly = true + + deps = [ + ":gmock_and_gtest", + "${dawn_root}/src/dawn/native:sources", + "${dawn_root}/src/dawn/native:static", + "${dawn_root}/src/dawn/utils", + ] + + # Add internal dawn native config for internal unittests. + configs += [ "${dawn_root}/src/dawn/native:internal" ] + + sources = [ + "unittests/native/mocks/BindGroupLayoutMock.h", + "unittests/native/mocks/BindGroupMock.h", + "unittests/native/mocks/CommandBufferMock.h", + "unittests/native/mocks/ComputePipelineMock.h", + "unittests/native/mocks/DeviceMock.h", + "unittests/native/mocks/ExternalTextureMock.h", + "unittests/native/mocks/PipelineLayoutMock.h", + "unittests/native/mocks/QuerySetMock.h", + "unittests/native/mocks/RenderPipelineMock.h", + "unittests/native/mocks/SamplerMock.h", + "unittests/native/mocks/ShaderModuleMock.cpp", + "unittests/native/mocks/ShaderModuleMock.h", + "unittests/native/mocks/SwapChainMock.h", + "unittests/native/mocks/TextureMock.h", + ] +} + +dawn_test("dawn_unittests") { + deps = [ + ":gmock_and_gtest", + ":mock_webgpu_gen", + ":native_mocks_sources", + "${dawn_root}/src/dawn:cpp", + "${dawn_root}/src/dawn:proc", + "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:sources", + "${dawn_root}/src/dawn/native:static", + "${dawn_root}/src/dawn/utils", + "${dawn_root}/src/dawn/wire", + ] + + # Add internal dawn native config for internal unittests. + configs = [ "${dawn_root}/src/dawn/native:internal" ] + + sources = get_target_outputs(":mock_webgpu_gen") + sources += [ + "${dawn_root}/src/dawn/wire/client/ClientMemoryTransferService_mock.cpp", + "${dawn_root}/src/dawn/wire/client/ClientMemoryTransferService_mock.h", + "${dawn_root}/src/dawn/wire/server/ServerMemoryTransferService_mock.cpp", + "${dawn_root}/src/dawn/wire/server/ServerMemoryTransferService_mock.h", + "DawnNativeTest.cpp", + "DawnNativeTest.h", + "MockCallback.h", + "ToggleParser.cpp", + "ToggleParser.h", + "unittests/AsyncTaskTests.cpp", + "unittests/BitSetIteratorTests.cpp", + "unittests/BuddyAllocatorTests.cpp", + "unittests/BuddyMemoryAllocatorTests.cpp", + "unittests/ChainUtilsTests.cpp", + "unittests/CommandAllocatorTests.cpp", + "unittests/ConcurrentCacheTests.cpp", + "unittests/EnumClassBitmasksTests.cpp", + "unittests/EnumMaskIteratorTests.cpp", + "unittests/ErrorTests.cpp", + "unittests/FeatureTests.cpp", + "unittests/GPUInfoTests.cpp", + "unittests/GetProcAddressTests.cpp", + "unittests/ITypArrayTests.cpp", + "unittests/ITypBitsetTests.cpp", + "unittests/ITypSpanTests.cpp", + "unittests/ITypVectorTests.cpp", + "unittests/LimitsTests.cpp", + "unittests/LinkedListTests.cpp", + "unittests/MathTests.cpp", + "unittests/ObjectBaseTests.cpp", + "unittests/PerStageTests.cpp", + "unittests/PerThreadProcTests.cpp", + "unittests/PlacementAllocatedTests.cpp", + "unittests/RefBaseTests.cpp", + "unittests/RefCountedTests.cpp", + "unittests/ResultTests.cpp", + "unittests/RingBufferAllocatorTests.cpp", + "unittests/SerialMapTests.cpp", + "unittests/SerialQueueTests.cpp", + "unittests/SlabAllocatorTests.cpp", + "unittests/StackContainerTests.cpp", + "unittests/SubresourceStorageTests.cpp", + "unittests/SystemUtilsTests.cpp", + "unittests/ToBackendTests.cpp", + "unittests/TypedIntegerTests.cpp", + "unittests/native/CommandBufferEncodingTests.cpp", + "unittests/native/DestroyObjectTests.cpp", + "unittests/native/DeviceCreationTests.cpp", + "unittests/validation/BindGroupValidationTests.cpp", + "unittests/validation/BufferValidationTests.cpp", + "unittests/validation/CommandBufferValidationTests.cpp", + "unittests/validation/ComputeIndirectValidationTests.cpp", + "unittests/validation/ComputeValidationTests.cpp", + "unittests/validation/CopyCommandsValidationTests.cpp", + "unittests/validation/CopyTextureForBrowserTests.cpp", + "unittests/validation/DebugMarkerValidationTests.cpp", + "unittests/validation/DeviceValidationTests.cpp", + "unittests/validation/DrawIndirectValidationTests.cpp", + "unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp", + "unittests/validation/DynamicStateCommandValidationTests.cpp", + "unittests/validation/ErrorScopeValidationTests.cpp", + "unittests/validation/ExternalTextureTests.cpp", + "unittests/validation/GetBindGroupLayoutValidationTests.cpp", + "unittests/validation/IndexBufferValidationTests.cpp", + "unittests/validation/InternalUsageValidationTests.cpp", + "unittests/validation/LabelTests.cpp", + "unittests/validation/MinimumBufferSizeValidationTests.cpp", + "unittests/validation/MultipleDeviceTests.cpp", + "unittests/validation/OverridableConstantsValidationTests.cpp", + "unittests/validation/PipelineAndPassCompatibilityTests.cpp", + "unittests/validation/QueryValidationTests.cpp", + "unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp", + "unittests/validation/QueueSubmitValidationTests.cpp", + "unittests/validation/QueueWriteBufferValidationTests.cpp", + "unittests/validation/QueueWriteTextureValidationTests.cpp", + "unittests/validation/RenderBundleValidationTests.cpp", + "unittests/validation/RenderPassDescriptorValidationTests.cpp", + "unittests/validation/RenderPipelineValidationTests.cpp", + "unittests/validation/ResourceUsageTrackingTests.cpp", + "unittests/validation/SamplerValidationTests.cpp", + "unittests/validation/ShaderModuleValidationTests.cpp", + "unittests/validation/StorageTextureValidationTests.cpp", + "unittests/validation/TextureSubresourceTests.cpp", + "unittests/validation/TextureValidationTests.cpp", + "unittests/validation/TextureViewValidationTests.cpp", + "unittests/validation/ToggleValidationTests.cpp", + "unittests/validation/UnsafeAPIValidationTests.cpp", + "unittests/validation/ValidationTest.cpp", + "unittests/validation/ValidationTest.h", + "unittests/validation/VertexBufferValidationTests.cpp", + "unittests/validation/VertexStateValidationTests.cpp", + "unittests/validation/VideoViewsValidationTests.cpp", + "unittests/validation/WriteBufferTests.cpp", + "unittests/wire/WireAdapterTests.cpp", + "unittests/wire/WireArgumentTests.cpp", + "unittests/wire/WireBasicTests.cpp", + "unittests/wire/WireBufferMappingTests.cpp", + "unittests/wire/WireCreatePipelineAsyncTests.cpp", + "unittests/wire/WireDestroyObjectTests.cpp", + "unittests/wire/WireDisconnectTests.cpp", + "unittests/wire/WireErrorCallbackTests.cpp", + "unittests/wire/WireExtensionTests.cpp", + "unittests/wire/WireInjectDeviceTests.cpp", + "unittests/wire/WireInjectInstanceTests.cpp", + "unittests/wire/WireInjectSwapChainTests.cpp", + "unittests/wire/WireInjectTextureTests.cpp", + "unittests/wire/WireInstanceTests.cpp", + "unittests/wire/WireMemoryTransferServiceTests.cpp", + "unittests/wire/WireOptionalTests.cpp", + "unittests/wire/WireQueueTests.cpp", + "unittests/wire/WireShaderModuleTests.cpp", + "unittests/wire/WireTest.cpp", + "unittests/wire/WireTest.h", + "unittests/wire/WireWGPUDevicePropertiesTests.cpp", + ] + + if (is_win) { + sources += [ "unittests/WindowsUtilsTests.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) { + deps += [ ":unittests_main" ] + } else { + sources += [ "UnittestsMain.cpp" ] + } +} + +############################################################################### +# Dawn end2end tests targets +############################################################################### + +source_set("end2end_tests_sources") { + configs += [ "${dawn_root}/src/dawn/common:internal_config" ] + testonly = true + + deps = [ + ":gmock_and_gtest", + "${dawn_root}/src/dawn:cpp", + "${dawn_root}/src/dawn:proc", + "${dawn_root}/src/dawn/common", + + # Statically linked because the end2end white_box tests use Dawn internals. + "${dawn_root}/src/dawn/native:static", + "${dawn_root}/src/dawn/utils", + "${dawn_root}/src/dawn/wire", + ] + + sources = [ + "DawnTest.h", + "MockCallback.h", + "ParamGenerator.h", + "ToggleParser.cpp", + "ToggleParser.h", + "end2end/AdapterDiscoveryTests.cpp", + "end2end/BasicTests.cpp", + "end2end/BindGroupTests.cpp", + "end2end/BufferTests.cpp", + "end2end/BufferZeroInitTests.cpp", + "end2end/ClipSpaceTests.cpp", + "end2end/ColorStateTests.cpp", + "end2end/CommandEncoderTests.cpp", + "end2end/CompressedTextureFormatTests.cpp", + "end2end/ComputeCopyStorageBufferTests.cpp", + "end2end/ComputeDispatchTests.cpp", + "end2end/ComputeLayoutMemoryBufferTests.cpp", + "end2end/ComputeSharedMemoryTests.cpp", + "end2end/ComputeStorageBufferBarrierTests.cpp", + "end2end/CopyTests.cpp", + "end2end/CopyTextureForBrowserTests.cpp", + "end2end/CreatePipelineAsyncTests.cpp", + "end2end/CullingTests.cpp", + "end2end/DebugMarkerTests.cpp", + "end2end/DeprecatedAPITests.cpp", + "end2end/DepthBiasTests.cpp", + "end2end/DepthStencilCopyTests.cpp", + "end2end/DepthStencilLoadOpTests.cpp", + "end2end/DepthStencilSamplingTests.cpp", + "end2end/DepthStencilStateTests.cpp", + "end2end/DestroyTests.cpp", + "end2end/DeviceInitializationTests.cpp", + "end2end/DeviceLostTests.cpp", + "end2end/DrawIndexedIndirectTests.cpp", + "end2end/DrawIndexedTests.cpp", + "end2end/DrawIndirectTests.cpp", + "end2end/DrawTests.cpp", + "end2end/DynamicBufferOffsetTests.cpp", + "end2end/EntryPointTests.cpp", + "end2end/ExternalTextureTests.cpp", + "end2end/FirstIndexOffsetTests.cpp", + "end2end/GpuMemorySynchronizationTests.cpp", + "end2end/IndexFormatTests.cpp", + "end2end/MaxLimitTests.cpp", + "end2end/MemoryAllocationStressTests.cpp", + "end2end/MultisampledRenderingTests.cpp", + "end2end/MultisampledSamplingTests.cpp", + "end2end/NonzeroBufferCreationTests.cpp", + "end2end/NonzeroTextureCreationTests.cpp", + "end2end/ObjectCachingTests.cpp", + "end2end/OpArrayLengthTests.cpp", + "end2end/PipelineLayoutTests.cpp", + "end2end/PrimitiveStateTests.cpp", + "end2end/PrimitiveTopologyTests.cpp", + "end2end/QueryTests.cpp", + "end2end/QueueTests.cpp", + "end2end/QueueTimelineTests.cpp", + "end2end/ReadOnlyDepthStencilAttachmentTests.cpp", + "end2end/RenderAttachmentTests.cpp", + "end2end/RenderBundleTests.cpp", + "end2end/RenderPassLoadOpTests.cpp", + "end2end/RenderPassTests.cpp", + "end2end/SamplerFilterAnisotropicTests.cpp", + "end2end/SamplerTests.cpp", + "end2end/ScissorTests.cpp", + "end2end/ShaderFloat16Tests.cpp", + "end2end/ShaderTests.cpp", + "end2end/StorageTextureTests.cpp", + "end2end/SubresourceRenderAttachmentTests.cpp", + "end2end/Texture3DTests.cpp", + "end2end/TextureFormatTests.cpp", + "end2end/TextureSubresourceTests.cpp", + "end2end/TextureViewTests.cpp", + "end2end/TextureZeroInitTests.cpp", + "end2end/VertexFormatTests.cpp", + "end2end/VertexOnlyRenderPipelineTests.cpp", + "end2end/VertexStateTests.cpp", + "end2end/ViewportOrientationTests.cpp", + "end2end/ViewportTests.cpp", + ] + + # Validation tests that need OS windows live in end2end tests. + sources += [ + "unittests/validation/ValidationTest.cpp", + "unittests/validation/ValidationTest.h", + ] + + libs = [] + + if (dawn_enable_d3d12) { + sources += [ + "end2end/D3D12CachingTests.cpp", + "end2end/D3D12ResourceWrappingTests.cpp", + "end2end/VideoViewsTests_win.cpp", + ] + libs += [ + "d3d11.lib", + "dxgi.lib", + ] + } + + if (dawn_enable_metal) { + sources += [ "end2end/IOSurfaceWrappingTests.cpp" ] + frameworks = [ "IOSurface.framework" ] + } + + if (dawn_enable_opengl) { + assert(dawn_supports_glfw_for_windowing) + } + + if (dawn_supports_glfw_for_windowing) { + sources += [ + "end2end/SwapChainTests.cpp", + "end2end/SwapChainValidationTests.cpp", + "end2end/WindowSurfaceTests.cpp", + ] + deps += [ "${dawn_root}/src/dawn/utils:glfw" ] + } + + if (dawn_enable_d3d12 || (dawn_enable_vulkan && is_chromeos)) { + sources += [ + "end2end/VideoViewsTests.cpp", + "end2end/VideoViewsTests.h", + ] + } + + if (dawn_enable_vulkan && is_chromeos) { + sources += [ "end2end/VideoViewsTests_gbm.cpp" ] + } +} + +source_set("white_box_tests_sources") { + configs += [ "${dawn_root}/src/dawn/native:internal" ] + testonly = true + + deps = [ + ":gmock_and_gtest", + "${dawn_root}/src/dawn:cpp", + "${dawn_root}/src/dawn:proc", + "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:sources", + + # Statically linked because the end2end white_box tests use Dawn internals. + "${dawn_root}/src/dawn/native:static", + "${dawn_root}/src/dawn/utils", + "${dawn_root}/src/dawn/wire", + ] + + sources = [ + "DawnTest.h", + "ParamGenerator.h", + "ToggleParser.h", + ] + + if (dawn_enable_vulkan) { + deps += [ "${dawn_root}/third_party/khronos:vulkan_headers" ] + + if (is_chromeos) { + sources += [ + "white_box/VulkanImageWrappingTests.cpp", + "white_box/VulkanImageWrappingTests.h", + "white_box/VulkanImageWrappingTests_DmaBuf.cpp", + ] + } else if (is_linux) { + sources += [ + "white_box/VulkanImageWrappingTests.cpp", + "white_box/VulkanImageWrappingTests.h", + "white_box/VulkanImageWrappingTests_OpaqueFD.cpp", + ] + } + + if (dawn_enable_error_injection) { + sources += [ "white_box/VulkanErrorInjectorTests.cpp" ] + } + } + + sources += [ + "white_box/BufferAllocatedSizeTests.cpp", + "white_box/InternalResourceUsageTests.cpp", + "white_box/InternalStorageBufferBindingTests.cpp", + "white_box/QueryInternalShaderTests.cpp", + ] + + if (dawn_enable_d3d12) { + sources += [ + "white_box/D3D12DescriptorHeapTests.cpp", + "white_box/D3D12ResidencyTests.cpp", + "white_box/D3D12ResourceHeapTests.cpp", + ] + } + + if (dawn_enable_metal) { + sources += [ "white_box/MetalAutoreleasePoolTests.mm" ] + } + + if (dawn_enable_opengl) { + deps += [ "${dawn_root}/src/dawn/utils:glfw" ] + } + + if (dawn_enable_opengles) { + sources += [ "white_box/EGLImageWrappingTests.cpp" ] + deps += [ "//third_party/angle:libEGL" ] + } + + libs = [] +} + +dawn_test("dawn_end2end_tests") { + deps = [ + ":end2end_tests_sources", + ":gmock_and_gtest", + ":white_box_tests_sources", + "${dawn_root}/src/dawn:cpp", + "${dawn_root}/src/dawn:proc", + "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native:static", + "${dawn_root}/src/dawn/utils", + "${dawn_root}/src/dawn/wire", + ] + + sources = [ + "DawnTest.cpp", + "DawnTest.h", + ] + + libs = [] + + # When building inside Chromium, use their gtest main function because it is + # needed to run in swarming correctly. + if (build_with_chromium) { + deps += [ ":end2end_tests_main" ] + } else { + sources += [ "End2EndTestsMain.cpp" ] + } + + if (dawn_enable_opengl) { + deps += [ "${dawn_root}/src/dawn/utils:glfw" ] + } + + if (is_chromeos) { + libs += [ "gbm" ] + } +} + +############################################################################### +# Dawn perf tests +############################################################################### + +dawn_test("dawn_perf_tests") { + deps = [ + ":gmock_and_gtest", + "${dawn_root}/src/dawn:cpp", + "${dawn_root}/src/dawn:proc", + "${dawn_root}/src/dawn/common", + "${dawn_root}/src/dawn/native", + "${dawn_root}/src/dawn/platform", + "${dawn_root}/src/dawn/utils", + "${dawn_root}/src/dawn/wire", + ] + + sources = [ + "DawnTest.cpp", + "DawnTest.h", + "ParamGenerator.h", + "ToggleParser.cpp", + "ToggleParser.h", + "perf_tests/BufferUploadPerf.cpp", + "perf_tests/DawnPerfTest.cpp", + "perf_tests/DawnPerfTest.h", + "perf_tests/DawnPerfTestPlatform.cpp", + "perf_tests/DawnPerfTestPlatform.h", + "perf_tests/DrawCallPerf.cpp", + "perf_tests/ShaderRobustnessPerf.cpp", + "perf_tests/SubresourceTrackingPerf.cpp", + ] + + libs = [] + + # When building inside Chromium, use their gtest main function and the + # other perf test scaffolding in order to run in swarming correctly. + if (build_with_chromium) { + deps += [ ":perf_tests_main" ] + data_deps = [ "//testing:run_perf_test" ] + } else { + sources += [ "PerfTestsMain.cpp" ] + } + + if (dawn_enable_metal) { + frameworks = [ "IOSurface.framework" ] + } + + if (dawn_enable_opengl) { + deps += [ "${dawn_root}/src/dawn/utils:glfw" ] + } +} diff --git a/src/tests/DawnNativeTest.cpp b/src/dawn/tests/DawnNativeTest.cpp similarity index 98% rename from src/tests/DawnNativeTest.cpp rename to src/dawn/tests/DawnNativeTest.cpp index 937daf00ea5..fcf74f7b43f 100644 --- a/src/tests/DawnNativeTest.cpp +++ b/src/dawn/tests/DawnNativeTest.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnNativeTest.h" +#include "dawn/tests/DawnNativeTest.h" #include "absl/strings/str_cat.h" #include "dawn/common/Assert.h" diff --git a/src/tests/DawnNativeTest.h b/src/dawn/tests/DawnNativeTest.h similarity index 100% rename from src/tests/DawnNativeTest.h rename to src/dawn/tests/DawnNativeTest.h diff --git a/src/tests/DawnTest.cpp b/src/dawn/tests/DawnTest.cpp similarity index 99% rename from src/tests/DawnTest.cpp rename to src/dawn/tests/DawnTest.cpp index 7f80af9472d..0256bb85bfa 100644 --- a/src/tests/DawnTest.cpp +++ b/src/dawn/tests/DawnTest.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/GPUInfo.h" diff --git a/src/tests/DawnTest.h b/src/dawn/tests/DawnTest.h similarity index 99% rename from src/tests/DawnTest.h rename to src/dawn/tests/DawnTest.h index f4ffffa62d6..877b2fccdfb 100644 --- a/src/tests/DawnTest.h +++ b/src/dawn/tests/DawnTest.h @@ -20,14 +20,14 @@ #include "dawn/common/Preprocessor.h" #include "dawn/dawn_proc_table.h" #include "dawn/native/DawnNative.h" +#include "dawn/tests/ParamGenerator.h" +#include "dawn/tests/ToggleParser.h" #include "dawn/utils/ScopedAutoreleasePool.h" #include "dawn/utils/TextureUtils.h" #include "dawn/webgpu_cpp.h" #include "dawn/webgpu_cpp_print.h" -#include "tests/ParamGenerator.h" -#include "tests/ToggleParser.h" -#include +#include #include #include diff --git a/src/tests/End2EndTestsMain.cpp b/src/dawn/tests/End2EndTestsMain.cpp similarity index 95% rename from src/tests/End2EndTestsMain.cpp rename to src/dawn/tests/End2EndTestsMain.cpp index da7bbbe0ecd..1991922c480 100644 --- a/src/tests/End2EndTestsMain.cpp +++ b/src/dawn/tests/End2EndTestsMain.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" int main(int argc, char** argv) { InitDawnEnd2EndTestEnvironment(argc, argv); diff --git a/src/tests/MockCallback.h b/src/dawn/tests/MockCallback.h similarity index 100% rename from src/tests/MockCallback.h rename to src/dawn/tests/MockCallback.h diff --git a/src/tests/OWNERS b/src/dawn/tests/OWNERS similarity index 100% rename from src/tests/OWNERS rename to src/dawn/tests/OWNERS diff --git a/src/tests/ParamGenerator.h b/src/dawn/tests/ParamGenerator.h similarity index 100% rename from src/tests/ParamGenerator.h rename to src/dawn/tests/ParamGenerator.h diff --git a/src/tests/PerfTestsMain.cpp b/src/dawn/tests/PerfTestsMain.cpp similarity index 93% rename from src/tests/PerfTestsMain.cpp rename to src/dawn/tests/PerfTestsMain.cpp index 8852896694a..a927e715bc5 100644 --- a/src/tests/PerfTestsMain.cpp +++ b/src/dawn/tests/PerfTestsMain.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTest.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" int main(int argc, char** argv) { InitDawnPerfTestEnvironment(argc, argv); diff --git a/src/tests/ToggleParser.cpp b/src/dawn/tests/ToggleParser.cpp similarity index 98% rename from src/tests/ToggleParser.cpp rename to src/dawn/tests/ToggleParser.cpp index 3589aeae2e1..997a1d43266 100644 --- a/src/tests/ToggleParser.cpp +++ b/src/dawn/tests/ToggleParser.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/ToggleParser.h" +#include "dawn/tests/ToggleParser.h" #include #include diff --git a/src/tests/ToggleParser.h b/src/dawn/tests/ToggleParser.h similarity index 100% rename from src/tests/ToggleParser.h rename to src/dawn/tests/ToggleParser.h diff --git a/src/tests/UnittestsMain.cpp b/src/dawn/tests/UnittestsMain.cpp similarity index 100% rename from src/tests/UnittestsMain.cpp rename to src/dawn/tests/UnittestsMain.cpp diff --git a/src/tests/end2end/AdapterDiscoveryTests.cpp b/src/dawn/tests/end2end/AdapterDiscoveryTests.cpp similarity index 99% rename from src/tests/end2end/AdapterDiscoveryTests.cpp rename to src/dawn/tests/end2end/AdapterDiscoveryTests.cpp index ef9ec13ed48..62295fc3ea1 100644 --- a/src/tests/end2end/AdapterDiscoveryTests.cpp +++ b/src/dawn/tests/end2end/AdapterDiscoveryTests.cpp @@ -18,8 +18,8 @@ #include "dawn/common/SystemUtils.h" #include "dawn/dawn_proc.h" #include "dawn/native/DawnNative.h" +#include "dawn/tests/MockCallback.h" #include "dawn/webgpu_cpp.h" -#include "tests/MockCallback.h" #if defined(DAWN_ENABLE_BACKEND_VULKAN) # include "dawn/native/VulkanBackend.h" diff --git a/src/tests/end2end/BasicTests.cpp b/src/dawn/tests/end2end/BasicTests.cpp similarity index 98% rename from src/tests/end2end/BasicTests.cpp rename to src/dawn/tests/end2end/BasicTests.cpp index 05d536fca53..4193fc2f25c 100644 --- a/src/tests/end2end/BasicTests.cpp +++ b/src/dawn/tests/end2end/BasicTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/BindGroupTests.cpp b/src/dawn/tests/end2end/BindGroupTests.cpp similarity index 99% rename from src/tests/end2end/BindGroupTests.cpp rename to src/dawn/tests/end2end/BindGroupTests.cpp index 0b156deaa54..828a21b75bd 100644 --- a/src/tests/end2end/BindGroupTests.cpp +++ b/src/dawn/tests/end2end/BindGroupTests.cpp @@ -15,9 +15,9 @@ #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" constexpr static uint32_t kRTSize = 8; diff --git a/src/tests/end2end/BufferTests.cpp b/src/dawn/tests/end2end/BufferTests.cpp similarity index 99% rename from src/tests/end2end/BufferTests.cpp rename to src/dawn/tests/end2end/BufferTests.cpp index b893c029120..9debcc29f1b 100644 --- a/src/tests/end2end/BufferTests.cpp +++ b/src/dawn/tests/end2end/BufferTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include diff --git a/src/tests/end2end/BufferZeroInitTests.cpp b/src/dawn/tests/end2end/BufferZeroInitTests.cpp similarity index 99% rename from src/tests/end2end/BufferZeroInitTests.cpp rename to src/dawn/tests/end2end/BufferZeroInitTests.cpp index 3810a70ac13..44d77cc0fef 100644 --- a/src/tests/end2end/BufferZeroInitTests.cpp +++ b/src/dawn/tests/end2end/BufferZeroInitTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/ClipSpaceTests.cpp b/src/dawn/tests/end2end/ClipSpaceTests.cpp similarity index 99% rename from src/tests/end2end/ClipSpaceTests.cpp rename to src/dawn/tests/end2end/ClipSpaceTests.cpp index 24ec1dc62de..fc6f476100e 100644 --- a/src/tests/end2end/ClipSpaceTests.cpp +++ b/src/dawn/tests/end2end/ClipSpaceTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/dawn/tests/end2end/ColorStateTests.cpp similarity index 99% rename from src/tests/end2end/ColorStateTests.cpp rename to src/dawn/tests/end2end/ColorStateTests.cpp index 6249d01e536..6040d612638 100644 --- a/src/tests/end2end/ColorStateTests.cpp +++ b/src/dawn/tests/end2end/ColorStateTests.cpp @@ -16,7 +16,7 @@ #include #include -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/CommandEncoderTests.cpp b/src/dawn/tests/end2end/CommandEncoderTests.cpp similarity index 98% rename from src/tests/end2end/CommandEncoderTests.cpp rename to src/dawn/tests/end2end/CommandEncoderTests.cpp index 4c156dc2ec0..00d99c56d3d 100644 --- a/src/tests/end2end/CommandEncoderTests.cpp +++ b/src/dawn/tests/end2end/CommandEncoderTests.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" class CommandEncoderTests : public DawnTest {}; diff --git a/src/tests/end2end/CompressedTextureFormatTests.cpp b/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp similarity index 99% rename from src/tests/end2end/CompressedTextureFormatTests.cpp rename to src/dawn/tests/end2end/CompressedTextureFormatTests.cpp index e2387143dc5..6086f2d4624 100644 --- a/src/tests/end2end/CompressedTextureFormatTests.cpp +++ b/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp b/src/dawn/tests/end2end/ComputeCopyStorageBufferTests.cpp similarity index 99% rename from src/tests/end2end/ComputeCopyStorageBufferTests.cpp rename to src/dawn/tests/end2end/ComputeCopyStorageBufferTests.cpp index 69fc8a839d9..f6761eba08b 100644 --- a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp +++ b/src/dawn/tests/end2end/ComputeCopyStorageBufferTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ComputeDispatchTests.cpp b/src/dawn/tests/end2end/ComputeDispatchTests.cpp similarity index 99% rename from src/tests/end2end/ComputeDispatchTests.cpp rename to src/dawn/tests/end2end/ComputeDispatchTests.cpp index 5fb159eedbb..89a76c46561 100644 --- a/src/tests/end2end/ComputeDispatchTests.cpp +++ b/src/dawn/tests/end2end/ComputeDispatchTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp b/src/dawn/tests/end2end/ComputeLayoutMemoryBufferTests.cpp similarity index 99% rename from src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp rename to src/dawn/tests/end2end/ComputeLayoutMemoryBufferTests.cpp index 947b1397519..e7037ea1fcb 100644 --- a/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp +++ b/src/dawn/tests/end2end/ComputeLayoutMemoryBufferTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ComputeSharedMemoryTests.cpp b/src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp similarity index 99% rename from src/tests/end2end/ComputeSharedMemoryTests.cpp rename to src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp index a796274543f..fd85607a00f 100644 --- a/src/tests/end2end/ComputeSharedMemoryTests.cpp +++ b/src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp b/src/dawn/tests/end2end/ComputeStorageBufferBarrierTests.cpp similarity index 99% rename from src/tests/end2end/ComputeStorageBufferBarrierTests.cpp rename to src/dawn/tests/end2end/ComputeStorageBufferBarrierTests.cpp index ba8409abe1f..10f4035a50f 100644 --- a/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp +++ b/src/dawn/tests/end2end/ComputeStorageBufferBarrierTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/CopyTests.cpp b/src/dawn/tests/end2end/CopyTests.cpp similarity index 99% rename from src/tests/end2end/CopyTests.cpp rename to src/dawn/tests/end2end/CopyTests.cpp index a845ca19ccd..f9d5ba7a636 100644 --- a/src/tests/end2end/CopyTests.cpp +++ b/src/dawn/tests/end2end/CopyTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/CopyTextureForBrowserTests.cpp b/src/dawn/tests/end2end/CopyTextureForBrowserTests.cpp similarity index 99% rename from src/tests/end2end/CopyTextureForBrowserTests.cpp rename to src/dawn/tests/end2end/CopyTextureForBrowserTests.cpp index aa83fbbfb25..a1c52361b56 100644 --- a/src/tests/end2end/CopyTextureForBrowserTests.cpp +++ b/src/dawn/tests/end2end/CopyTextureForBrowserTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" diff --git a/src/tests/end2end/CreatePipelineAsyncTests.cpp b/src/dawn/tests/end2end/CreatePipelineAsyncTests.cpp similarity index 99% rename from src/tests/end2end/CreatePipelineAsyncTests.cpp rename to src/dawn/tests/end2end/CreatePipelineAsyncTests.cpp index 476733f71ce..d519b4da64e 100644 --- a/src/tests/end2end/CreatePipelineAsyncTests.cpp +++ b/src/dawn/tests/end2end/CreatePipelineAsyncTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/CullingTests.cpp b/src/dawn/tests/end2end/CullingTests.cpp similarity index 99% rename from src/tests/end2end/CullingTests.cpp rename to src/dawn/tests/end2end/CullingTests.cpp index 27da015db7c..a388ea4dc2c 100644 --- a/src/tests/end2end/CullingTests.cpp +++ b/src/dawn/tests/end2end/CullingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/D3D12CachingTests.cpp b/src/dawn/tests/end2end/D3D12CachingTests.cpp similarity index 99% rename from src/tests/end2end/D3D12CachingTests.cpp rename to src/dawn/tests/end2end/D3D12CachingTests.cpp index 480d3840147..72200b14234 100644 --- a/src/tests/end2end/D3D12CachingTests.cpp +++ b/src/dawn/tests/end2end/D3D12CachingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/D3D12ResourceWrappingTests.cpp b/src/dawn/tests/end2end/D3D12ResourceWrappingTests.cpp similarity index 99% rename from src/tests/end2end/D3D12ResourceWrappingTests.cpp rename to src/dawn/tests/end2end/D3D12ResourceWrappingTests.cpp index dab828cf8bc..964ba8841f7 100644 --- a/src/tests/end2end/D3D12ResourceWrappingTests.cpp +++ b/src/dawn/tests/end2end/D3D12ResourceWrappingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include diff --git a/src/tests/end2end/DebugMarkerTests.cpp b/src/dawn/tests/end2end/DebugMarkerTests.cpp similarity index 98% rename from src/tests/end2end/DebugMarkerTests.cpp rename to src/dawn/tests/end2end/DebugMarkerTests.cpp index 5fc3c84848b..1a30b0d93dd 100644 --- a/src/tests/end2end/DebugMarkerTests.cpp +++ b/src/dawn/tests/end2end/DebugMarkerTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/DeprecatedAPITests.cpp b/src/dawn/tests/end2end/DeprecatedAPITests.cpp similarity index 99% rename from src/tests/end2end/DeprecatedAPITests.cpp rename to src/dawn/tests/end2end/DeprecatedAPITests.cpp index 69a0e10f461..ae1f2a4f32c 100644 --- a/src/tests/end2end/DeprecatedAPITests.cpp +++ b/src/dawn/tests/end2end/DeprecatedAPITests.cpp @@ -17,7 +17,7 @@ // a deprecation warning is emitted when the "old" behavior is used, and tests that an error is // emitted when both the old and the new behavior are used (when applicable). -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Constants.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/DepthBiasTests.cpp b/src/dawn/tests/end2end/DepthBiasTests.cpp similarity index 99% rename from src/tests/end2end/DepthBiasTests.cpp rename to src/dawn/tests/end2end/DepthBiasTests.cpp index d1c000e7391..9c893cfaa32 100644 --- a/src/tests/end2end/DepthBiasTests.cpp +++ b/src/dawn/tests/end2end/DepthBiasTests.cpp @@ -14,10 +14,10 @@ #include "dawn/common/Constants.h" #include "dawn/common/Math.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/TextureUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" constexpr static unsigned int kRTSize = 2; diff --git a/src/tests/end2end/DepthStencilCopyTests.cpp b/src/dawn/tests/end2end/DepthStencilCopyTests.cpp similarity index 99% rename from src/tests/end2end/DepthStencilCopyTests.cpp rename to src/dawn/tests/end2end/DepthStencilCopyTests.cpp index c4496c37c48..d622a33f11d 100644 --- a/src/tests/end2end/DepthStencilCopyTests.cpp +++ b/src/dawn/tests/end2end/DepthStencilCopyTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/DepthStencilLoadOpTests.cpp b/src/dawn/tests/end2end/DepthStencilLoadOpTests.cpp similarity index 99% rename from src/tests/end2end/DepthStencilLoadOpTests.cpp rename to src/dawn/tests/end2end/DepthStencilLoadOpTests.cpp index dd5dbe9eb24..35054d3d7cd 100644 --- a/src/tests/end2end/DepthStencilLoadOpTests.cpp +++ b/src/dawn/tests/end2end/DepthStencilLoadOpTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/DepthStencilSamplingTests.cpp b/src/dawn/tests/end2end/DepthStencilSamplingTests.cpp similarity index 99% rename from src/tests/end2end/DepthStencilSamplingTests.cpp rename to src/dawn/tests/end2end/DepthStencilSamplingTests.cpp index 78fa9559301..5b547abbe2f 100644 --- a/src/tests/end2end/DepthStencilSamplingTests.cpp +++ b/src/dawn/tests/end2end/DepthStencilSamplingTests.cpp @@ -13,9 +13,9 @@ // limitations under the License. #include "dawn/common/Assert.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" namespace { using TextureFormat = wgpu::TextureFormat; diff --git a/src/tests/end2end/DepthStencilStateTests.cpp b/src/dawn/tests/end2end/DepthStencilStateTests.cpp similarity index 99% rename from src/tests/end2end/DepthStencilStateTests.cpp rename to src/dawn/tests/end2end/DepthStencilStateTests.cpp index f6db23ffaab..d954e325e2a 100644 --- a/src/tests/end2end/DepthStencilStateTests.cpp +++ b/src/dawn/tests/end2end/DepthStencilStateTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/DestroyTests.cpp b/src/dawn/tests/end2end/DestroyTests.cpp similarity index 99% rename from src/tests/end2end/DestroyTests.cpp rename to src/dawn/tests/end2end/DestroyTests.cpp index 41475b66724..d908c7ee114 100644 --- a/src/tests/end2end/DestroyTests.cpp +++ b/src/dawn/tests/end2end/DestroyTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/DeviceInitializationTests.cpp b/src/dawn/tests/end2end/DeviceInitializationTests.cpp similarity index 99% rename from src/tests/end2end/DeviceInitializationTests.cpp rename to src/dawn/tests/end2end/DeviceInitializationTests.cpp index 021dcc0de27..f30aa7234f2 100644 --- a/src/tests/end2end/DeviceInitializationTests.cpp +++ b/src/dawn/tests/end2end/DeviceInitializationTests.cpp @@ -13,9 +13,9 @@ // limitations under the License. #include "dawn/dawn_proc.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/SystemUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" class DeviceInitializationTest : public testing::Test { void SetUp() override { diff --git a/src/tests/end2end/DeviceLostTests.cpp b/src/dawn/tests/end2end/DeviceLostTests.cpp similarity index 99% rename from src/tests/end2end/DeviceLostTests.cpp rename to src/dawn/tests/end2end/DeviceLostTests.cpp index c4fccec4b5d..1116e028ed4 100644 --- a/src/tests/end2end/DeviceLostTests.cpp +++ b/src/dawn/tests/end2end/DeviceLostTests.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include +#include "dawn/tests/MockCallback.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/MockCallback.h" #include diff --git a/src/tests/end2end/DrawIndexedIndirectTests.cpp b/src/dawn/tests/end2end/DrawIndexedIndirectTests.cpp similarity index 99% rename from src/tests/end2end/DrawIndexedIndirectTests.cpp rename to src/dawn/tests/end2end/DrawIndexedIndirectTests.cpp index 14383af7629..a8e21fe9466 100644 --- a/src/tests/end2end/DrawIndexedIndirectTests.cpp +++ b/src/dawn/tests/end2end/DrawIndexedIndirectTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/DrawIndexedTests.cpp b/src/dawn/tests/end2end/DrawIndexedTests.cpp similarity index 99% rename from src/tests/end2end/DrawIndexedTests.cpp rename to src/dawn/tests/end2end/DrawIndexedTests.cpp index 84060178e2d..c28b2971365 100644 --- a/src/tests/end2end/DrawIndexedTests.cpp +++ b/src/dawn/tests/end2end/DrawIndexedTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/DrawIndirectTests.cpp b/src/dawn/tests/end2end/DrawIndirectTests.cpp similarity index 99% rename from src/tests/end2end/DrawIndirectTests.cpp rename to src/dawn/tests/end2end/DrawIndirectTests.cpp index 9987311c892..e8782813acd 100644 --- a/src/tests/end2end/DrawIndirectTests.cpp +++ b/src/dawn/tests/end2end/DrawIndirectTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/DrawTests.cpp b/src/dawn/tests/end2end/DrawTests.cpp similarity index 99% rename from src/tests/end2end/DrawTests.cpp rename to src/dawn/tests/end2end/DrawTests.cpp index 526023dd601..55e86ce5c44 100644 --- a/src/tests/end2end/DrawTests.cpp +++ b/src/dawn/tests/end2end/DrawTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/DynamicBufferOffsetTests.cpp b/src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp similarity index 99% rename from src/tests/end2end/DynamicBufferOffsetTests.cpp rename to src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp index bc5160b4795..5c80a5ea48a 100644 --- a/src/tests/end2end/DynamicBufferOffsetTests.cpp +++ b/src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/EntryPointTests.cpp b/src/dawn/tests/end2end/EntryPointTests.cpp similarity index 99% rename from src/tests/end2end/EntryPointTests.cpp rename to src/dawn/tests/end2end/EntryPointTests.cpp index 8efa93b32f8..9b241de70dd 100644 --- a/src/tests/end2end/EntryPointTests.cpp +++ b/src/dawn/tests/end2end/EntryPointTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ExternalTextureTests.cpp b/src/dawn/tests/end2end/ExternalTextureTests.cpp similarity index 99% rename from src/tests/end2end/ExternalTextureTests.cpp rename to src/dawn/tests/end2end/ExternalTextureTests.cpp index 2211f20def0..e911837830b 100644 --- a/src/tests/end2end/ExternalTextureTests.cpp +++ b/src/dawn/tests/end2end/ExternalTextureTests.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" namespace { diff --git a/src/tests/end2end/FirstIndexOffsetTests.cpp b/src/dawn/tests/end2end/FirstIndexOffsetTests.cpp similarity index 99% rename from src/tests/end2end/FirstIndexOffsetTests.cpp rename to src/dawn/tests/end2end/FirstIndexOffsetTests.cpp index be514eed6c2..ceee6606281 100644 --- a/src/tests/end2end/FirstIndexOffsetTests.cpp +++ b/src/dawn/tests/end2end/FirstIndexOffsetTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/dawn/tests/end2end/GpuMemorySynchronizationTests.cpp similarity index 99% rename from src/tests/end2end/GpuMemorySynchronizationTests.cpp rename to src/dawn/tests/end2end/GpuMemorySynchronizationTests.cpp index 97d606fa094..d5b19592b64 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/dawn/tests/end2end/GpuMemorySynchronizationTests.cpp @@ -15,9 +15,9 @@ #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" class GpuMemorySyncTests : public DawnTest { protected: diff --git a/src/tests/end2end/IOSurfaceWrappingTests.cpp b/src/dawn/tests/end2end/IOSurfaceWrappingTests.cpp similarity index 99% rename from src/tests/end2end/IOSurfaceWrappingTests.cpp rename to src/dawn/tests/end2end/IOSurfaceWrappingTests.cpp index a48bd72b89c..b4a9c63ad21 100644 --- a/src/tests/end2end/IOSurfaceWrappingTests.cpp +++ b/src/dawn/tests/end2end/IOSurfaceWrappingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/MetalBackend.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/IndexFormatTests.cpp b/src/dawn/tests/end2end/IndexFormatTests.cpp similarity index 99% rename from src/tests/end2end/IndexFormatTests.cpp rename to src/dawn/tests/end2end/IndexFormatTests.cpp index 5eea31945ba..c2fe8831004 100644 --- a/src/tests/end2end/IndexFormatTests.cpp +++ b/src/dawn/tests/end2end/IndexFormatTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/MaxLimitTests.cpp b/src/dawn/tests/end2end/MaxLimitTests.cpp similarity index 99% rename from src/tests/end2end/MaxLimitTests.cpp rename to src/dawn/tests/end2end/MaxLimitTests.cpp index e72c39e8f17..ce01ca506c9 100644 --- a/src/tests/end2end/MaxLimitTests.cpp +++ b/src/dawn/tests/end2end/MaxLimitTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/common/Platform.h" diff --git a/src/tests/end2end/MemoryAllocationStressTests.cpp b/src/dawn/tests/end2end/MemoryAllocationStressTests.cpp similarity index 98% rename from src/tests/end2end/MemoryAllocationStressTests.cpp rename to src/dawn/tests/end2end/MemoryAllocationStressTests.cpp index c72a5b8522c..59fe0684681 100644 --- a/src/tests/end2end/MemoryAllocationStressTests.cpp +++ b/src/dawn/tests/end2end/MemoryAllocationStressTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" class MemoryAllocationStressTests : public DawnTest {}; diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/dawn/tests/end2end/MultisampledRenderingTests.cpp similarity index 99% rename from src/tests/end2end/MultisampledRenderingTests.cpp rename to src/dawn/tests/end2end/MultisampledRenderingTests.cpp index ee8322eb725..f8bcc74b56d 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/dawn/tests/end2end/MultisampledRenderingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/MultisampledSamplingTests.cpp b/src/dawn/tests/end2end/MultisampledSamplingTests.cpp similarity index 99% rename from src/tests/end2end/MultisampledSamplingTests.cpp rename to src/dawn/tests/end2end/MultisampledSamplingTests.cpp index 162ba0fd48c..6218ad9e732 100644 --- a/src/tests/end2end/MultisampledSamplingTests.cpp +++ b/src/dawn/tests/end2end/MultisampledSamplingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/NonzeroBufferCreationTests.cpp b/src/dawn/tests/end2end/NonzeroBufferCreationTests.cpp similarity index 99% rename from src/tests/end2end/NonzeroBufferCreationTests.cpp rename to src/dawn/tests/end2end/NonzeroBufferCreationTests.cpp index 1950266d3c2..55f238f6634 100644 --- a/src/tests/end2end/NonzeroBufferCreationTests.cpp +++ b/src/dawn/tests/end2end/NonzeroBufferCreationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include diff --git a/src/tests/end2end/NonzeroTextureCreationTests.cpp b/src/dawn/tests/end2end/NonzeroTextureCreationTests.cpp similarity index 99% rename from src/tests/end2end/NonzeroTextureCreationTests.cpp rename to src/dawn/tests/end2end/NonzeroTextureCreationTests.cpp index b9d06b318f5..73a863d6052 100644 --- a/src/tests/end2end/NonzeroTextureCreationTests.cpp +++ b/src/dawn/tests/end2end/NonzeroTextureCreationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" diff --git a/src/tests/end2end/ObjectCachingTests.cpp b/src/dawn/tests/end2end/ObjectCachingTests.cpp similarity index 99% rename from src/tests/end2end/ObjectCachingTests.cpp rename to src/dawn/tests/end2end/ObjectCachingTests.cpp index 26787e29a4f..85139c93f09 100644 --- a/src/tests/end2end/ObjectCachingTests.cpp +++ b/src/dawn/tests/end2end/ObjectCachingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/OpArrayLengthTests.cpp b/src/dawn/tests/end2end/OpArrayLengthTests.cpp similarity index 99% rename from src/tests/end2end/OpArrayLengthTests.cpp rename to src/dawn/tests/end2end/OpArrayLengthTests.cpp index ed5a08e4deb..516cd197dda 100644 --- a/src/tests/end2end/OpArrayLengthTests.cpp +++ b/src/dawn/tests/end2end/OpArrayLengthTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/PipelineLayoutTests.cpp b/src/dawn/tests/end2end/PipelineLayoutTests.cpp similarity index 98% rename from src/tests/end2end/PipelineLayoutTests.cpp rename to src/dawn/tests/end2end/PipelineLayoutTests.cpp index 444217a0f59..fef5f8103ce 100644 --- a/src/tests/end2end/PipelineLayoutTests.cpp +++ b/src/dawn/tests/end2end/PipelineLayoutTests.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include "dawn/common/Constants.h" -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include diff --git a/src/tests/end2end/PrimitiveStateTests.cpp b/src/dawn/tests/end2end/PrimitiveStateTests.cpp similarity index 99% rename from src/tests/end2end/PrimitiveStateTests.cpp rename to src/dawn/tests/end2end/PrimitiveStateTests.cpp index 0f1b54a87c1..16b56d28372 100644 --- a/src/tests/end2end/PrimitiveStateTests.cpp +++ b/src/dawn/tests/end2end/PrimitiveStateTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/PrimitiveTopologyTests.cpp b/src/dawn/tests/end2end/PrimitiveTopologyTests.cpp similarity index 99% rename from src/tests/end2end/PrimitiveTopologyTests.cpp rename to src/dawn/tests/end2end/PrimitiveTopologyTests.cpp index 5b559be1b29..97043cfc991 100644 --- a/src/tests/end2end/PrimitiveTopologyTests.cpp +++ b/src/dawn/tests/end2end/PrimitiveTopologyTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/QueryTests.cpp b/src/dawn/tests/end2end/QueryTests.cpp similarity index 99% rename from src/tests/end2end/QueryTests.cpp rename to src/dawn/tests/end2end/QueryTests.cpp index 5718d09070c..0b8f4acbb15 100644 --- a/src/tests/end2end/QueryTests.cpp +++ b/src/dawn/tests/end2end/QueryTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/QueueTests.cpp b/src/dawn/tests/end2end/QueueTests.cpp similarity index 99% rename from src/tests/end2end/QueueTests.cpp rename to src/dawn/tests/end2end/QueueTests.cpp index 4076b0ce88a..f9dd8c88a40 100644 --- a/src/tests/end2end/QueueTests.cpp +++ b/src/dawn/tests/end2end/QueueTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/utils/TestUtils.h" diff --git a/src/tests/end2end/QueueTimelineTests.cpp b/src/dawn/tests/end2end/QueueTimelineTests.cpp similarity index 99% rename from src/tests/end2end/QueueTimelineTests.cpp rename to src/dawn/tests/end2end/QueueTimelineTests.cpp index b7ada26b44e..96f4a030342 100644 --- a/src/tests/end2end/QueueTimelineTests.cpp +++ b/src/dawn/tests/end2end/QueueTimelineTests.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" using namespace testing; diff --git a/src/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp b/src/dawn/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp similarity index 99% rename from src/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp rename to src/dawn/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp index 5c5df395b05..b0ba5ad2eff 100644 --- a/src/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp +++ b/src/dawn/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/TextureUtils.h" diff --git a/src/tests/end2end/RenderAttachmentTests.cpp b/src/dawn/tests/end2end/RenderAttachmentTests.cpp similarity index 99% rename from src/tests/end2end/RenderAttachmentTests.cpp rename to src/dawn/tests/end2end/RenderAttachmentTests.cpp index 45cdac989b0..75ea0fca3e4 100644 --- a/src/tests/end2end/RenderAttachmentTests.cpp +++ b/src/dawn/tests/end2end/RenderAttachmentTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/RenderBundleTests.cpp b/src/dawn/tests/end2end/RenderBundleTests.cpp similarity index 99% rename from src/tests/end2end/RenderBundleTests.cpp rename to src/dawn/tests/end2end/RenderBundleTests.cpp index d0b8e322372..38bf83b8b64 100644 --- a/src/tests/end2end/RenderBundleTests.cpp +++ b/src/dawn/tests/end2end/RenderBundleTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/RenderPassLoadOpTests.cpp b/src/dawn/tests/end2end/RenderPassLoadOpTests.cpp similarity index 99% rename from src/tests/end2end/RenderPassLoadOpTests.cpp rename to src/dawn/tests/end2end/RenderPassLoadOpTests.cpp index 68801285e77..1dac34ed300 100644 --- a/src/tests/end2end/RenderPassLoadOpTests.cpp +++ b/src/dawn/tests/end2end/RenderPassLoadOpTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/RenderPassTests.cpp b/src/dawn/tests/end2end/RenderPassTests.cpp similarity index 99% rename from src/tests/end2end/RenderPassTests.cpp rename to src/dawn/tests/end2end/RenderPassTests.cpp index 88f9031630e..d45e2888329 100644 --- a/src/tests/end2end/RenderPassTests.cpp +++ b/src/dawn/tests/end2end/RenderPassTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/SamplerFilterAnisotropicTests.cpp b/src/dawn/tests/end2end/SamplerFilterAnisotropicTests.cpp similarity index 99% rename from src/tests/end2end/SamplerFilterAnisotropicTests.cpp rename to src/dawn/tests/end2end/SamplerFilterAnisotropicTests.cpp index 59a9b6dfd55..c5b60998003 100644 --- a/src/tests/end2end/SamplerFilterAnisotropicTests.cpp +++ b/src/dawn/tests/end2end/SamplerFilterAnisotropicTests.cpp @@ -14,7 +14,7 @@ #include -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/SamplerTests.cpp b/src/dawn/tests/end2end/SamplerTests.cpp similarity index 99% rename from src/tests/end2end/SamplerTests.cpp rename to src/dawn/tests/end2end/SamplerTests.cpp index 63add8e631c..491cae01265 100644 --- a/src/tests/end2end/SamplerTests.cpp +++ b/src/dawn/tests/end2end/SamplerTests.cpp @@ -14,7 +14,7 @@ #include -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/ScissorTests.cpp b/src/dawn/tests/end2end/ScissorTests.cpp similarity index 99% rename from src/tests/end2end/ScissorTests.cpp rename to src/dawn/tests/end2end/ScissorTests.cpp index 6e0f108b66d..a66044097b4 100644 --- a/src/tests/end2end/ScissorTests.cpp +++ b/src/dawn/tests/end2end/ScissorTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ShaderFloat16Tests.cpp b/src/dawn/tests/end2end/ShaderFloat16Tests.cpp similarity index 99% rename from src/tests/end2end/ShaderFloat16Tests.cpp rename to src/dawn/tests/end2end/ShaderFloat16Tests.cpp index 293cfa8ccd2..e2d95f3639f 100644 --- a/src/tests/end2end/ShaderFloat16Tests.cpp +++ b/src/dawn/tests/end2end/ShaderFloat16Tests.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include "dawn/common/Math.h" -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ShaderTests.cpp b/src/dawn/tests/end2end/ShaderTests.cpp similarity index 99% rename from src/tests/end2end/ShaderTests.cpp rename to src/dawn/tests/end2end/ShaderTests.cpp index b2a31270df8..ef2afde79be 100644 --- a/src/tests/end2end/ShaderTests.cpp +++ b/src/dawn/tests/end2end/ShaderTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/StorageTextureTests.cpp b/src/dawn/tests/end2end/StorageTextureTests.cpp similarity index 99% rename from src/tests/end2end/StorageTextureTests.cpp rename to src/dawn/tests/end2end/StorageTextureTests.cpp index baa87473031..f8d9a58b14e 100644 --- a/src/tests/end2end/StorageTextureTests.cpp +++ b/src/dawn/tests/end2end/StorageTextureTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/SubresourceRenderAttachmentTests.cpp b/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp similarity index 99% rename from src/tests/end2end/SubresourceRenderAttachmentTests.cpp rename to src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp index 7f214302ad0..6890785c59a 100644 --- a/src/tests/end2end/SubresourceRenderAttachmentTests.cpp +++ b/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/SwapChainTests.cpp b/src/dawn/tests/end2end/SwapChainTests.cpp similarity index 99% rename from src/tests/end2end/SwapChainTests.cpp rename to src/dawn/tests/end2end/SwapChainTests.cpp index 90095908100..4286425f151 100644 --- a/src/tests/end2end/SwapChainTests.cpp +++ b/src/dawn/tests/end2end/SwapChainTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Constants.h" #include "dawn/common/Log.h" diff --git a/src/tests/end2end/SwapChainValidationTests.cpp b/src/dawn/tests/end2end/SwapChainValidationTests.cpp similarity index 99% rename from src/tests/end2end/SwapChainValidationTests.cpp rename to src/dawn/tests/end2end/SwapChainValidationTests.cpp index 1fdd390c821..d3449d9dfc2 100644 --- a/src/tests/end2end/SwapChainValidationTests.cpp +++ b/src/dawn/tests/end2end/SwapChainValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Constants.h" #include "dawn/common/Log.h" diff --git a/src/tests/end2end/Texture3DTests.cpp b/src/dawn/tests/end2end/Texture3DTests.cpp similarity index 99% rename from src/tests/end2end/Texture3DTests.cpp rename to src/dawn/tests/end2end/Texture3DTests.cpp index 3c3a2a72b75..fc4b0c6c4fa 100644 --- a/src/tests/end2end/Texture3DTests.cpp +++ b/src/dawn/tests/end2end/Texture3DTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/TestUtils.h" diff --git a/src/tests/end2end/TextureFormatTests.cpp b/src/dawn/tests/end2end/TextureFormatTests.cpp similarity index 99% rename from src/tests/end2end/TextureFormatTests.cpp rename to src/dawn/tests/end2end/TextureFormatTests.cpp index 1778963cd42..7f3370d4392 100644 --- a/src/tests/end2end/TextureFormatTests.cpp +++ b/src/dawn/tests/end2end/TextureFormatTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" diff --git a/src/tests/end2end/TextureSubresourceTests.cpp b/src/dawn/tests/end2end/TextureSubresourceTests.cpp similarity index 99% rename from src/tests/end2end/TextureSubresourceTests.cpp rename to src/dawn/tests/end2end/TextureSubresourceTests.cpp index 83fc0d38f41..d8f69929f8d 100644 --- a/src/tests/end2end/TextureSubresourceTests.cpp +++ b/src/dawn/tests/end2end/TextureSubresourceTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/TextureViewTests.cpp b/src/dawn/tests/end2end/TextureViewTests.cpp similarity index 99% rename from src/tests/end2end/TextureViewTests.cpp rename to src/dawn/tests/end2end/TextureViewTests.cpp index cefc78a2494..edc2b99685f 100644 --- a/src/tests/end2end/TextureViewTests.cpp +++ b/src/dawn/tests/end2end/TextureViewTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/dawn/tests/end2end/TextureZeroInitTests.cpp similarity index 99% rename from src/tests/end2end/TextureZeroInitTests.cpp rename to src/dawn/tests/end2end/TextureZeroInitTests.cpp index 29b5551a2e5..b31f4f8224b 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/dawn/tests/end2end/TextureZeroInitTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/end2end/VertexFormatTests.cpp b/src/dawn/tests/end2end/VertexFormatTests.cpp similarity index 99% rename from src/tests/end2end/VertexFormatTests.cpp rename to src/dawn/tests/end2end/VertexFormatTests.cpp index faeae423545..e6a665d37ca 100644 --- a/src/tests/end2end/VertexFormatTests.cpp +++ b/src/dawn/tests/end2end/VertexFormatTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" diff --git a/src/tests/end2end/VertexOnlyRenderPipelineTests.cpp b/src/dawn/tests/end2end/VertexOnlyRenderPipelineTests.cpp similarity index 99% rename from src/tests/end2end/VertexOnlyRenderPipelineTests.cpp rename to src/dawn/tests/end2end/VertexOnlyRenderPipelineTests.cpp index 8fdc8c4acd3..083048e178d 100644 --- a/src/tests/end2end/VertexOnlyRenderPipelineTests.cpp +++ b/src/dawn/tests/end2end/VertexOnlyRenderPipelineTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/VertexStateTests.cpp b/src/dawn/tests/end2end/VertexStateTests.cpp similarity index 99% rename from src/tests/end2end/VertexStateTests.cpp rename to src/dawn/tests/end2end/VertexStateTests.cpp index d81a5baa0f9..d33315ea6f1 100644 --- a/src/tests/end2end/VertexStateTests.cpp +++ b/src/dawn/tests/end2end/VertexStateTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Math.h" diff --git a/src/tests/end2end/VideoViewsTests.cpp b/src/dawn/tests/end2end/VideoViewsTests.cpp similarity index 100% rename from src/tests/end2end/VideoViewsTests.cpp rename to src/dawn/tests/end2end/VideoViewsTests.cpp diff --git a/src/tests/end2end/VideoViewsTests.h b/src/dawn/tests/end2end/VideoViewsTests.h similarity index 99% rename from src/tests/end2end/VideoViewsTests.h rename to src/dawn/tests/end2end/VideoViewsTests.h index c0527b09831..6dcedb9fc03 100644 --- a/src/tests/end2end/VideoViewsTests.h +++ b/src/dawn/tests/end2end/VideoViewsTests.h @@ -15,7 +15,7 @@ #ifndef TESTS_VIDEOVIEWSTESTS_H_ #define TESTS_VIDEOVIEWSTESTS_H_ -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include #include diff --git a/src/tests/end2end/VideoViewsTests_gbm.cpp b/src/dawn/tests/end2end/VideoViewsTests_gbm.cpp similarity index 100% rename from src/tests/end2end/VideoViewsTests_gbm.cpp rename to src/dawn/tests/end2end/VideoViewsTests_gbm.cpp diff --git a/src/tests/end2end/VideoViewsTests_win.cpp b/src/dawn/tests/end2end/VideoViewsTests_win.cpp similarity index 100% rename from src/tests/end2end/VideoViewsTests_win.cpp rename to src/dawn/tests/end2end/VideoViewsTests_win.cpp diff --git a/src/tests/end2end/ViewportOrientationTests.cpp b/src/dawn/tests/end2end/ViewportOrientationTests.cpp similarity index 98% rename from src/tests/end2end/ViewportOrientationTests.cpp rename to src/dawn/tests/end2end/ViewportOrientationTests.cpp index aee8e5bcdc1..9a290491756 100644 --- a/src/tests/end2end/ViewportOrientationTests.cpp +++ b/src/dawn/tests/end2end/ViewportOrientationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/ViewportTests.cpp b/src/dawn/tests/end2end/ViewportTests.cpp similarity index 99% rename from src/tests/end2end/ViewportTests.cpp rename to src/dawn/tests/end2end/ViewportTests.cpp index 653cc8c2a61..2c357fac612 100644 --- a/src/tests/end2end/ViewportTests.cpp +++ b/src/dawn/tests/end2end/ViewportTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/end2end/WindowSurfaceTests.cpp b/src/dawn/tests/end2end/WindowSurfaceTests.cpp similarity index 99% rename from src/tests/end2end/WindowSurfaceTests.cpp rename to src/dawn/tests/end2end/WindowSurfaceTests.cpp index 9f53196784d..1974f3c7508 100644 --- a/src/tests/end2end/WindowSurfaceTests.cpp +++ b/src/dawn/tests/end2end/WindowSurfaceTests.cpp @@ -16,8 +16,8 @@ #include "dawn/common/Platform.h" #include "dawn/dawn_proc.h" #include "dawn/native/DawnNative.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/GLFWUtils.h" -#include "tests/DawnTest.h" #include diff --git a/src/tests/perf_tests/BufferUploadPerf.cpp b/src/dawn/tests/perf_tests/BufferUploadPerf.cpp similarity index 99% rename from src/tests/perf_tests/BufferUploadPerf.cpp rename to src/dawn/tests/perf_tests/BufferUploadPerf.cpp index d4be0c583ac..6be94366914 100644 --- a/src/tests/perf_tests/BufferUploadPerf.cpp +++ b/src/dawn/tests/perf_tests/BufferUploadPerf.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTest.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/perf_tests/DawnPerfTest.cpp b/src/dawn/tests/perf_tests/DawnPerfTest.cpp similarity index 99% rename from src/tests/perf_tests/DawnPerfTest.cpp rename to src/dawn/tests/perf_tests/DawnPerfTest.cpp index fe014df6f5f..75d28711765 100644 --- a/src/tests/perf_tests/DawnPerfTest.cpp +++ b/src/dawn/tests/perf_tests/DawnPerfTest.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTest.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" #include #include @@ -21,8 +21,8 @@ #include "dawn/common/Assert.h" #include "dawn/common/Log.h" #include "dawn/platform/tracing/TraceEvent.h" +#include "dawn/tests/perf_tests/DawnPerfTestPlatform.h" #include "dawn/utils/Timer.h" -#include "tests/perf_tests/DawnPerfTestPlatform.h" namespace { diff --git a/src/tests/perf_tests/DawnPerfTest.h b/src/dawn/tests/perf_tests/DawnPerfTest.h similarity index 99% rename from src/tests/perf_tests/DawnPerfTest.h rename to src/dawn/tests/perf_tests/DawnPerfTest.h index 1781fc5e58a..548d2120488 100644 --- a/src/tests/perf_tests/DawnPerfTest.h +++ b/src/dawn/tests/perf_tests/DawnPerfTest.h @@ -15,7 +15,7 @@ #ifndef TESTS_PERFTESTS_DAWNPERFTEST_H_ #define TESTS_PERFTESTS_DAWNPERFTEST_H_ -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" namespace utils { class Timer; diff --git a/src/tests/perf_tests/DawnPerfTestPlatform.cpp b/src/dawn/tests/perf_tests/DawnPerfTestPlatform.cpp similarity index 98% rename from src/tests/perf_tests/DawnPerfTestPlatform.cpp rename to src/dawn/tests/perf_tests/DawnPerfTestPlatform.cpp index fdbdafc117d..3da0dadb417 100644 --- a/src/tests/perf_tests/DawnPerfTestPlatform.cpp +++ b/src/dawn/tests/perf_tests/DawnPerfTestPlatform.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTestPlatform.h" +#include "dawn/tests/perf_tests/DawnPerfTestPlatform.h" #include #include "dawn/common/Assert.h" #include "dawn/common/HashUtils.h" #include "dawn/platform/tracing/TraceEvent.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" #include "dawn/utils/Timer.h" -#include "tests/perf_tests/DawnPerfTest.h" namespace { struct TraceCategoryInfo { diff --git a/src/tests/perf_tests/DawnPerfTestPlatform.h b/src/dawn/tests/perf_tests/DawnPerfTestPlatform.h similarity index 98% rename from src/tests/perf_tests/DawnPerfTestPlatform.h rename to src/dawn/tests/perf_tests/DawnPerfTestPlatform.h index ff9bf64520e..f41d6d977b4 100644 --- a/src/tests/perf_tests/DawnPerfTestPlatform.h +++ b/src/dawn/tests/perf_tests/DawnPerfTestPlatform.h @@ -15,7 +15,7 @@ #ifndef TESTS_PERFTESTS_DAWNPERFTESTPLATFORM_H_ #define TESTS_PERFTESTS_DAWNPERFTESTPLATFORM_H_ -#include +#include "dawn/platform/DawnPlatform.h" #include #include diff --git a/src/tests/perf_tests/DrawCallPerf.cpp b/src/dawn/tests/perf_tests/DrawCallPerf.cpp similarity index 99% rename from src/tests/perf_tests/DrawCallPerf.cpp rename to src/dawn/tests/perf_tests/DrawCallPerf.cpp index 6b00e804720..1adbe5ca1e6 100644 --- a/src/tests/perf_tests/DrawCallPerf.cpp +++ b/src/dawn/tests/perf_tests/DrawCallPerf.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTest.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/perf_tests/README.md b/src/dawn/tests/perf_tests/README.md similarity index 100% rename from src/tests/perf_tests/README.md rename to src/dawn/tests/perf_tests/README.md diff --git a/src/tests/perf_tests/ShaderRobustnessPerf.cpp b/src/dawn/tests/perf_tests/ShaderRobustnessPerf.cpp similarity index 99% rename from src/tests/perf_tests/ShaderRobustnessPerf.cpp rename to src/dawn/tests/perf_tests/ShaderRobustnessPerf.cpp index c683496633d..0a541ccea72 100644 --- a/src/tests/perf_tests/ShaderRobustnessPerf.cpp +++ b/src/dawn/tests/perf_tests/ShaderRobustnessPerf.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTest.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/perf_tests/SubresourceTrackingPerf.cpp b/src/dawn/tests/perf_tests/SubresourceTrackingPerf.cpp similarity index 99% rename from src/tests/perf_tests/SubresourceTrackingPerf.cpp rename to src/dawn/tests/perf_tests/SubresourceTrackingPerf.cpp index e5ce711e164..b70c68b6a1a 100644 --- a/src/tests/perf_tests/SubresourceTrackingPerf.cpp +++ b/src/dawn/tests/perf_tests/SubresourceTrackingPerf.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/perf_tests/DawnPerfTest.h" +#include "dawn/tests/perf_tests/DawnPerfTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/AsyncTaskTests.cpp b/src/dawn/tests/unittests/AsyncTaskTests.cpp similarity index 100% rename from src/tests/unittests/AsyncTaskTests.cpp rename to src/dawn/tests/unittests/AsyncTaskTests.cpp diff --git a/src/tests/unittests/BitSetIteratorTests.cpp b/src/dawn/tests/unittests/BitSetIteratorTests.cpp similarity index 100% rename from src/tests/unittests/BitSetIteratorTests.cpp rename to src/dawn/tests/unittests/BitSetIteratorTests.cpp diff --git a/src/tests/unittests/BuddyAllocatorTests.cpp b/src/dawn/tests/unittests/BuddyAllocatorTests.cpp similarity index 100% rename from src/tests/unittests/BuddyAllocatorTests.cpp rename to src/dawn/tests/unittests/BuddyAllocatorTests.cpp diff --git a/src/tests/unittests/BuddyMemoryAllocatorTests.cpp b/src/dawn/tests/unittests/BuddyMemoryAllocatorTests.cpp similarity index 100% rename from src/tests/unittests/BuddyMemoryAllocatorTests.cpp rename to src/dawn/tests/unittests/BuddyMemoryAllocatorTests.cpp diff --git a/src/tests/unittests/ChainUtilsTests.cpp b/src/dawn/tests/unittests/ChainUtilsTests.cpp similarity index 100% rename from src/tests/unittests/ChainUtilsTests.cpp rename to src/dawn/tests/unittests/ChainUtilsTests.cpp diff --git a/src/tests/unittests/CommandAllocatorTests.cpp b/src/dawn/tests/unittests/CommandAllocatorTests.cpp similarity index 100% rename from src/tests/unittests/CommandAllocatorTests.cpp rename to src/dawn/tests/unittests/CommandAllocatorTests.cpp diff --git a/src/tests/unittests/ConcurrentCacheTests.cpp b/src/dawn/tests/unittests/ConcurrentCacheTests.cpp similarity index 100% rename from src/tests/unittests/ConcurrentCacheTests.cpp rename to src/dawn/tests/unittests/ConcurrentCacheTests.cpp diff --git a/src/tests/unittests/EnumClassBitmasksTests.cpp b/src/dawn/tests/unittests/EnumClassBitmasksTests.cpp similarity index 100% rename from src/tests/unittests/EnumClassBitmasksTests.cpp rename to src/dawn/tests/unittests/EnumClassBitmasksTests.cpp diff --git a/src/tests/unittests/EnumMaskIteratorTests.cpp b/src/dawn/tests/unittests/EnumMaskIteratorTests.cpp similarity index 100% rename from src/tests/unittests/EnumMaskIteratorTests.cpp rename to src/dawn/tests/unittests/EnumMaskIteratorTests.cpp diff --git a/src/tests/unittests/ErrorTests.cpp b/src/dawn/tests/unittests/ErrorTests.cpp similarity index 100% rename from src/tests/unittests/ErrorTests.cpp rename to src/dawn/tests/unittests/ErrorTests.cpp diff --git a/src/tests/unittests/FeatureTests.cpp b/src/dawn/tests/unittests/FeatureTests.cpp similarity index 100% rename from src/tests/unittests/FeatureTests.cpp rename to src/dawn/tests/unittests/FeatureTests.cpp diff --git a/src/tests/unittests/GPUInfoTests.cpp b/src/dawn/tests/unittests/GPUInfoTests.cpp similarity index 100% rename from src/tests/unittests/GPUInfoTests.cpp rename to src/dawn/tests/unittests/GPUInfoTests.cpp diff --git a/src/tests/unittests/GetProcAddressTests.cpp b/src/dawn/tests/unittests/GetProcAddressTests.cpp similarity index 100% rename from src/tests/unittests/GetProcAddressTests.cpp rename to src/dawn/tests/unittests/GetProcAddressTests.cpp diff --git a/src/tests/unittests/ITypArrayTests.cpp b/src/dawn/tests/unittests/ITypArrayTests.cpp similarity index 100% rename from src/tests/unittests/ITypArrayTests.cpp rename to src/dawn/tests/unittests/ITypArrayTests.cpp diff --git a/src/tests/unittests/ITypBitsetTests.cpp b/src/dawn/tests/unittests/ITypBitsetTests.cpp similarity index 100% rename from src/tests/unittests/ITypBitsetTests.cpp rename to src/dawn/tests/unittests/ITypBitsetTests.cpp diff --git a/src/tests/unittests/ITypSpanTests.cpp b/src/dawn/tests/unittests/ITypSpanTests.cpp similarity index 100% rename from src/tests/unittests/ITypSpanTests.cpp rename to src/dawn/tests/unittests/ITypSpanTests.cpp diff --git a/src/tests/unittests/ITypVectorTests.cpp b/src/dawn/tests/unittests/ITypVectorTests.cpp similarity index 100% rename from src/tests/unittests/ITypVectorTests.cpp rename to src/dawn/tests/unittests/ITypVectorTests.cpp diff --git a/src/tests/unittests/LimitsTests.cpp b/src/dawn/tests/unittests/LimitsTests.cpp similarity index 100% rename from src/tests/unittests/LimitsTests.cpp rename to src/dawn/tests/unittests/LimitsTests.cpp diff --git a/src/tests/unittests/LinkedListTests.cpp b/src/dawn/tests/unittests/LinkedListTests.cpp similarity index 100% rename from src/tests/unittests/LinkedListTests.cpp rename to src/dawn/tests/unittests/LinkedListTests.cpp diff --git a/src/tests/unittests/MathTests.cpp b/src/dawn/tests/unittests/MathTests.cpp similarity index 100% rename from src/tests/unittests/MathTests.cpp rename to src/dawn/tests/unittests/MathTests.cpp diff --git a/src/tests/unittests/ObjectBaseTests.cpp b/src/dawn/tests/unittests/ObjectBaseTests.cpp similarity index 100% rename from src/tests/unittests/ObjectBaseTests.cpp rename to src/dawn/tests/unittests/ObjectBaseTests.cpp diff --git a/src/tests/unittests/PerStageTests.cpp b/src/dawn/tests/unittests/PerStageTests.cpp similarity index 100% rename from src/tests/unittests/PerStageTests.cpp rename to src/dawn/tests/unittests/PerStageTests.cpp diff --git a/src/tests/unittests/PerThreadProcTests.cpp b/src/dawn/tests/unittests/PerThreadProcTests.cpp similarity index 100% rename from src/tests/unittests/PerThreadProcTests.cpp rename to src/dawn/tests/unittests/PerThreadProcTests.cpp diff --git a/src/tests/unittests/PlacementAllocatedTests.cpp b/src/dawn/tests/unittests/PlacementAllocatedTests.cpp similarity index 100% rename from src/tests/unittests/PlacementAllocatedTests.cpp rename to src/dawn/tests/unittests/PlacementAllocatedTests.cpp diff --git a/src/tests/unittests/RefBaseTests.cpp b/src/dawn/tests/unittests/RefBaseTests.cpp similarity index 100% rename from src/tests/unittests/RefBaseTests.cpp rename to src/dawn/tests/unittests/RefBaseTests.cpp diff --git a/src/tests/unittests/RefCountedTests.cpp b/src/dawn/tests/unittests/RefCountedTests.cpp similarity index 100% rename from src/tests/unittests/RefCountedTests.cpp rename to src/dawn/tests/unittests/RefCountedTests.cpp diff --git a/src/tests/unittests/ResultTests.cpp b/src/dawn/tests/unittests/ResultTests.cpp similarity index 100% rename from src/tests/unittests/ResultTests.cpp rename to src/dawn/tests/unittests/ResultTests.cpp diff --git a/src/tests/unittests/RingBufferAllocatorTests.cpp b/src/dawn/tests/unittests/RingBufferAllocatorTests.cpp similarity index 100% rename from src/tests/unittests/RingBufferAllocatorTests.cpp rename to src/dawn/tests/unittests/RingBufferAllocatorTests.cpp diff --git a/src/tests/unittests/SerialMapTests.cpp b/src/dawn/tests/unittests/SerialMapTests.cpp similarity index 100% rename from src/tests/unittests/SerialMapTests.cpp rename to src/dawn/tests/unittests/SerialMapTests.cpp diff --git a/src/tests/unittests/SerialQueueTests.cpp b/src/dawn/tests/unittests/SerialQueueTests.cpp similarity index 100% rename from src/tests/unittests/SerialQueueTests.cpp rename to src/dawn/tests/unittests/SerialQueueTests.cpp diff --git a/src/tests/unittests/SlabAllocatorTests.cpp b/src/dawn/tests/unittests/SlabAllocatorTests.cpp similarity index 100% rename from src/tests/unittests/SlabAllocatorTests.cpp rename to src/dawn/tests/unittests/SlabAllocatorTests.cpp diff --git a/src/tests/unittests/StackContainerTests.cpp b/src/dawn/tests/unittests/StackContainerTests.cpp similarity index 100% rename from src/tests/unittests/StackContainerTests.cpp rename to src/dawn/tests/unittests/StackContainerTests.cpp diff --git a/src/tests/unittests/SubresourceStorageTests.cpp b/src/dawn/tests/unittests/SubresourceStorageTests.cpp similarity index 100% rename from src/tests/unittests/SubresourceStorageTests.cpp rename to src/dawn/tests/unittests/SubresourceStorageTests.cpp diff --git a/src/tests/unittests/SystemUtilsTests.cpp b/src/dawn/tests/unittests/SystemUtilsTests.cpp similarity index 100% rename from src/tests/unittests/SystemUtilsTests.cpp rename to src/dawn/tests/unittests/SystemUtilsTests.cpp diff --git a/src/tests/unittests/ToBackendTests.cpp b/src/dawn/tests/unittests/ToBackendTests.cpp similarity index 100% rename from src/tests/unittests/ToBackendTests.cpp rename to src/dawn/tests/unittests/ToBackendTests.cpp diff --git a/src/tests/unittests/TypedIntegerTests.cpp b/src/dawn/tests/unittests/TypedIntegerTests.cpp similarity index 100% rename from src/tests/unittests/TypedIntegerTests.cpp rename to src/dawn/tests/unittests/TypedIntegerTests.cpp diff --git a/src/tests/unittests/WindowsUtilsTests.cpp b/src/dawn/tests/unittests/WindowsUtilsTests.cpp similarity index 100% rename from src/tests/unittests/WindowsUtilsTests.cpp rename to src/dawn/tests/unittests/WindowsUtilsTests.cpp diff --git a/src/tests/unittests/d3d12/CopySplitTests.cpp b/src/dawn/tests/unittests/d3d12/CopySplitTests.cpp similarity index 100% rename from src/tests/unittests/d3d12/CopySplitTests.cpp rename to src/dawn/tests/unittests/d3d12/CopySplitTests.cpp diff --git a/src/tests/unittests/native/CommandBufferEncodingTests.cpp b/src/dawn/tests/unittests/native/CommandBufferEncodingTests.cpp similarity index 99% rename from src/tests/unittests/native/CommandBufferEncodingTests.cpp rename to src/dawn/tests/unittests/native/CommandBufferEncodingTests.cpp index 7cf38ae11bf..eb94dccab56 100644 --- a/src/tests/unittests/native/CommandBufferEncodingTests.cpp +++ b/src/dawn/tests/unittests/native/CommandBufferEncodingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnNativeTest.h" +#include "dawn/tests/DawnNativeTest.h" #include "dawn/native/CommandBuffer.h" #include "dawn/native/Commands.h" diff --git a/src/tests/unittests/native/DestroyObjectTests.cpp b/src/dawn/tests/unittests/native/DestroyObjectTests.cpp similarity index 99% rename from src/tests/unittests/native/DestroyObjectTests.cpp rename to src/dawn/tests/unittests/native/DestroyObjectTests.cpp index b6a3efbbdcc..01c09add51a 100644 --- a/src/tests/unittests/native/DestroyObjectTests.cpp +++ b/src/dawn/tests/unittests/native/DestroyObjectTests.cpp @@ -15,6 +15,7 @@ #include #include "dawn/native/Toggles.h" +#include "dawn/tests/DawnNativeTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "mocks/BindGroupLayoutMock.h" #include "mocks/BindGroupMock.h" @@ -30,7 +31,6 @@ #include "mocks/ShaderModuleMock.h" #include "mocks/SwapChainMock.h" #include "mocks/TextureMock.h" -#include "tests/DawnNativeTest.h" namespace dawn::native { namespace { diff --git a/src/tests/unittests/native/DeviceCreationTests.cpp b/src/dawn/tests/unittests/native/DeviceCreationTests.cpp similarity index 99% rename from src/tests/unittests/native/DeviceCreationTests.cpp rename to src/dawn/tests/unittests/native/DeviceCreationTests.cpp index 6b49cba1c00..fc1b4638e60 100644 --- a/src/tests/unittests/native/DeviceCreationTests.cpp +++ b/src/dawn/tests/unittests/native/DeviceCreationTests.cpp @@ -14,9 +14,9 @@ #include "dawn/dawn_proc.h" #include "dawn/native/DawnNative.h" +#include "dawn/tests/MockCallback.h" #include "dawn/utils/SystemUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/MockCallback.h" #include diff --git a/src/tests/unittests/native/mocks/BindGroupLayoutMock.h b/src/dawn/tests/unittests/native/mocks/BindGroupLayoutMock.h similarity index 100% rename from src/tests/unittests/native/mocks/BindGroupLayoutMock.h rename to src/dawn/tests/unittests/native/mocks/BindGroupLayoutMock.h diff --git a/src/tests/unittests/native/mocks/BindGroupMock.h b/src/dawn/tests/unittests/native/mocks/BindGroupMock.h similarity index 100% rename from src/tests/unittests/native/mocks/BindGroupMock.h rename to src/dawn/tests/unittests/native/mocks/BindGroupMock.h diff --git a/src/tests/unittests/native/mocks/BufferMock.h b/src/dawn/tests/unittests/native/mocks/BufferMock.h similarity index 100% rename from src/tests/unittests/native/mocks/BufferMock.h rename to src/dawn/tests/unittests/native/mocks/BufferMock.h diff --git a/src/tests/unittests/native/mocks/CommandBufferMock.h b/src/dawn/tests/unittests/native/mocks/CommandBufferMock.h similarity index 100% rename from src/tests/unittests/native/mocks/CommandBufferMock.h rename to src/dawn/tests/unittests/native/mocks/CommandBufferMock.h diff --git a/src/tests/unittests/native/mocks/ComputePipelineMock.h b/src/dawn/tests/unittests/native/mocks/ComputePipelineMock.h similarity index 100% rename from src/tests/unittests/native/mocks/ComputePipelineMock.h rename to src/dawn/tests/unittests/native/mocks/ComputePipelineMock.h diff --git a/src/tests/unittests/native/mocks/DeviceMock.h b/src/dawn/tests/unittests/native/mocks/DeviceMock.h similarity index 100% rename from src/tests/unittests/native/mocks/DeviceMock.h rename to src/dawn/tests/unittests/native/mocks/DeviceMock.h diff --git a/src/tests/unittests/native/mocks/ExternalTextureMock.h b/src/dawn/tests/unittests/native/mocks/ExternalTextureMock.h similarity index 100% rename from src/tests/unittests/native/mocks/ExternalTextureMock.h rename to src/dawn/tests/unittests/native/mocks/ExternalTextureMock.h diff --git a/src/tests/unittests/native/mocks/PipelineLayoutMock.h b/src/dawn/tests/unittests/native/mocks/PipelineLayoutMock.h similarity index 100% rename from src/tests/unittests/native/mocks/PipelineLayoutMock.h rename to src/dawn/tests/unittests/native/mocks/PipelineLayoutMock.h diff --git a/src/tests/unittests/native/mocks/QuerySetMock.h b/src/dawn/tests/unittests/native/mocks/QuerySetMock.h similarity index 100% rename from src/tests/unittests/native/mocks/QuerySetMock.h rename to src/dawn/tests/unittests/native/mocks/QuerySetMock.h diff --git a/src/tests/unittests/native/mocks/RenderPipelineMock.h b/src/dawn/tests/unittests/native/mocks/RenderPipelineMock.h similarity index 100% rename from src/tests/unittests/native/mocks/RenderPipelineMock.h rename to src/dawn/tests/unittests/native/mocks/RenderPipelineMock.h diff --git a/src/tests/unittests/native/mocks/SamplerMock.h b/src/dawn/tests/unittests/native/mocks/SamplerMock.h similarity index 100% rename from src/tests/unittests/native/mocks/SamplerMock.h rename to src/dawn/tests/unittests/native/mocks/SamplerMock.h diff --git a/src/tests/unittests/native/mocks/ShaderModuleMock.cpp b/src/dawn/tests/unittests/native/mocks/ShaderModuleMock.cpp similarity index 100% rename from src/tests/unittests/native/mocks/ShaderModuleMock.cpp rename to src/dawn/tests/unittests/native/mocks/ShaderModuleMock.cpp diff --git a/src/tests/unittests/native/mocks/ShaderModuleMock.h b/src/dawn/tests/unittests/native/mocks/ShaderModuleMock.h similarity index 100% rename from src/tests/unittests/native/mocks/ShaderModuleMock.h rename to src/dawn/tests/unittests/native/mocks/ShaderModuleMock.h diff --git a/src/tests/unittests/native/mocks/SwapChainMock.h b/src/dawn/tests/unittests/native/mocks/SwapChainMock.h similarity index 100% rename from src/tests/unittests/native/mocks/SwapChainMock.h rename to src/dawn/tests/unittests/native/mocks/SwapChainMock.h diff --git a/src/tests/unittests/native/mocks/TextureMock.h b/src/dawn/tests/unittests/native/mocks/TextureMock.h similarity index 100% rename from src/tests/unittests/native/mocks/TextureMock.h rename to src/dawn/tests/unittests/native/mocks/TextureMock.h diff --git a/src/tests/unittests/validation/BindGroupValidationTests.cpp b/src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/BindGroupValidationTests.cpp rename to src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp index b58809428e9..33ea7fcadf8 100644 --- a/src/tests/unittests/validation/BindGroupValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/unittests/validation/BufferValidationTests.cpp b/src/dawn/tests/unittests/validation/BufferValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/BufferValidationTests.cpp rename to src/dawn/tests/unittests/validation/BufferValidationTests.cpp index 71d28684a98..9ec4ae6710f 100644 --- a/src/tests/unittests/validation/BufferValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/BufferValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include diff --git a/src/tests/unittests/validation/CommandBufferValidationTests.cpp b/src/dawn/tests/unittests/validation/CommandBufferValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/CommandBufferValidationTests.cpp rename to src/dawn/tests/unittests/validation/CommandBufferValidationTests.cpp index 4e17c1e034c..784c8aa17d2 100644 --- a/src/tests/unittests/validation/CommandBufferValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/CommandBufferValidationTests.cpp @@ -16,7 +16,7 @@ #include "dawn/native/CommandEncoder.h" -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/ComputeIndirectValidationTests.cpp b/src/dawn/tests/unittests/validation/ComputeIndirectValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/ComputeIndirectValidationTests.cpp rename to src/dawn/tests/unittests/validation/ComputeIndirectValidationTests.cpp index 5faca9c8249..6d62e345ba7 100644 --- a/src/tests/unittests/validation/ComputeIndirectValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/ComputeIndirectValidationTests.cpp @@ -14,8 +14,8 @@ #include #include +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class ComputeIndirectValidationTest : public ValidationTest { protected: diff --git a/src/tests/unittests/validation/ComputeValidationTests.cpp b/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/ComputeValidationTests.cpp rename to src/dawn/tests/unittests/validation/ComputeValidationTests.cpp index 435c88016a8..ec4a74d42bd 100644 --- a/src/tests/unittests/validation/ComputeValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp @@ -13,8 +13,8 @@ // limitations under the License. #include "dawn/common/Constants.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" // TODO(cwallez@chromium.org): Add a regression test for Disptach validation trying to acces the // input state. diff --git a/src/tests/unittests/validation/CopyCommandsValidationTests.cpp b/src/dawn/tests/unittests/validation/CopyCommandsValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/CopyCommandsValidationTests.cpp rename to src/dawn/tests/unittests/validation/CopyCommandsValidationTests.cpp index cdd70b4f0d9..825717122f0 100644 --- a/src/tests/unittests/validation/CopyCommandsValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/CopyCommandsValidationTests.cpp @@ -15,10 +15,10 @@ #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/TestUtils.h" #include "dawn/utils/TextureUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class CopyCommandTest : public ValidationTest { protected: diff --git a/src/tests/unittests/validation/CopyTextureForBrowserTests.cpp b/src/dawn/tests/unittests/validation/CopyTextureForBrowserTests.cpp similarity index 99% rename from src/tests/unittests/validation/CopyTextureForBrowserTests.cpp rename to src/dawn/tests/unittests/validation/CopyTextureForBrowserTests.cpp index 5bff5d240ce..5981a0b7638 100644 --- a/src/tests/unittests/validation/CopyTextureForBrowserTests.cpp +++ b/src/dawn/tests/unittests/validation/CopyTextureForBrowserTests.cpp @@ -15,10 +15,10 @@ #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/TestUtils.h" #include "dawn/utils/TextureUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class CopyTextureForBrowserTest : public ValidationTest { protected: diff --git a/src/tests/unittests/validation/DebugMarkerValidationTests.cpp b/src/dawn/tests/unittests/validation/DebugMarkerValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/DebugMarkerValidationTests.cpp rename to src/dawn/tests/unittests/validation/DebugMarkerValidationTests.cpp index c78020b8bf8..7fd283bddc0 100644 --- a/src/tests/unittests/validation/DebugMarkerValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/DebugMarkerValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/DeviceValidationTests.cpp b/src/dawn/tests/unittests/validation/DeviceValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/DeviceValidationTests.cpp rename to src/dawn/tests/unittests/validation/DeviceValidationTests.cpp index c5d3535237d..cd297d3b27c 100644 --- a/src/tests/unittests/validation/DeviceValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/DeviceValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/native/Device.h" #include "dawn/native/dawn_platform.h" diff --git a/src/tests/unittests/validation/DrawIndirectValidationTests.cpp b/src/dawn/tests/unittests/validation/DrawIndirectValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/DrawIndirectValidationTests.cpp rename to src/dawn/tests/unittests/validation/DrawIndirectValidationTests.cpp index ee3988e4b58..d004e93294d 100644 --- a/src/tests/unittests/validation/DrawIndirectValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/DrawIndirectValidationTests.cpp @@ -14,9 +14,9 @@ #include #include +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class DrawIndirectValidationTest : public ValidationTest { protected: diff --git a/src/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp b/src/dawn/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp rename to src/dawn/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp index cd8a19a7c19..c0eacff748d 100644 --- a/src/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Constants.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/unittests/validation/DynamicStateCommandValidationTests.cpp b/src/dawn/tests/unittests/validation/DynamicStateCommandValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/DynamicStateCommandValidationTests.cpp rename to src/dawn/tests/unittests/validation/DynamicStateCommandValidationTests.cpp index dba6c17c0c8..7268c00f7fe 100644 --- a/src/tests/unittests/validation/DynamicStateCommandValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/DynamicStateCommandValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/ErrorScopeValidationTests.cpp b/src/dawn/tests/unittests/validation/ErrorScopeValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/ErrorScopeValidationTests.cpp rename to src/dawn/tests/unittests/validation/ErrorScopeValidationTests.cpp index ab72b1fd826..ca2dfe9bdd7 100644 --- a/src/tests/unittests/validation/ErrorScopeValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/ErrorScopeValidationTests.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/MockCallback.h" -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/MockCallback.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include diff --git a/src/tests/unittests/validation/ExternalTextureTests.cpp b/src/dawn/tests/unittests/validation/ExternalTextureTests.cpp similarity index 99% rename from src/tests/unittests/validation/ExternalTextureTests.cpp rename to src/dawn/tests/unittests/validation/ExternalTextureTests.cpp index 8e3d42319de..61aa8f032ab 100644 --- a/src/tests/unittests/validation/ExternalTextureTests.cpp +++ b/src/dawn/tests/unittests/validation/ExternalTextureTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp rename to src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp index bec883b8bcf..68283638ddb 100644 --- a/src/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/IndexBufferValidationTests.cpp b/src/dawn/tests/unittests/validation/IndexBufferValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/IndexBufferValidationTests.cpp rename to src/dawn/tests/unittests/validation/IndexBufferValidationTests.cpp index 68817b9685e..404db884fcb 100644 --- a/src/tests/unittests/validation/IndexBufferValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/IndexBufferValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/unittests/validation/InternalUsageValidationTests.cpp b/src/dawn/tests/unittests/validation/InternalUsageValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/InternalUsageValidationTests.cpp rename to src/dawn/tests/unittests/validation/InternalUsageValidationTests.cpp index 738ff92c2ad..623697d292a 100644 --- a/src/tests/unittests/validation/InternalUsageValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/InternalUsageValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/LabelTests.cpp b/src/dawn/tests/unittests/validation/LabelTests.cpp similarity index 99% rename from src/tests/unittests/validation/LabelTests.cpp rename to src/dawn/tests/unittests/validation/LabelTests.cpp index f05df011080..5fe7a909e29 100644 --- a/src/tests/unittests/validation/LabelTests.cpp +++ b/src/dawn/tests/unittests/validation/LabelTests.cpp @@ -13,10 +13,10 @@ // limitations under the License. #include +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class LabelTest : public ValidationTest {}; diff --git a/src/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp b/src/dawn/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp rename to src/dawn/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp index 60254dbbde2..0b5f7f3c01d 100644 --- a/src/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Assert.h" #include "dawn/common/Constants.h" diff --git a/src/tests/unittests/validation/MultipleDeviceTests.cpp b/src/dawn/tests/unittests/validation/MultipleDeviceTests.cpp similarity index 97% rename from src/tests/unittests/validation/MultipleDeviceTests.cpp rename to src/dawn/tests/unittests/validation/MultipleDeviceTests.cpp index a5f12c26b08..f84748f6adb 100644 --- a/src/tests/unittests/validation/MultipleDeviceTests.cpp +++ b/src/dawn/tests/unittests/validation/MultipleDeviceTests.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" -#include "tests/MockCallback.h" +#include "dawn/tests/MockCallback.h" using namespace testing; diff --git a/src/tests/unittests/validation/OverridableConstantsValidationTests.cpp b/src/dawn/tests/unittests/validation/OverridableConstantsValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/OverridableConstantsValidationTests.cpp rename to src/dawn/tests/unittests/validation/OverridableConstantsValidationTests.cpp index 9fb6fccc19d..892cae7cd93 100644 --- a/src/tests/unittests/validation/OverridableConstantsValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/OverridableConstantsValidationTests.cpp @@ -13,8 +13,8 @@ // limitations under the License. #include "dawn/common/Constants.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class ComputePipelineOverridableConstantsValidationTest : public ValidationTest { protected: diff --git a/src/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp b/src/dawn/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp similarity index 99% rename from src/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp rename to src/dawn/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp index 8a582cd107f..bbb85891210 100644 --- a/src/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp +++ b/src/dawn/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp @@ -16,7 +16,7 @@ #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" constexpr static uint32_t kSize = 4; // Note that format Depth24PlusStencil8 has both depth and stencil aspects, so parameters diff --git a/src/tests/unittests/validation/QueryValidationTests.cpp b/src/dawn/tests/unittests/validation/QueryValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/QueryValidationTests.cpp rename to src/dawn/tests/unittests/validation/QueryValidationTests.cpp index 2e2bd5c5b03..6d7dce23165 100644 --- a/src/tests/unittests/validation/QueryValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/QueryValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp b/src/dawn/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp similarity index 97% rename from src/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp rename to src/dawn/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp index 0b2fc9a66d0..1adb1d2fe77 100644 --- a/src/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include diff --git a/src/tests/unittests/validation/QueueSubmitValidationTests.cpp b/src/dawn/tests/unittests/validation/QueueSubmitValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/QueueSubmitValidationTests.cpp rename to src/dawn/tests/unittests/validation/QueueSubmitValidationTests.cpp index fd5c51de3ea..f30ff716f36 100644 --- a/src/tests/unittests/validation/QueueSubmitValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/QueueSubmitValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/QueueWriteBufferValidationTests.cpp b/src/dawn/tests/unittests/validation/QueueWriteBufferValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/QueueWriteBufferValidationTests.cpp rename to src/dawn/tests/unittests/validation/QueueWriteBufferValidationTests.cpp index 8359686267c..ec03dbc124a 100644 --- a/src/tests/unittests/validation/QueueWriteBufferValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/QueueWriteBufferValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/QueueWriteTextureValidationTests.cpp b/src/dawn/tests/unittests/validation/QueueWriteTextureValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/QueueWriteTextureValidationTests.cpp rename to src/dawn/tests/unittests/validation/QueueWriteTextureValidationTests.cpp index 4c2a26e117c..79f28af8f51 100644 --- a/src/tests/unittests/validation/QueueWriteTextureValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/QueueWriteTextureValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Math.h" #include "dawn/utils/TestUtils.h" diff --git a/src/tests/unittests/validation/RenderBundleValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/RenderBundleValidationTests.cpp rename to src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp index 22c581cdd5d..79f53fd3b90 100644 --- a/src/tests/unittests/validation/RenderBundleValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/RenderBundleValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Constants.h" diff --git a/src/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp rename to src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp index 917bd0bf5bf..a99c6343ae8 100644 --- a/src/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Constants.h" diff --git a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/RenderPipelineValidationTests.cpp rename to src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp index 8fda1bc13c2..856ec2a54c9 100644 --- a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/RenderPipelineValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Constants.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp b/src/dawn/tests/unittests/validation/ResourceUsageTrackingTests.cpp similarity index 99% rename from src/tests/unittests/validation/ResourceUsageTrackingTests.cpp rename to src/dawn/tests/unittests/validation/ResourceUsageTrackingTests.cpp index 69d7d1ece80..53adeb6bb68 100644 --- a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp +++ b/src/dawn/tests/unittests/validation/ResourceUsageTrackingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/SamplerValidationTests.cpp b/src/dawn/tests/unittests/validation/SamplerValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/SamplerValidationTests.cpp rename to src/dawn/tests/unittests/validation/SamplerValidationTests.cpp index a3ad726ff08..dbf3ebc8e17 100644 --- a/src/tests/unittests/validation/SamplerValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/SamplerValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/ShaderModuleValidationTests.cpp b/src/dawn/tests/unittests/validation/ShaderModuleValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/ShaderModuleValidationTests.cpp rename to src/dawn/tests/unittests/validation/ShaderModuleValidationTests.cpp index 72a373b4319..31c511624b5 100644 --- a/src/tests/unittests/validation/ShaderModuleValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/ShaderModuleValidationTests.cpp @@ -16,7 +16,7 @@ #include "dawn/native/ShaderModule.h" -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/StorageTextureValidationTests.cpp b/src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/StorageTextureValidationTests.cpp rename to src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp index 5258de08815..cfe5973da50 100644 --- a/src/tests/unittests/validation/StorageTextureValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/StorageTextureValidationTests.cpp @@ -13,10 +13,10 @@ // limitations under the License. #include "dawn/common/Assert.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/TextureUtils.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" class StorageTextureValidationTests : public ValidationTest { protected: diff --git a/src/tests/unittests/validation/TextureSubresourceTests.cpp b/src/dawn/tests/unittests/validation/TextureSubresourceTests.cpp similarity index 99% rename from src/tests/unittests/validation/TextureSubresourceTests.cpp rename to src/dawn/tests/unittests/validation/TextureSubresourceTests.cpp index f6e38da6b37..428777c28c2 100644 --- a/src/tests/unittests/validation/TextureSubresourceTests.cpp +++ b/src/dawn/tests/unittests/validation/TextureSubresourceTests.cpp @@ -14,7 +14,7 @@ #include "dawn/utils/WGPUHelpers.h" -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" namespace { diff --git a/src/tests/unittests/validation/TextureValidationTests.cpp b/src/dawn/tests/unittests/validation/TextureValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/TextureValidationTests.cpp rename to src/dawn/tests/unittests/validation/TextureValidationTests.cpp index 138336d72ae..0b7f476e8ea 100644 --- a/src/tests/unittests/validation/TextureValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/TextureValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Constants.h" #include "dawn/common/Math.h" diff --git a/src/tests/unittests/validation/TextureViewValidationTests.cpp b/src/dawn/tests/unittests/validation/TextureViewValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/TextureViewValidationTests.cpp rename to src/dawn/tests/unittests/validation/TextureViewValidationTests.cpp index f4d950235a1..f56243ddc36 100644 --- a/src/tests/unittests/validation/TextureViewValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/TextureViewValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" namespace { diff --git a/src/tests/unittests/validation/ToggleValidationTests.cpp b/src/dawn/tests/unittests/validation/ToggleValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/ToggleValidationTests.cpp rename to src/dawn/tests/unittests/validation/ToggleValidationTests.cpp index 4e32af798cc..81892157a46 100644 --- a/src/tests/unittests/validation/ToggleValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/ToggleValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" namespace { diff --git a/src/tests/unittests/validation/UnsafeAPIValidationTests.cpp b/src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp similarity index 98% rename from src/tests/unittests/validation/UnsafeAPIValidationTests.cpp rename to src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp index 5d77b5074ad..a9d1c4b2bc3 100644 --- a/src/tests/unittests/validation/UnsafeAPIValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/MockCallback.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/MockCallback.h" namespace { using testing::HasSubstr; diff --git a/src/tests/unittests/validation/ValidationTest.cpp b/src/dawn/tests/unittests/validation/ValidationTest.cpp similarity index 98% rename from src/tests/unittests/validation/ValidationTest.cpp rename to src/dawn/tests/unittests/validation/ValidationTest.cpp index 34621683946..ba2ee464461 100644 --- a/src/tests/unittests/validation/ValidationTest.cpp +++ b/src/dawn/tests/unittests/validation/ValidationTest.cpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/common/Assert.h" #include "dawn/common/SystemUtils.h" #include "dawn/dawn_proc.h" #include "dawn/native/NullBackend.h" +#include "dawn/tests/ToggleParser.h" #include "dawn/utils/WireHelper.h" #include "dawn/webgpu.h" -#include "tests/ToggleParser.h" #include diff --git a/src/tests/unittests/validation/ValidationTest.h b/src/dawn/tests/unittests/validation/ValidationTest.h similarity index 100% rename from src/tests/unittests/validation/ValidationTest.h rename to src/dawn/tests/unittests/validation/ValidationTest.h diff --git a/src/tests/unittests/validation/VertexBufferValidationTests.cpp b/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/VertexBufferValidationTests.cpp rename to src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp index cccc274fb30..35e7889e112 100644 --- a/src/tests/unittests/validation/VertexBufferValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp @@ -14,7 +14,7 @@ #include -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderBundleEncoderDescriptor.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" diff --git a/src/tests/unittests/validation/VertexStateValidationTests.cpp b/src/dawn/tests/unittests/validation/VertexStateValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/VertexStateValidationTests.cpp rename to src/dawn/tests/unittests/validation/VertexStateValidationTests.cpp index 3fa8b3681c5..eeb2f6913a9 100644 --- a/src/tests/unittests/validation/VertexStateValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/VertexStateValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/VideoViewsValidationTests.cpp b/src/dawn/tests/unittests/validation/VideoViewsValidationTests.cpp similarity index 99% rename from src/tests/unittests/validation/VideoViewsValidationTests.cpp rename to src/dawn/tests/unittests/validation/VideoViewsValidationTests.cpp index ef5efff160a..7c8677b3610 100644 --- a/src/tests/unittests/validation/VideoViewsValidationTests.cpp +++ b/src/dawn/tests/unittests/validation/VideoViewsValidationTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/validation/WriteBufferTests.cpp b/src/dawn/tests/unittests/validation/WriteBufferTests.cpp similarity index 98% rename from src/tests/unittests/validation/WriteBufferTests.cpp rename to src/dawn/tests/unittests/validation/WriteBufferTests.cpp index 34ac429e367..0f5c9573e88 100644 --- a/src/tests/unittests/validation/WriteBufferTests.cpp +++ b/src/dawn/tests/unittests/validation/WriteBufferTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/validation/ValidationTest.h" +#include "dawn/tests/unittests/validation/ValidationTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" diff --git a/src/tests/unittests/wire/WireAdapterTests.cpp b/src/dawn/tests/unittests/wire/WireAdapterTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireAdapterTests.cpp rename to src/dawn/tests/unittests/wire/WireAdapterTests.cpp index 17be31abb13..c1d2d453c92 100644 --- a/src/tests/unittests/wire/WireAdapterTests.cpp +++ b/src/dawn/tests/unittests/wire/WireAdapterTests.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/MockCallback.h" -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/MockCallback.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" diff --git a/src/tests/unittests/wire/WireArgumentTests.cpp b/src/dawn/tests/unittests/wire/WireArgumentTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireArgumentTests.cpp rename to src/dawn/tests/unittests/wire/WireArgumentTests.cpp index dee30709901..72773010f3d 100644 --- a/src/tests/unittests/wire/WireArgumentTests.cpp +++ b/src/dawn/tests/unittests/wire/WireArgumentTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/common/Constants.h" diff --git a/src/tests/unittests/wire/WireBasicTests.cpp b/src/dawn/tests/unittests/wire/WireBasicTests.cpp similarity index 98% rename from src/tests/unittests/wire/WireBasicTests.cpp rename to src/dawn/tests/unittests/wire/WireBasicTests.cpp index 878b18494d7..abf5d9d6cc5 100644 --- a/src/tests/unittests/wire/WireBasicTests.cpp +++ b/src/dawn/tests/unittests/wire/WireBasicTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" using namespace testing; using namespace dawn::wire; diff --git a/src/tests/unittests/wire/WireBufferMappingTests.cpp b/src/dawn/tests/unittests/wire/WireBufferMappingTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireBufferMappingTests.cpp rename to src/dawn/tests/unittests/wire/WireBufferMappingTests.cpp index 29d8b25dc5d..eb831d83ab0 100644 --- a/src/tests/unittests/wire/WireBufferMappingTests.cpp +++ b/src/dawn/tests/unittests/wire/WireBufferMappingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" diff --git a/src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp b/src/dawn/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp rename to src/dawn/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp index 8a1a5ca3427..41db0917f2b 100644 --- a/src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp +++ b/src/dawn/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" diff --git a/src/tests/unittests/wire/WireDestroyObjectTests.cpp b/src/dawn/tests/unittests/wire/WireDestroyObjectTests.cpp similarity index 96% rename from src/tests/unittests/wire/WireDestroyObjectTests.cpp rename to src/dawn/tests/unittests/wire/WireDestroyObjectTests.cpp index 7850eda560f..658325ccaff 100644 --- a/src/tests/unittests/wire/WireDestroyObjectTests.cpp +++ b/src/dawn/tests/unittests/wire/WireDestroyObjectTests.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/MockCallback.h" -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/MockCallback.h" +#include "dawn/tests/unittests/wire/WireTest.h" using namespace testing; using namespace dawn::wire; diff --git a/src/tests/unittests/wire/WireDisconnectTests.cpp b/src/dawn/tests/unittests/wire/WireDisconnectTests.cpp similarity index 98% rename from src/tests/unittests/wire/WireDisconnectTests.cpp rename to src/dawn/tests/unittests/wire/WireDisconnectTests.cpp index 6f3ba384362..5ba589c0232 100644 --- a/src/tests/unittests/wire/WireDisconnectTests.cpp +++ b/src/dawn/tests/unittests/wire/WireDisconnectTests.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/common/Assert.h" +#include "dawn/tests/MockCallback.h" #include "dawn/wire/WireClient.h" -#include "tests/MockCallback.h" using namespace testing; using namespace dawn::wire; diff --git a/src/tests/unittests/wire/WireErrorCallbackTests.cpp b/src/dawn/tests/unittests/wire/WireErrorCallbackTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireErrorCallbackTests.cpp rename to src/dawn/tests/unittests/wire/WireErrorCallbackTests.cpp index c3e0a04e6a1..6ec0485f785 100644 --- a/src/tests/unittests/wire/WireErrorCallbackTests.cpp +++ b/src/dawn/tests/unittests/wire/WireErrorCallbackTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" diff --git a/src/tests/unittests/wire/WireExtensionTests.cpp b/src/dawn/tests/unittests/wire/WireExtensionTests.cpp similarity index 69% rename from src/tests/unittests/wire/WireExtensionTests.cpp rename to src/dawn/tests/unittests/wire/WireExtensionTests.cpp index cb155a63c0b..9e1ac58f0cd 100644 --- a/src/tests/unittests/wire/WireExtensionTests.cpp +++ b/src/dawn/tests/unittests/wire/WireExtensionTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" using namespace testing; using namespace dawn::wire; @@ -44,16 +44,16 @@ TEST_F(WireExtensionTests, ChainedStruct) { wgpuDeviceCreateRenderPipeline(device, &renderPipelineDesc); EXPECT_CALL(api, DeviceCreateRenderPipeline(apiDevice, NotNull())) - .WillOnce(Invoke([&](Unused, - const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { - const auto* ext = reinterpret_cast( - serverDesc->primitive.nextInChain); - EXPECT_EQ(ext->chain.sType, clientExt.chain.sType); - EXPECT_EQ(ext->clampDepth, true); - EXPECT_EQ(ext->chain.next, nullptr); - - return api.GetNewRenderPipeline(); - })); + .WillOnce(Invoke( + [&](Unused, const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { + const auto* ext = reinterpret_cast( + serverDesc->primitive.nextInChain); + EXPECT_EQ(ext->chain.sType, clientExt.chain.sType); + EXPECT_EQ(ext->clampDepth, true); + EXPECT_EQ(ext->chain.next, nullptr); + + return api.GetNewRenderPipeline(); + })); FlushClient(); } @@ -82,21 +82,21 @@ TEST_F(WireExtensionTests, MutlipleChainedStructs) { wgpuDeviceCreateRenderPipeline(device, &renderPipelineDesc); EXPECT_CALL(api, DeviceCreateRenderPipeline(apiDevice, NotNull())) - .WillOnce(Invoke([&](Unused, - const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { - const auto* ext1 = reinterpret_cast( - serverDesc->primitive.nextInChain); - EXPECT_EQ(ext1->chain.sType, clientExt1.chain.sType); - EXPECT_EQ(ext1->clampDepth, true); - - const auto* ext2 = reinterpret_cast( - ext1->chain.next); - EXPECT_EQ(ext2->chain.sType, clientExt2.chain.sType); - EXPECT_EQ(ext2->clampDepth, false); - EXPECT_EQ(ext2->chain.next, nullptr); - - return api.GetNewRenderPipeline(); - })); + .WillOnce(Invoke( + [&](Unused, const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { + const auto* ext1 = reinterpret_cast( + serverDesc->primitive.nextInChain); + EXPECT_EQ(ext1->chain.sType, clientExt1.chain.sType); + EXPECT_EQ(ext1->clampDepth, true); + + const auto* ext2 = + reinterpret_cast(ext1->chain.next); + EXPECT_EQ(ext2->chain.sType, clientExt2.chain.sType); + EXPECT_EQ(ext2->clampDepth, false); + EXPECT_EQ(ext2->chain.next, nullptr); + + return api.GetNewRenderPipeline(); + })); FlushClient(); // Swap the order of the chained structs. @@ -106,21 +106,21 @@ TEST_F(WireExtensionTests, MutlipleChainedStructs) { wgpuDeviceCreateRenderPipeline(device, &renderPipelineDesc); EXPECT_CALL(api, DeviceCreateRenderPipeline(apiDevice, NotNull())) - .WillOnce(Invoke([&](Unused, - const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { - const auto* ext2 = reinterpret_cast( - serverDesc->primitive.nextInChain); - EXPECT_EQ(ext2->chain.sType, clientExt2.chain.sType); - EXPECT_EQ(ext2->clampDepth, false); - - const auto* ext1 = reinterpret_cast( - ext2->chain.next); - EXPECT_EQ(ext1->chain.sType, clientExt1.chain.sType); - EXPECT_EQ(ext1->clampDepth, true); - EXPECT_EQ(ext1->chain.next, nullptr); - - return api.GetNewRenderPipeline(); - })); + .WillOnce(Invoke( + [&](Unused, const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { + const auto* ext2 = reinterpret_cast( + serverDesc->primitive.nextInChain); + EXPECT_EQ(ext2->chain.sType, clientExt2.chain.sType); + EXPECT_EQ(ext2->clampDepth, false); + + const auto* ext1 = + reinterpret_cast(ext2->chain.next); + EXPECT_EQ(ext1->chain.sType, clientExt1.chain.sType); + EXPECT_EQ(ext1->clampDepth, true); + EXPECT_EQ(ext1->chain.next, nullptr); + + return api.GetNewRenderPipeline(); + })); FlushClient(); } @@ -205,17 +205,17 @@ TEST_F(WireExtensionTests, ValidAndInvalidSTypeInChain) { wgpuDeviceCreateRenderPipeline(device, &renderPipelineDesc); EXPECT_CALL(api, DeviceCreateRenderPipeline(apiDevice, NotNull())) - .WillOnce(Invoke([&](Unused, - const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { - const auto* ext = reinterpret_cast( - serverDesc->primitive.nextInChain); - EXPECT_EQ(ext->chain.sType, clientExt1.chain.sType); - EXPECT_EQ(ext->clampDepth, true); - - EXPECT_EQ(ext->chain.next->sType, WGPUSType_Invalid); - EXPECT_EQ(ext->chain.next->next, nullptr); - return api.GetNewRenderPipeline(); - })); + .WillOnce(Invoke( + [&](Unused, const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { + const auto* ext = reinterpret_cast( + serverDesc->primitive.nextInChain); + EXPECT_EQ(ext->chain.sType, clientExt1.chain.sType); + EXPECT_EQ(ext->clampDepth, true); + + EXPECT_EQ(ext->chain.next->sType, WGPUSType_Invalid); + EXPECT_EQ(ext->chain.next->next, nullptr); + return api.GetNewRenderPipeline(); + })); FlushClient(); // Swap the order of the chained structs. @@ -225,17 +225,17 @@ TEST_F(WireExtensionTests, ValidAndInvalidSTypeInChain) { wgpuDeviceCreateRenderPipeline(device, &renderPipelineDesc); EXPECT_CALL(api, DeviceCreateRenderPipeline(apiDevice, NotNull())) - .WillOnce(Invoke([&](Unused, - const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { - EXPECT_EQ(serverDesc->primitive.nextInChain->sType, WGPUSType_Invalid); - - const auto* ext = reinterpret_cast( - serverDesc->primitive.nextInChain->next); - EXPECT_EQ(ext->chain.sType, clientExt1.chain.sType); - EXPECT_EQ(ext->clampDepth, true); - EXPECT_EQ(ext->chain.next, nullptr); - - return api.GetNewRenderPipeline(); - })); + .WillOnce(Invoke( + [&](Unused, const WGPURenderPipelineDescriptor* serverDesc) -> WGPURenderPipeline { + EXPECT_EQ(serverDesc->primitive.nextInChain->sType, WGPUSType_Invalid); + + const auto* ext = reinterpret_cast( + serverDesc->primitive.nextInChain->next); + EXPECT_EQ(ext->chain.sType, clientExt1.chain.sType); + EXPECT_EQ(ext->clampDepth, true); + EXPECT_EQ(ext->chain.next, nullptr); + + return api.GetNewRenderPipeline(); + })); FlushClient(); } diff --git a/src/tests/unittests/wire/WireInjectDeviceTests.cpp b/src/dawn/tests/unittests/wire/WireInjectDeviceTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireInjectDeviceTests.cpp rename to src/dawn/tests/unittests/wire/WireInjectDeviceTests.cpp index 172a8ef771b..fd3b25813df 100644 --- a/src/tests/unittests/wire/WireInjectDeviceTests.cpp +++ b/src/dawn/tests/unittests/wire/WireInjectDeviceTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" diff --git a/src/tests/unittests/wire/WireInjectInstanceTests.cpp b/src/dawn/tests/unittests/wire/WireInjectInstanceTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireInjectInstanceTests.cpp rename to src/dawn/tests/unittests/wire/WireInjectInstanceTests.cpp index bce0d915acc..eef7671bc94 100644 --- a/src/tests/unittests/wire/WireInjectInstanceTests.cpp +++ b/src/dawn/tests/unittests/wire/WireInjectInstanceTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" diff --git a/src/tests/unittests/wire/WireInjectSwapChainTests.cpp b/src/dawn/tests/unittests/wire/WireInjectSwapChainTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireInjectSwapChainTests.cpp rename to src/dawn/tests/unittests/wire/WireInjectSwapChainTests.cpp index 222eaa9b773..5bcc8a688c6 100644 --- a/src/tests/unittests/wire/WireInjectSwapChainTests.cpp +++ b/src/dawn/tests/unittests/wire/WireInjectSwapChainTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" diff --git a/src/tests/unittests/wire/WireInjectTextureTests.cpp b/src/dawn/tests/unittests/wire/WireInjectTextureTests.cpp similarity index 98% rename from src/tests/unittests/wire/WireInjectTextureTests.cpp rename to src/dawn/tests/unittests/wire/WireInjectTextureTests.cpp index e0591fe9765..991050b4530 100644 --- a/src/tests/unittests/wire/WireInjectTextureTests.cpp +++ b/src/dawn/tests/unittests/wire/WireInjectTextureTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" diff --git a/src/tests/unittests/wire/WireInstanceTests.cpp b/src/dawn/tests/unittests/wire/WireInstanceTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireInstanceTests.cpp rename to src/dawn/tests/unittests/wire/WireInstanceTests.cpp index da6e2c2077e..ab6ec71920a 100644 --- a/src/tests/unittests/wire/WireInstanceTests.cpp +++ b/src/dawn/tests/unittests/wire/WireInstanceTests.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/MockCallback.h" -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/MockCallback.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" #include "dawn/wire/WireServer.h" diff --git a/src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp b/src/dawn/tests/unittests/wire/WireMemoryTransferServiceTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp rename to src/dawn/tests/unittests/wire/WireMemoryTransferServiceTests.cpp index 4a051cec12a..530e31d0cf7 100644 --- a/src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp +++ b/src/dawn/tests/unittests/wire/WireMemoryTransferServiceTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/client/ClientMemoryTransferService_mock.h" #include "dawn/wire/server/ServerMemoryTransferService_mock.h" diff --git a/src/tests/unittests/wire/WireOptionalTests.cpp b/src/dawn/tests/unittests/wire/WireOptionalTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireOptionalTests.cpp rename to src/dawn/tests/unittests/wire/WireOptionalTests.cpp index e5da98f24a7..ca68cdd5052 100644 --- a/src/tests/unittests/wire/WireOptionalTests.cpp +++ b/src/dawn/tests/unittests/wire/WireOptionalTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" using namespace testing; using namespace dawn::wire; diff --git a/src/tests/unittests/wire/WireQueueTests.cpp b/src/dawn/tests/unittests/wire/WireQueueTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireQueueTests.cpp rename to src/dawn/tests/unittests/wire/WireQueueTests.cpp index cb6f391c8b1..31b9c1faf99 100644 --- a/src/tests/unittests/wire/WireQueueTests.cpp +++ b/src/dawn/tests/unittests/wire/WireQueueTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" diff --git a/src/tests/unittests/wire/WireShaderModuleTests.cpp b/src/dawn/tests/unittests/wire/WireShaderModuleTests.cpp similarity index 99% rename from src/tests/unittests/wire/WireShaderModuleTests.cpp rename to src/dawn/tests/unittests/wire/WireShaderModuleTests.cpp index bb0123ee3f8..9ffa6243aa4 100644 --- a/src/tests/unittests/wire/WireShaderModuleTests.cpp +++ b/src/dawn/tests/unittests/wire/WireShaderModuleTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/wire/WireClient.h" diff --git a/src/tests/unittests/wire/WireTest.cpp b/src/dawn/tests/unittests/wire/WireTest.cpp similarity index 99% rename from src/tests/unittests/wire/WireTest.cpp rename to src/dawn/tests/unittests/wire/WireTest.cpp index e5d9fd29820..cba143e6228 100644 --- a/src/tests/unittests/wire/WireTest.cpp +++ b/src/dawn/tests/unittests/wire/WireTest.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/unittests/wire/WireTest.h" +#include "dawn/tests/unittests/wire/WireTest.h" #include "dawn/dawn_proc.h" #include "dawn/utils/TerribleCommandBuffer.h" diff --git a/src/tests/unittests/wire/WireTest.h b/src/dawn/tests/unittests/wire/WireTest.h similarity index 100% rename from src/tests/unittests/wire/WireTest.h rename to src/dawn/tests/unittests/wire/WireTest.h diff --git a/src/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp b/src/dawn/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp similarity index 100% rename from src/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp rename to src/dawn/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp diff --git a/src/tests/white_box/BufferAllocatedSizeTests.cpp b/src/dawn/tests/white_box/BufferAllocatedSizeTests.cpp similarity index 98% rename from src/tests/white_box/BufferAllocatedSizeTests.cpp rename to src/dawn/tests/white_box/BufferAllocatedSizeTests.cpp index 9be4dc183f0..991c14583d2 100644 --- a/src/tests/white_box/BufferAllocatedSizeTests.cpp +++ b/src/dawn/tests/white_box/BufferAllocatedSizeTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/native/DawnNative.h" diff --git a/src/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp similarity index 99% rename from src/tests/white_box/D3D12DescriptorHeapTests.cpp rename to src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp index 7f81819343b..82fa79d3c83 100644 --- a/src/tests/white_box/D3D12DescriptorHeapTests.cpp +++ b/src/dawn/tests/white_box/D3D12DescriptorHeapTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/Device.h" #include "dawn/native/Toggles.h" diff --git a/src/tests/white_box/D3D12ResidencyTests.cpp b/src/dawn/tests/white_box/D3D12ResidencyTests.cpp similarity index 99% rename from src/tests/white_box/D3D12ResidencyTests.cpp rename to src/dawn/tests/white_box/D3D12ResidencyTests.cpp index 2959953c12e..8c454f2c32a 100644 --- a/src/tests/white_box/D3D12ResidencyTests.cpp +++ b/src/dawn/tests/white_box/D3D12ResidencyTests.cpp @@ -17,9 +17,9 @@ #include "dawn/native/d3d12/DeviceD3D12.h" #include "dawn/native/d3d12/ResidencyManagerD3D12.h" #include "dawn/native/d3d12/ShaderVisibleDescriptorAllocatorD3D12.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/ComboRenderPipelineDescriptor.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" #include diff --git a/src/tests/white_box/D3D12ResourceHeapTests.cpp b/src/dawn/tests/white_box/D3D12ResourceHeapTests.cpp similarity index 99% rename from src/tests/white_box/D3D12ResourceHeapTests.cpp rename to src/dawn/tests/white_box/D3D12ResourceHeapTests.cpp index 69afb3ba3c2..4ad2eacb5e1 100644 --- a/src/tests/white_box/D3D12ResourceHeapTests.cpp +++ b/src/dawn/tests/white_box/D3D12ResourceHeapTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/d3d12/BufferD3D12.h" #include "dawn/native/d3d12/TextureD3D12.h" diff --git a/src/tests/white_box/EGLImageWrappingTests.cpp b/src/dawn/tests/white_box/EGLImageWrappingTests.cpp similarity index 99% rename from src/tests/white_box/EGLImageWrappingTests.cpp rename to src/dawn/tests/white_box/EGLImageWrappingTests.cpp index 1d541d0a3d4..a6593fd0794 100644 --- a/src/tests/white_box/EGLImageWrappingTests.cpp +++ b/src/dawn/tests/white_box/EGLImageWrappingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/DynamicLib.h" #include "dawn/native/OpenGLBackend.h" diff --git a/src/tests/white_box/InternalResourceUsageTests.cpp b/src/dawn/tests/white_box/InternalResourceUsageTests.cpp similarity index 98% rename from src/tests/white_box/InternalResourceUsageTests.cpp rename to src/dawn/tests/white_box/InternalResourceUsageTests.cpp index 029bef9b1ff..5e46b504e9c 100644 --- a/src/tests/white_box/InternalResourceUsageTests.cpp +++ b/src/dawn/tests/white_box/InternalResourceUsageTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/dawn_platform.h" diff --git a/src/tests/white_box/InternalStorageBufferBindingTests.cpp b/src/dawn/tests/white_box/InternalStorageBufferBindingTests.cpp similarity index 99% rename from src/tests/white_box/InternalStorageBufferBindingTests.cpp rename to src/dawn/tests/white_box/InternalStorageBufferBindingTests.cpp index a4f4a79b096..c19ab5d156a 100644 --- a/src/tests/white_box/InternalStorageBufferBindingTests.cpp +++ b/src/dawn/tests/white_box/InternalStorageBufferBindingTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/BindGroupLayout.h" #include "dawn/native/Device.h" diff --git a/src/tests/white_box/MetalAutoreleasePoolTests.mm b/src/dawn/tests/white_box/MetalAutoreleasePoolTests.mm similarity index 98% rename from src/tests/white_box/MetalAutoreleasePoolTests.mm rename to src/dawn/tests/white_box/MetalAutoreleasePoolTests.mm index 8a4db410a4c..766f861c5bc 100644 --- a/src/tests/white_box/MetalAutoreleasePoolTests.mm +++ b/src/dawn/tests/white_box/MetalAutoreleasePoolTests.mm @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/metal/DeviceMTL.h" diff --git a/src/tests/white_box/QueryInternalShaderTests.cpp b/src/dawn/tests/white_box/QueryInternalShaderTests.cpp similarity index 99% rename from src/tests/white_box/QueryInternalShaderTests.cpp rename to src/dawn/tests/white_box/QueryInternalShaderTests.cpp index bfa9c09f7ee..b357a039047 100644 --- a/src/tests/white_box/QueryInternalShaderTests.cpp +++ b/src/dawn/tests/white_box/QueryInternalShaderTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/native/Buffer.h" #include "dawn/native/CommandEncoder.h" diff --git a/src/tests/white_box/VulkanErrorInjectorTests.cpp b/src/dawn/tests/white_box/VulkanErrorInjectorTests.cpp similarity index 99% rename from src/tests/white_box/VulkanErrorInjectorTests.cpp rename to src/dawn/tests/white_box/VulkanErrorInjectorTests.cpp index 5efd0987b6d..12499735d01 100644 --- a/src/tests/white_box/VulkanErrorInjectorTests.cpp +++ b/src/dawn/tests/white_box/VulkanErrorInjectorTests.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/DawnTest.h" +#include "dawn/tests/DawnTest.h" #include "dawn/common/Math.h" #include "dawn/common/vulkan_platform.h" diff --git a/src/tests/white_box/VulkanImageWrappingTests.cpp b/src/dawn/tests/white_box/VulkanImageWrappingTests.cpp similarity index 99% rename from src/tests/white_box/VulkanImageWrappingTests.cpp rename to src/dawn/tests/white_box/VulkanImageWrappingTests.cpp index 3b785f830f6..d3475c98acf 100644 --- a/src/tests/white_box/VulkanImageWrappingTests.cpp +++ b/src/dawn/tests/white_box/VulkanImageWrappingTests.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/white_box/VulkanImageWrappingTests.h" +#include "dawn/tests/white_box/VulkanImageWrappingTests.h" #include "dawn/common/Math.h" #include "dawn/native/vulkan/AdapterVk.h" #include "dawn/native/vulkan/DeviceVk.h" +#include "dawn/tests/DawnTest.h" #include "dawn/utils/WGPUHelpers.h" -#include "tests/DawnTest.h" namespace dawn::native { namespace vulkan { diff --git a/src/tests/white_box/VulkanImageWrappingTests.h b/src/dawn/tests/white_box/VulkanImageWrappingTests.h similarity index 100% rename from src/tests/white_box/VulkanImageWrappingTests.h rename to src/dawn/tests/white_box/VulkanImageWrappingTests.h diff --git a/src/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp b/src/dawn/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp similarity index 98% rename from src/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp rename to src/dawn/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp index a382822e4db..6c54924dad5 100644 --- a/src/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp +++ b/src/dawn/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/white_box/VulkanImageWrappingTests.h" +#include "dawn/tests/white_box/VulkanImageWrappingTests.h" #include #include @@ -186,4 +186,4 @@ namespace dawn::native::vulkan { backend->CreateGbmDevice(); return backend; } -} // namespace dawn::native::vulkan \ No newline at end of file +} // namespace dawn::native::vulkan diff --git a/src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp b/src/dawn/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp similarity index 99% rename from src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp rename to src/dawn/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp index a6f295587f3..b41abdb37e6 100644 --- a/src/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp +++ b/src/dawn/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tests/white_box/VulkanImageWrappingTests.h" +#include "dawn/tests/white_box/VulkanImageWrappingTests.h" #include "dawn/native/vulkan/DeviceVk.h" #include "dawn/native/vulkan/FencedDeleter.h" diff --git a/src/tests/BUILD.gn b/src/tests/BUILD.gn index f0088739e78..23b8d95b65a 100644 --- a/src/tests/BUILD.gn +++ b/src/tests/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2012 The Dawn Authors +# Copyright 2022 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. @@ -12,13 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. +################################################################################ +# A copy of src/dawn/tests/BUILD.gn +# These targets are referenced by external code. We cannot simply alias the +# targets in src/dawn/tests/BUILD.gn due to an issue with resolving runtime +# dependencies via 'group' aliases. This whole file should be removed once +# the external targets are updated to use the new BUILD.gn file. +# TODO(crbug.com/dawn/1275) - remove this file. +################################################################################ + import("../../scripts/dawn_overrides_with_defaults.gni") import("//testing/test.gni") import("${dawn_root}/generator/dawn_generator.gni") import("${dawn_root}/scripts/dawn_features.gni") -group("dawn_tests") { +group("tests") { testonly = true public_deps = [ ":dawn_end2end_tests_temp_group", @@ -32,613 +41,6 @@ group("dawn_tests") { ] } -############################################################################### -# Gtest Gmock - Handle building inside and outside of Chromium. -############################################################################### - -# When building outside of Chromium we need to define our own targets for GTest -# and GMock. However when compiling inside of Chromium we need to reuse the -# existing targets, both because Chromium has a special harness for swarming -# and because otherwise the "gn check" fails. - -if (!build_with_chromium) { - # When we aren't in Chromium we define out own targets based on the location - # of the googletest repo. - googletest_dir = dawn_googletest_dir - - config("gtest_config") { - include_dirs = [ - "${googletest_dir}/googletest", - "${googletest_dir}/googletest/include", - ] - } - - static_library("gtest") { - testonly = true - sources = [ "${googletest_dir}/googletest/src/gtest-all.cc" ] - public_configs = [ ":gtest_config" ] - } - - config("gmock_config") { - include_dirs = [ - "${googletest_dir}/googlemock", - "${googletest_dir}/googlemock/include", - "${googletest_dir}/googletest/include", - ] - } - - static_library("gmock") { - testonly = true - sources = [ "${googletest_dir}/googlemock/src/gmock-all.cc" ] - public_configs = [ ":gmock_config" ] - } - - group("gmock_and_gtest") { - testonly = true - public_deps = [ - ":gmock", - ":gtest", - ] - } -} else { - # When we are in Chromium we reuse its targets, and also add some deps that - # are needed to launch the test in swarming mode. - group("gmock_and_gtest") { - testonly = true - public_deps = [ - "//base", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] - } -} - -############################################################################### -# Wrapping of Chromium targets -############################################################################### - -# These targets are separated because they are Chromium sources files that -# can't use the dawn_internal config, otherwise Dawn's warning flags get -# applied while compiling a bunch of Chromium's //base (via header inclusion) -if (build_with_chromium) { - source_set("dawn_unittests_main") { - testonly = true - deps = [ ":gmock_and_gtest" ] - sources = [ "//gpu/dawn_unittests_main.cc" ] - } - source_set("dawn_end2end_tests_main") { - testonly = true - deps = [ ":gmock_and_gtest" ] - sources = [ "//gpu/dawn_end2end_tests_main.cc" ] - } - source_set("dawn_perf_tests_main") { - testonly = true - deps = [ ":gmock_and_gtest" ] - sources = [ "//gpu/dawn_perf_tests_main.cc" ] - } -} - -############################################################################### -# Dawn unittests -############################################################################### - -dawn_json_generator("mock_webgpu_gen") { - target = "mock_api" - outputs = [ - "src/dawn/mock_webgpu.h", - "src/dawn/mock_webgpu.cpp", - ] -} - -# Source code for mocks used for unit testing are separated from the rest of -# sources so that they aren't included in non-test builds. -source_set("dawn_native_mocks_sources") { - testonly = true - - deps = [ - ":gmock_and_gtest", - "${dawn_root}/src/dawn/native:sources", - "${dawn_root}/src/dawn/native:static", - "${dawn_root}/src/dawn/utils", - ] - - # Add internal dawn_native config for internal unittests. - configs += [ "${dawn_root}/src/dawn/native:internal" ] - - sources = [ - "unittests/native/mocks/BindGroupLayoutMock.h", - "unittests/native/mocks/BindGroupMock.h", - "unittests/native/mocks/CommandBufferMock.h", - "unittests/native/mocks/ComputePipelineMock.h", - "unittests/native/mocks/DeviceMock.h", - "unittests/native/mocks/ExternalTextureMock.h", - "unittests/native/mocks/PipelineLayoutMock.h", - "unittests/native/mocks/QuerySetMock.h", - "unittests/native/mocks/RenderPipelineMock.h", - "unittests/native/mocks/SamplerMock.h", - "unittests/native/mocks/ShaderModuleMock.cpp", - "unittests/native/mocks/ShaderModuleMock.h", - "unittests/native/mocks/SwapChainMock.h", - "unittests/native/mocks/TextureMock.h", - ] -} - -test("dawn_unittests") { - configs += [ "${dawn_root}/src/dawn/common:internal_config" ] - - deps = [ - ":dawn_native_mocks_sources", - ":gmock_and_gtest", - ":mock_webgpu_gen", - "${dawn_root}/src/dawn:cpp", - "${dawn_root}/src/dawn:proc", - "${dawn_root}/src/dawn/common", - "${dawn_root}/src/dawn/native:sources", - "${dawn_root}/src/dawn/native:static", - "${dawn_root}/src/dawn/utils", - "${dawn_root}/src/dawn/wire", - ] - - # Add internal dawn_native config for internal unittests. - configs += [ "${dawn_root}/src/dawn/native:internal" ] - - sources = get_target_outputs(":mock_webgpu_gen") - sources += [ - "${dawn_root}/src/dawn/wire/client/ClientMemoryTransferService_mock.cpp", - "${dawn_root}/src/dawn/wire/client/ClientMemoryTransferService_mock.h", - "${dawn_root}/src/dawn/wire/server/ServerMemoryTransferService_mock.cpp", - "${dawn_root}/src/dawn/wire/server/ServerMemoryTransferService_mock.h", - "DawnNativeTest.cpp", - "DawnNativeTest.h", - "MockCallback.h", - "ToggleParser.cpp", - "ToggleParser.h", - "unittests/AsyncTaskTests.cpp", - "unittests/BitSetIteratorTests.cpp", - "unittests/BuddyAllocatorTests.cpp", - "unittests/BuddyMemoryAllocatorTests.cpp", - "unittests/ChainUtilsTests.cpp", - "unittests/CommandAllocatorTests.cpp", - "unittests/ConcurrentCacheTests.cpp", - "unittests/EnumClassBitmasksTests.cpp", - "unittests/EnumMaskIteratorTests.cpp", - "unittests/ErrorTests.cpp", - "unittests/FeatureTests.cpp", - "unittests/GPUInfoTests.cpp", - "unittests/GetProcAddressTests.cpp", - "unittests/ITypArrayTests.cpp", - "unittests/ITypBitsetTests.cpp", - "unittests/ITypSpanTests.cpp", - "unittests/ITypVectorTests.cpp", - "unittests/LimitsTests.cpp", - "unittests/LinkedListTests.cpp", - "unittests/MathTests.cpp", - "unittests/ObjectBaseTests.cpp", - "unittests/PerStageTests.cpp", - "unittests/PerThreadProcTests.cpp", - "unittests/PlacementAllocatedTests.cpp", - "unittests/RefBaseTests.cpp", - "unittests/RefCountedTests.cpp", - "unittests/ResultTests.cpp", - "unittests/RingBufferAllocatorTests.cpp", - "unittests/SerialMapTests.cpp", - "unittests/SerialQueueTests.cpp", - "unittests/SlabAllocatorTests.cpp", - "unittests/StackContainerTests.cpp", - "unittests/SubresourceStorageTests.cpp", - "unittests/SystemUtilsTests.cpp", - "unittests/ToBackendTests.cpp", - "unittests/TypedIntegerTests.cpp", - "unittests/native/CommandBufferEncodingTests.cpp", - "unittests/native/DestroyObjectTests.cpp", - "unittests/native/DeviceCreationTests.cpp", - "unittests/validation/BindGroupValidationTests.cpp", - "unittests/validation/BufferValidationTests.cpp", - "unittests/validation/CommandBufferValidationTests.cpp", - "unittests/validation/ComputeIndirectValidationTests.cpp", - "unittests/validation/ComputeValidationTests.cpp", - "unittests/validation/CopyCommandsValidationTests.cpp", - "unittests/validation/CopyTextureForBrowserTests.cpp", - "unittests/validation/DebugMarkerValidationTests.cpp", - "unittests/validation/DeviceValidationTests.cpp", - "unittests/validation/DrawIndirectValidationTests.cpp", - "unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp", - "unittests/validation/DynamicStateCommandValidationTests.cpp", - "unittests/validation/ErrorScopeValidationTests.cpp", - "unittests/validation/ExternalTextureTests.cpp", - "unittests/validation/GetBindGroupLayoutValidationTests.cpp", - "unittests/validation/IndexBufferValidationTests.cpp", - "unittests/validation/InternalUsageValidationTests.cpp", - "unittests/validation/LabelTests.cpp", - "unittests/validation/MinimumBufferSizeValidationTests.cpp", - "unittests/validation/MultipleDeviceTests.cpp", - "unittests/validation/OverridableConstantsValidationTests.cpp", - "unittests/validation/PipelineAndPassCompatibilityTests.cpp", - "unittests/validation/QueryValidationTests.cpp", - "unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp", - "unittests/validation/QueueSubmitValidationTests.cpp", - "unittests/validation/QueueWriteBufferValidationTests.cpp", - "unittests/validation/QueueWriteTextureValidationTests.cpp", - "unittests/validation/RenderBundleValidationTests.cpp", - "unittests/validation/RenderPassDescriptorValidationTests.cpp", - "unittests/validation/RenderPipelineValidationTests.cpp", - "unittests/validation/ResourceUsageTrackingTests.cpp", - "unittests/validation/SamplerValidationTests.cpp", - "unittests/validation/ShaderModuleValidationTests.cpp", - "unittests/validation/StorageTextureValidationTests.cpp", - "unittests/validation/TextureSubresourceTests.cpp", - "unittests/validation/TextureValidationTests.cpp", - "unittests/validation/TextureViewValidationTests.cpp", - "unittests/validation/ToggleValidationTests.cpp", - "unittests/validation/UnsafeAPIValidationTests.cpp", - "unittests/validation/ValidationTest.cpp", - "unittests/validation/ValidationTest.h", - "unittests/validation/VertexBufferValidationTests.cpp", - "unittests/validation/VertexStateValidationTests.cpp", - "unittests/validation/VideoViewsValidationTests.cpp", - "unittests/validation/WriteBufferTests.cpp", - "unittests/wire/WireAdapterTests.cpp", - "unittests/wire/WireArgumentTests.cpp", - "unittests/wire/WireBasicTests.cpp", - "unittests/wire/WireBufferMappingTests.cpp", - "unittests/wire/WireCreatePipelineAsyncTests.cpp", - "unittests/wire/WireDestroyObjectTests.cpp", - "unittests/wire/WireDisconnectTests.cpp", - "unittests/wire/WireErrorCallbackTests.cpp", - "unittests/wire/WireExtensionTests.cpp", - "unittests/wire/WireInjectDeviceTests.cpp", - "unittests/wire/WireInjectInstanceTests.cpp", - "unittests/wire/WireInjectSwapChainTests.cpp", - "unittests/wire/WireInjectTextureTests.cpp", - "unittests/wire/WireInstanceTests.cpp", - "unittests/wire/WireMemoryTransferServiceTests.cpp", - "unittests/wire/WireOptionalTests.cpp", - "unittests/wire/WireQueueTests.cpp", - "unittests/wire/WireShaderModuleTests.cpp", - "unittests/wire/WireTest.cpp", - "unittests/wire/WireTest.h", - "unittests/wire/WireWGPUDevicePropertiesTests.cpp", - ] - - if (is_win) { - sources += [ "unittests/WindowsUtilsTests.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) { - deps += [ ":dawn_unittests_main" ] - } else { - sources += [ "UnittestsMain.cpp" ] - } -} - -############################################################################### -# Dawn end2end tests targets -############################################################################### - -source_set("dawn_end2end_tests_sources") { - configs += [ "${dawn_root}/src/dawn/common:internal_config" ] - testonly = true - - deps = [ - ":gmock_and_gtest", - "${dawn_root}/src/dawn:cpp", - "${dawn_root}/src/dawn:proc", - "${dawn_root}/src/dawn/common", - - # Statically linked because the end2end white_box tests use Dawn internals. - "${dawn_root}/src/dawn/native:static", - "${dawn_root}/src/dawn/utils", - "${dawn_root}/src/dawn/wire", - ] - - sources = [ - "DawnTest.h", - "MockCallback.h", - "ParamGenerator.h", - "ToggleParser.cpp", - "ToggleParser.h", - "end2end/AdapterDiscoveryTests.cpp", - "end2end/BasicTests.cpp", - "end2end/BindGroupTests.cpp", - "end2end/BufferTests.cpp", - "end2end/BufferZeroInitTests.cpp", - "end2end/ClipSpaceTests.cpp", - "end2end/ColorStateTests.cpp", - "end2end/CommandEncoderTests.cpp", - "end2end/CompressedTextureFormatTests.cpp", - "end2end/ComputeCopyStorageBufferTests.cpp", - "end2end/ComputeDispatchTests.cpp", - "end2end/ComputeLayoutMemoryBufferTests.cpp", - "end2end/ComputeSharedMemoryTests.cpp", - "end2end/ComputeStorageBufferBarrierTests.cpp", - "end2end/CopyTests.cpp", - "end2end/CopyTextureForBrowserTests.cpp", - "end2end/CreatePipelineAsyncTests.cpp", - "end2end/CullingTests.cpp", - "end2end/DebugMarkerTests.cpp", - "end2end/DeprecatedAPITests.cpp", - "end2end/DepthBiasTests.cpp", - "end2end/DepthStencilCopyTests.cpp", - "end2end/DepthStencilLoadOpTests.cpp", - "end2end/DepthStencilSamplingTests.cpp", - "end2end/DepthStencilStateTests.cpp", - "end2end/DestroyTests.cpp", - "end2end/DeviceInitializationTests.cpp", - "end2end/DeviceLostTests.cpp", - "end2end/DrawIndexedIndirectTests.cpp", - "end2end/DrawIndexedTests.cpp", - "end2end/DrawIndirectTests.cpp", - "end2end/DrawTests.cpp", - "end2end/DynamicBufferOffsetTests.cpp", - "end2end/EntryPointTests.cpp", - "end2end/ExternalTextureTests.cpp", - "end2end/FirstIndexOffsetTests.cpp", - "end2end/GpuMemorySynchronizationTests.cpp", - "end2end/IndexFormatTests.cpp", - "end2end/MaxLimitTests.cpp", - "end2end/MemoryAllocationStressTests.cpp", - "end2end/MultisampledRenderingTests.cpp", - "end2end/MultisampledSamplingTests.cpp", - "end2end/NonzeroBufferCreationTests.cpp", - "end2end/NonzeroTextureCreationTests.cpp", - "end2end/ObjectCachingTests.cpp", - "end2end/OpArrayLengthTests.cpp", - "end2end/PipelineLayoutTests.cpp", - "end2end/PrimitiveStateTests.cpp", - "end2end/PrimitiveTopologyTests.cpp", - "end2end/QueryTests.cpp", - "end2end/QueueTests.cpp", - "end2end/QueueTimelineTests.cpp", - "end2end/ReadOnlyDepthStencilAttachmentTests.cpp", - "end2end/RenderAttachmentTests.cpp", - "end2end/RenderBundleTests.cpp", - "end2end/RenderPassLoadOpTests.cpp", - "end2end/RenderPassTests.cpp", - "end2end/SamplerFilterAnisotropicTests.cpp", - "end2end/SamplerTests.cpp", - "end2end/ScissorTests.cpp", - "end2end/ShaderFloat16Tests.cpp", - "end2end/ShaderTests.cpp", - "end2end/StorageTextureTests.cpp", - "end2end/SubresourceRenderAttachmentTests.cpp", - "end2end/Texture3DTests.cpp", - "end2end/TextureFormatTests.cpp", - "end2end/TextureSubresourceTests.cpp", - "end2end/TextureViewTests.cpp", - "end2end/TextureZeroInitTests.cpp", - "end2end/VertexFormatTests.cpp", - "end2end/VertexOnlyRenderPipelineTests.cpp", - "end2end/VertexStateTests.cpp", - "end2end/ViewportOrientationTests.cpp", - "end2end/ViewportTests.cpp", - ] - - # Validation tests that need OS windows live in end2end tests. - sources += [ - "unittests/validation/ValidationTest.cpp", - "unittests/validation/ValidationTest.h", - ] - - libs = [] - - if (dawn_enable_d3d12) { - sources += [ - "end2end/D3D12CachingTests.cpp", - "end2end/D3D12ResourceWrappingTests.cpp", - "end2end/VideoViewsTests_win.cpp", - ] - libs += [ - "d3d11.lib", - "dxgi.lib", - ] - } - - if (dawn_enable_metal) { - sources += [ "end2end/IOSurfaceWrappingTests.cpp" ] - frameworks = [ "IOSurface.framework" ] - } - - if (dawn_enable_opengl) { - assert(dawn_supports_glfw_for_windowing) - } - - if (dawn_supports_glfw_for_windowing) { - sources += [ - "end2end/SwapChainTests.cpp", - "end2end/SwapChainValidationTests.cpp", - "end2end/WindowSurfaceTests.cpp", - ] - deps += [ "${dawn_root}/src/dawn/utils:glfw" ] - } - - if (dawn_enable_d3d12 || (dawn_enable_vulkan && is_chromeos)) { - sources += [ - "end2end/VideoViewsTests.cpp", - "end2end/VideoViewsTests.h", - ] - } - - if (dawn_enable_vulkan && is_chromeos) { - sources += [ "end2end/VideoViewsTests_gbm.cpp" ] - } -} - -source_set("dawn_white_box_tests_sources") { - configs += [ "${dawn_root}/src/dawn/native:internal" ] - testonly = true - - deps = [ - ":gmock_and_gtest", - "${dawn_root}/src/dawn:cpp", - "${dawn_root}/src/dawn:proc", - "${dawn_root}/src/dawn/common", - "${dawn_root}/src/dawn/native:sources", - - # Statically linked because the end2end white_box tests use Dawn internals. - "${dawn_root}/src/dawn/native:static", - "${dawn_root}/src/dawn/utils", - "${dawn_root}/src/dawn/wire", - ] - - sources = [ - "DawnTest.h", - "ParamGenerator.h", - "ToggleParser.h", - ] - - if (dawn_enable_vulkan) { - deps += [ "${dawn_root}/third_party/khronos:vulkan_headers" ] - - if (is_chromeos) { - sources += [ - "white_box/VulkanImageWrappingTests.cpp", - "white_box/VulkanImageWrappingTests.h", - "white_box/VulkanImageWrappingTests_DmaBuf.cpp", - ] - } else if (is_linux) { - sources += [ - "white_box/VulkanImageWrappingTests.cpp", - "white_box/VulkanImageWrappingTests.h", - "white_box/VulkanImageWrappingTests_OpaqueFD.cpp", - ] - } - - if (dawn_enable_error_injection) { - sources += [ "white_box/VulkanErrorInjectorTests.cpp" ] - } - } - - sources += [ - "white_box/BufferAllocatedSizeTests.cpp", - "white_box/InternalResourceUsageTests.cpp", - "white_box/InternalStorageBufferBindingTests.cpp", - "white_box/QueryInternalShaderTests.cpp", - ] - - if (dawn_enable_d3d12) { - sources += [ - "white_box/D3D12DescriptorHeapTests.cpp", - "white_box/D3D12ResidencyTests.cpp", - "white_box/D3D12ResourceHeapTests.cpp", - ] - } - - if (dawn_enable_metal) { - sources += [ "white_box/MetalAutoreleasePoolTests.mm" ] - } - - if (dawn_enable_opengl) { - deps += [ "${dawn_root}/src/dawn/utils:glfw" ] - } - - if (dawn_enable_opengles) { - sources += [ "white_box/EGLImageWrappingTests.cpp" ] - deps += [ "//third_party/angle:libEGL" ] - } - - libs = [] -} - -test("dawn_end2end_tests") { - configs += [ "${dawn_root}/src/dawn/common:internal_config" ] - - deps = [ - ":dawn_end2end_tests_sources", - ":dawn_white_box_tests_sources", - ":gmock_and_gtest", - "${dawn_root}/src/dawn:cpp", - "${dawn_root}/src/dawn:proc", - "${dawn_root}/src/dawn/common", - "${dawn_root}/src/dawn/native:static", - "${dawn_root}/src/dawn/utils", - "${dawn_root}/src/dawn/wire", - ] - - sources = [ - "DawnTest.cpp", - "DawnTest.h", - ] - - libs = [] - - # When building inside Chromium, use their gtest main function because it is - # needed to run in swarming correctly. - if (build_with_chromium) { - deps += [ ":dawn_end2end_tests_main" ] - } else { - sources += [ "End2EndTestsMain.cpp" ] - } - - if (dawn_enable_opengl) { - deps += [ "${dawn_root}/src/dawn/utils:glfw" ] - } - - if (is_chromeos) { - libs += [ "gbm" ] - } -} - -############################################################################### -# Dawn perf tests -############################################################################### - -test("dawn_perf_tests") { - configs += [ "${dawn_root}/src/dawn/common:internal_config" ] - - deps = [ - ":gmock_and_gtest", - "${dawn_root}/src/dawn:cpp", - "${dawn_root}/src/dawn:proc", - "${dawn_root}/src/dawn/common", - "${dawn_root}/src/dawn/native", - "${dawn_root}/src/dawn/utils", - "${dawn_root}/src/dawn/wire", - "${dawn_root}/src/dawn_platform", - ] - - sources = [ - "DawnTest.cpp", - "DawnTest.h", - "ParamGenerator.h", - "ToggleParser.cpp", - "ToggleParser.h", - "perf_tests/BufferUploadPerf.cpp", - "perf_tests/DawnPerfTest.cpp", - "perf_tests/DawnPerfTest.h", - "perf_tests/DawnPerfTestPlatform.cpp", - "perf_tests/DawnPerfTestPlatform.h", - "perf_tests/DrawCallPerf.cpp", - "perf_tests/ShaderRobustnessPerf.cpp", - "perf_tests/SubresourceTrackingPerf.cpp", - ] - - libs = [] - - # When building inside Chromium, use their gtest main function and the - # other perf test scaffolding in order to run in swarming correctly. - if (build_with_chromium) { - deps += [ ":dawn_perf_tests_main" ] - data_deps = [ "//testing:run_perf_test" ] - } else { - sources += [ "PerfTestsMain.cpp" ] - } - - if (dawn_enable_metal) { - frameworks = [ "IOSurface.framework" ] - } - - if (dawn_enable_opengl) { - deps += [ "${dawn_root}/src/dawn/utils:glfw" ] - } -} - ############################################################################### # Temporary Dawn test targets and groups - crbug.com/dawn/1275 ############################################################################### @@ -651,8 +53,8 @@ test("dawn_perf_tests") { group("dawn_unittests_temp_group") { testonly = true - public_deps = [ ":dawn_unittests" ] - data_deps = [ ":dawn_unittests" ] + public_deps = [ "${dawn_root}/src/dawn/tests:dawn_unittests" ] + data_deps = [ "${dawn_root}/src/dawn/tests:dawn_unittests" ] } group("dawn_end2end_tests_temp_group") { @@ -671,20 +73,20 @@ test("dawn_end2end_tests_temp") { configs += [ "${dawn_root}/src/dawn/common:internal_config" ] deps = [ - ":dawn_end2end_tests_sources", - ":dawn_white_box_tests_sources", - ":gmock_and_gtest", "${dawn_root}/src/dawn:cpp", "${dawn_root}/src/dawn:proc", "${dawn_root}/src/dawn/common", "${dawn_root}/src/dawn/native:static", + "${dawn_root}/src/dawn/tests:end2end_tests_sources", + "${dawn_root}/src/dawn/tests:gmock_and_gtest", + "${dawn_root}/src/dawn/tests:white_box_tests_sources", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", ] sources = [ - "DawnTest.cpp", - "DawnTest.h", + "${dawn_root}/src/dawn/tests/DawnTest.cpp", + "${dawn_root}/src/dawn/tests/DawnTest.h", ] libs = [] @@ -692,9 +94,9 @@ test("dawn_end2end_tests_temp") { # When building inside Chromium, use their gtest main function because it is # needed to run in swarming correctly. if (build_with_chromium) { - deps += [ ":dawn_end2end_tests_main" ] + deps += [ "${dawn_root}/src/dawn/tests:end2end_tests_main" ] } else { - sources += [ "End2EndTestsMain.cpp" ] + sources += [ "${dawn_root}/src/dawn/tests/End2EndTestsMain.cpp" ] } if (dawn_enable_opengl) { @@ -710,30 +112,30 @@ test("dawn_perf_tests_temp") { configs += [ "${dawn_root}/src/dawn/common:internal_config" ] deps = [ - ":gmock_and_gtest", "${dawn_root}/src/dawn:cpp", "${dawn_root}/src/dawn:proc", "${dawn_root}/src/dawn/common", "${dawn_root}/src/dawn/native", + "${dawn_root}/src/dawn/tests:gmock_and_gtest", "${dawn_root}/src/dawn/utils", "${dawn_root}/src/dawn/wire", "${dawn_root}/src/dawn_platform", ] sources = [ - "DawnTest.cpp", - "DawnTest.h", - "ParamGenerator.h", - "ToggleParser.cpp", - "ToggleParser.h", - "perf_tests/BufferUploadPerf.cpp", - "perf_tests/DawnPerfTest.cpp", - "perf_tests/DawnPerfTest.h", - "perf_tests/DawnPerfTestPlatform.cpp", - "perf_tests/DawnPerfTestPlatform.h", - "perf_tests/DrawCallPerf.cpp", - "perf_tests/ShaderRobustnessPerf.cpp", - "perf_tests/SubresourceTrackingPerf.cpp", + "${dawn_root}/src/dawn/tests/DawnTest.cpp", + "${dawn_root}/src/dawn/tests/DawnTest.h", + "${dawn_root}/src/dawn/tests/ParamGenerator.h", + "${dawn_root}/src/dawn/tests/ToggleParser.cpp", + "${dawn_root}/src/dawn/tests/ToggleParser.h", + "${dawn_root}/src/dawn/tests/perf_tests/BufferUploadPerf.cpp", + "${dawn_root}/src/dawn/tests/perf_tests/DawnPerfTest.cpp", + "${dawn_root}/src/dawn/tests/perf_tests/DawnPerfTest.h", + "${dawn_root}/src/dawn/tests/perf_tests/DawnPerfTestPlatform.cpp", + "${dawn_root}/src/dawn/tests/perf_tests/DawnPerfTestPlatform.h", + "${dawn_root}/src/dawn/tests/perf_tests/DrawCallPerf.cpp", + "${dawn_root}/src/dawn/tests/perf_tests/ShaderRobustnessPerf.cpp", + "${dawn_root}/src/dawn/tests/perf_tests/SubresourceTrackingPerf.cpp", ] libs = [] @@ -741,10 +143,10 @@ test("dawn_perf_tests_temp") { # When building inside Chromium, use their gtest main function and the # other perf test scaffolding in order to run in swarming correctly. if (build_with_chromium) { - deps += [ ":dawn_perf_tests_main" ] + deps += [ "${dawn_root}/src/dawn/tests:perf_tests_main" ] data_deps = [ "//testing:run_perf_test" ] } else { - sources += [ "PerfTestsMain.cpp" ] + sources += [ "${dawn_root}/src/dawn/tests/PerfTestsMain.cpp" ] } if (dawn_enable_metal) {