From 189b0cec37e1af21b627e1b9427991ab88d72a28 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Wed, 9 Feb 2022 14:54:31 +0000 Subject: [PATCH] tint->dawn: Move src/dawn_tests -> src/dawn/tests Bug: dawn:1275 Change-Id: I79f2aeb0c54a74dd5becd90c46792705a28e87da Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79100 Reviewed-by: Corentin Wallez Commit-Queue: Austin Eng --- BUILD.gn | 3 +- docs/dawn/overview.md | 12 +- docs/dawn/testing.md | 2 +- src/dawn/common/BUILD.gn | 2 +- src/dawn/native/d3d12/TextureCopySplitter.h | 2 +- src/dawn/tests/BUILD.gn | 644 +++++++++++++++++ src/{ => dawn}/tests/DawnNativeTest.cpp | 2 +- src/{ => dawn}/tests/DawnNativeTest.h | 0 src/{ => dawn}/tests/DawnTest.cpp | 2 +- src/{ => dawn}/tests/DawnTest.h | 6 +- src/{ => dawn}/tests/End2EndTestsMain.cpp | 2 +- src/{ => dawn}/tests/MockCallback.h | 0 src/{ => dawn}/tests/OWNERS | 0 src/{ => dawn}/tests/ParamGenerator.h | 0 src/{ => dawn}/tests/PerfTestsMain.cpp | 2 +- src/{ => dawn}/tests/ToggleParser.cpp | 2 +- src/{ => dawn}/tests/ToggleParser.h | 0 src/{ => dawn}/tests/UnittestsMain.cpp | 0 .../tests/end2end/AdapterDiscoveryTests.cpp | 2 +- src/{ => dawn}/tests/end2end/BasicTests.cpp | 2 +- .../tests/end2end/BindGroupTests.cpp | 2 +- src/{ => dawn}/tests/end2end/BufferTests.cpp | 2 +- .../tests/end2end/BufferZeroInitTests.cpp | 2 +- .../tests/end2end/ClipSpaceTests.cpp | 2 +- .../tests/end2end/ColorStateTests.cpp | 2 +- .../tests/end2end/CommandEncoderTests.cpp | 2 +- .../end2end/CompressedTextureFormatTests.cpp | 2 +- .../end2end/ComputeCopyStorageBufferTests.cpp | 2 +- .../tests/end2end/ComputeDispatchTests.cpp | 2 +- .../ComputeLayoutMemoryBufferTests.cpp | 2 +- .../end2end/ComputeSharedMemoryTests.cpp | 2 +- .../ComputeStorageBufferBarrierTests.cpp | 2 +- src/{ => dawn}/tests/end2end/CopyTests.cpp | 2 +- .../end2end/CopyTextureForBrowserTests.cpp | 2 +- .../end2end/CreatePipelineAsyncTests.cpp | 2 +- src/{ => dawn}/tests/end2end/CullingTests.cpp | 2 +- .../tests/end2end/D3D12CachingTests.cpp | 2 +- .../end2end/D3D12ResourceWrappingTests.cpp | 2 +- .../tests/end2end/DebugMarkerTests.cpp | 2 +- .../tests/end2end/DeprecatedAPITests.cpp | 2 +- .../tests/end2end/DepthBiasTests.cpp | 2 +- .../tests/end2end/DepthStencilCopyTests.cpp | 2 +- .../tests/end2end/DepthStencilLoadOpTests.cpp | 2 +- .../end2end/DepthStencilSamplingTests.cpp | 2 +- .../tests/end2end/DepthStencilStateTests.cpp | 2 +- src/{ => dawn}/tests/end2end/DestroyTests.cpp | 2 +- .../end2end/DeviceInitializationTests.cpp | 2 +- .../tests/end2end/DeviceLostTests.cpp | 4 +- .../end2end/DrawIndexedIndirectTests.cpp | 2 +- .../tests/end2end/DrawIndexedTests.cpp | 2 +- .../tests/end2end/DrawIndirectTests.cpp | 2 +- src/{ => dawn}/tests/end2end/DrawTests.cpp | 2 +- .../end2end/DynamicBufferOffsetTests.cpp | 2 +- .../tests/end2end/EntryPointTests.cpp | 2 +- .../tests/end2end/ExternalTextureTests.cpp | 2 +- .../tests/end2end/FirstIndexOffsetTests.cpp | 2 +- .../end2end/GpuMemorySynchronizationTests.cpp | 2 +- .../tests/end2end/IOSurfaceWrappingTests.cpp | 2 +- .../tests/end2end/IndexFormatTests.cpp | 2 +- .../tests/end2end/MaxLimitTests.cpp | 2 +- .../end2end/MemoryAllocationStressTests.cpp | 2 +- .../end2end/MultisampledRenderingTests.cpp | 2 +- .../end2end/MultisampledSamplingTests.cpp | 2 +- .../end2end/NonzeroBufferCreationTests.cpp | 2 +- .../end2end/NonzeroTextureCreationTests.cpp | 2 +- .../tests/end2end/ObjectCachingTests.cpp | 2 +- .../tests/end2end/OpArrayLengthTests.cpp | 2 +- .../tests/end2end/PipelineLayoutTests.cpp | 2 +- .../tests/end2end/PrimitiveStateTests.cpp | 2 +- .../tests/end2end/PrimitiveTopologyTests.cpp | 2 +- src/{ => dawn}/tests/end2end/QueryTests.cpp | 2 +- src/{ => dawn}/tests/end2end/QueueTests.cpp | 2 +- .../tests/end2end/QueueTimelineTests.cpp | 2 +- .../ReadOnlyDepthStencilAttachmentTests.cpp | 2 +- .../tests/end2end/RenderAttachmentTests.cpp | 2 +- .../tests/end2end/RenderBundleTests.cpp | 2 +- .../tests/end2end/RenderPassLoadOpTests.cpp | 2 +- .../tests/end2end/RenderPassTests.cpp | 2 +- .../end2end/SamplerFilterAnisotropicTests.cpp | 2 +- src/{ => dawn}/tests/end2end/SamplerTests.cpp | 2 +- src/{ => dawn}/tests/end2end/ScissorTests.cpp | 2 +- .../tests/end2end/ShaderFloat16Tests.cpp | 2 +- src/{ => dawn}/tests/end2end/ShaderTests.cpp | 2 +- .../tests/end2end/StorageTextureTests.cpp | 2 +- .../SubresourceRenderAttachmentTests.cpp | 2 +- .../tests/end2end/SwapChainTests.cpp | 2 +- .../end2end/SwapChainValidationTests.cpp | 2 +- .../tests/end2end/Texture3DTests.cpp | 2 +- .../tests/end2end/TextureFormatTests.cpp | 2 +- .../tests/end2end/TextureSubresourceTests.cpp | 2 +- .../tests/end2end/TextureViewTests.cpp | 2 +- .../tests/end2end/TextureZeroInitTests.cpp | 2 +- .../tests/end2end/VertexFormatTests.cpp | 2 +- .../end2end/VertexOnlyRenderPipelineTests.cpp | 2 +- .../tests/end2end/VertexStateTests.cpp | 2 +- .../tests/end2end/VideoViewsTests.cpp | 0 .../tests/end2end/VideoViewsTests.h | 2 +- .../tests/end2end/VideoViewsTests_gbm.cpp | 0 .../tests/end2end/VideoViewsTests_win.cpp | 0 .../end2end/ViewportOrientationTests.cpp | 2 +- .../tests/end2end/ViewportTests.cpp | 2 +- .../tests/end2end/WindowSurfaceTests.cpp | 2 +- .../tests/perf_tests/BufferUploadPerf.cpp | 2 +- .../tests/perf_tests/DawnPerfTest.cpp | 4 +- .../tests/perf_tests/DawnPerfTest.h | 2 +- .../tests/perf_tests/DawnPerfTestPlatform.cpp | 4 +- .../tests/perf_tests/DawnPerfTestPlatform.h | 2 +- .../tests/perf_tests/DrawCallPerf.cpp | 2 +- src/{ => dawn}/tests/perf_tests/README.md | 0 .../tests/perf_tests/ShaderRobustnessPerf.cpp | 2 +- .../perf_tests/SubresourceTrackingPerf.cpp | 2 +- .../tests/unittests/AsyncTaskTests.cpp | 0 .../tests/unittests/BitSetIteratorTests.cpp | 0 .../tests/unittests/BuddyAllocatorTests.cpp | 0 .../unittests/BuddyMemoryAllocatorTests.cpp | 0 .../tests/unittests/ChainUtilsTests.cpp | 0 .../tests/unittests/CommandAllocatorTests.cpp | 0 .../tests/unittests/ConcurrentCacheTests.cpp | 0 .../unittests/EnumClassBitmasksTests.cpp | 0 .../tests/unittests/EnumMaskIteratorTests.cpp | 0 src/{ => dawn}/tests/unittests/ErrorTests.cpp | 0 .../tests/unittests/FeatureTests.cpp | 0 .../tests/unittests/GPUInfoTests.cpp | 0 .../tests/unittests/GetProcAddressTests.cpp | 0 .../tests/unittests/ITypArrayTests.cpp | 0 .../tests/unittests/ITypBitsetTests.cpp | 0 .../tests/unittests/ITypSpanTests.cpp | 0 .../tests/unittests/ITypVectorTests.cpp | 0 .../tests/unittests/LimitsTests.cpp | 0 .../tests/unittests/LinkedListTests.cpp | 0 src/{ => dawn}/tests/unittests/MathTests.cpp | 0 .../tests/unittests/ObjectBaseTests.cpp | 0 .../tests/unittests/PerStageTests.cpp | 0 .../tests/unittests/PerThreadProcTests.cpp | 0 .../unittests/PlacementAllocatedTests.cpp | 0 .../tests/unittests/RefBaseTests.cpp | 0 .../tests/unittests/RefCountedTests.cpp | 0 .../tests/unittests/ResultTests.cpp | 0 .../unittests/RingBufferAllocatorTests.cpp | 0 .../tests/unittests/SerialMapTests.cpp | 0 .../tests/unittests/SerialQueueTests.cpp | 0 .../tests/unittests/SlabAllocatorTests.cpp | 0 .../tests/unittests/StackContainerTests.cpp | 0 .../unittests/SubresourceStorageTests.cpp | 0 .../tests/unittests/SystemUtilsTests.cpp | 0 .../tests/unittests/ToBackendTests.cpp | 0 .../tests/unittests/TypedIntegerTests.cpp | 0 .../tests/unittests/WindowsUtilsTests.cpp | 0 .../tests/unittests/d3d12/CopySplitTests.cpp | 0 .../native/CommandBufferEncodingTests.cpp | 2 +- .../unittests/native/DestroyObjectTests.cpp | 2 +- .../unittests/native/DeviceCreationTests.cpp | 2 +- .../native/mocks/BindGroupLayoutMock.h | 0 .../unittests/native/mocks/BindGroupMock.h | 0 .../tests/unittests/native/mocks/BufferMock.h | 0 .../native/mocks/CommandBufferMock.h | 0 .../native/mocks/ComputePipelineMock.h | 0 .../tests/unittests/native/mocks/DeviceMock.h | 0 .../native/mocks/ExternalTextureMock.h | 0 .../native/mocks/PipelineLayoutMock.h | 0 .../unittests/native/mocks/QuerySetMock.h | 0 .../native/mocks/RenderPipelineMock.h | 0 .../unittests/native/mocks/SamplerMock.h | 0 .../native/mocks/ShaderModuleMock.cpp | 0 .../unittests/native/mocks/ShaderModuleMock.h | 0 .../unittests/native/mocks/SwapChainMock.h | 0 .../unittests/native/mocks/TextureMock.h | 0 .../validation/BindGroupValidationTests.cpp | 2 +- .../validation/BufferValidationTests.cpp | 2 +- .../CommandBufferValidationTests.cpp | 2 +- .../ComputeIndirectValidationTests.cpp | 2 +- .../validation/ComputeValidationTests.cpp | 2 +- .../CopyCommandsValidationTests.cpp | 2 +- .../validation/CopyTextureForBrowserTests.cpp | 2 +- .../validation/DebugMarkerValidationTests.cpp | 2 +- .../validation/DeviceValidationTests.cpp | 2 +- .../DrawIndirectValidationTests.cpp | 2 +- ...VertexAndIndexBufferOOBValidationTests.cpp | 2 +- .../DynamicStateCommandValidationTests.cpp | 2 +- .../validation/ErrorScopeValidationTests.cpp | 4 +- .../validation/ExternalTextureTests.cpp | 2 +- .../GetBindGroupLayoutValidationTests.cpp | 2 +- .../validation/IndexBufferValidationTests.cpp | 2 +- .../InternalUsageValidationTests.cpp | 2 +- .../tests/unittests/validation/LabelTests.cpp | 2 +- .../MinimumBufferSizeValidationTests.cpp | 2 +- .../validation/MultipleDeviceTests.cpp | 4 +- .../OverridableConstantsValidationTests.cpp | 2 +- .../PipelineAndPassCompatibilityTests.cpp | 2 +- .../validation/QueryValidationTests.cpp | 2 +- ...ueueOnSubmittedWorkDoneValidationTests.cpp | 2 +- .../validation/QueueSubmitValidationTests.cpp | 2 +- .../QueueWriteBufferValidationTests.cpp | 2 +- .../QueueWriteTextureValidationTests.cpp | 2 +- .../RenderBundleValidationTests.cpp | 2 +- .../RenderPassDescriptorValidationTests.cpp | 2 +- .../RenderPipelineValidationTests.cpp | 2 +- .../validation/ResourceUsageTrackingTests.cpp | 2 +- .../validation/SamplerValidationTests.cpp | 2 +- .../ShaderModuleValidationTests.cpp | 2 +- .../StorageTextureValidationTests.cpp | 2 +- .../validation/TextureSubresourceTests.cpp | 2 +- .../validation/TextureValidationTests.cpp | 2 +- .../validation/TextureViewValidationTests.cpp | 2 +- .../validation/ToggleValidationTests.cpp | 2 +- .../validation/UnsafeAPIValidationTests.cpp | 4 +- .../unittests/validation/ValidationTest.cpp | 4 +- .../unittests/validation/ValidationTest.h | 0 .../VertexBufferValidationTests.cpp | 2 +- .../validation/VertexStateValidationTests.cpp | 2 +- .../validation/VideoViewsValidationTests.cpp | 2 +- .../unittests/validation/WriteBufferTests.cpp | 2 +- .../tests/unittests/wire/WireAdapterTests.cpp | 4 +- .../unittests/wire/WireArgumentTests.cpp | 2 +- .../tests/unittests/wire/WireBasicTests.cpp | 2 +- .../unittests/wire/WireBufferMappingTests.cpp | 2 +- .../wire/WireCreatePipelineAsyncTests.cpp | 2 +- .../unittests/wire/WireDestroyObjectTests.cpp | 4 +- .../unittests/wire/WireDisconnectTests.cpp | 4 +- .../unittests/wire/WireErrorCallbackTests.cpp | 2 +- .../unittests/wire/WireExtensionTests.cpp | 112 +-- .../unittests/wire/WireInjectDeviceTests.cpp | 2 +- .../wire/WireInjectInstanceTests.cpp | 2 +- .../wire/WireInjectSwapChainTests.cpp | 2 +- .../unittests/wire/WireInjectTextureTests.cpp | 2 +- .../unittests/wire/WireInstanceTests.cpp | 4 +- .../wire/WireMemoryTransferServiceTests.cpp | 2 +- .../unittests/wire/WireOptionalTests.cpp | 2 +- .../tests/unittests/wire/WireQueueTests.cpp | 2 +- .../unittests/wire/WireShaderModuleTests.cpp | 2 +- .../tests/unittests/wire/WireTest.cpp | 2 +- .../tests/unittests/wire/WireTest.h | 0 .../wire/WireWGPUDevicePropertiesTests.cpp | 0 .../white_box/BufferAllocatedSizeTests.cpp | 2 +- .../white_box/D3D12DescriptorHeapTests.cpp | 2 +- .../tests/white_box/D3D12ResidencyTests.cpp | 2 +- .../white_box/D3D12ResourceHeapTests.cpp | 2 +- .../tests/white_box/EGLImageWrappingTests.cpp | 2 +- .../white_box/InternalResourceUsageTests.cpp | 2 +- .../InternalStorageBufferBindingTests.cpp | 2 +- .../white_box/MetalAutoreleasePoolTests.mm | 2 +- .../white_box/QueryInternalShaderTests.cpp | 2 +- .../white_box/VulkanErrorInjectorTests.cpp | 2 +- .../white_box/VulkanImageWrappingTests.cpp | 4 +- .../white_box/VulkanImageWrappingTests.h | 0 .../VulkanImageWrappingTests_DmaBuf.cpp | 4 +- .../VulkanImageWrappingTests_OpaqueFD.cpp | 2 +- src/tests/BUILD.gn | 670 +----------------- 248 files changed, 935 insertions(+), 888 deletions(-) create mode 100644 src/dawn/tests/BUILD.gn rename src/{ => dawn}/tests/DawnNativeTest.cpp (98%) rename src/{ => dawn}/tests/DawnNativeTest.h (100%) rename src/{ => dawn}/tests/DawnTest.cpp (99%) rename src/{ => dawn}/tests/DawnTest.h (99%) rename src/{ => dawn}/tests/End2EndTestsMain.cpp (95%) rename src/{ => dawn}/tests/MockCallback.h (100%) rename src/{ => dawn}/tests/OWNERS (100%) rename src/{ => dawn}/tests/ParamGenerator.h (100%) rename src/{ => dawn}/tests/PerfTestsMain.cpp (93%) rename src/{ => dawn}/tests/ToggleParser.cpp (98%) rename src/{ => dawn}/tests/ToggleParser.h (100%) rename src/{ => dawn}/tests/UnittestsMain.cpp (100%) rename src/{ => dawn}/tests/end2end/AdapterDiscoveryTests.cpp (99%) rename src/{ => dawn}/tests/end2end/BasicTests.cpp (98%) rename src/{ => dawn}/tests/end2end/BindGroupTests.cpp (99%) rename src/{ => dawn}/tests/end2end/BufferTests.cpp (99%) rename src/{ => dawn}/tests/end2end/BufferZeroInitTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ClipSpaceTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ColorStateTests.cpp (99%) rename src/{ => dawn}/tests/end2end/CommandEncoderTests.cpp (98%) rename src/{ => dawn}/tests/end2end/CompressedTextureFormatTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ComputeCopyStorageBufferTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ComputeDispatchTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ComputeLayoutMemoryBufferTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ComputeSharedMemoryTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ComputeStorageBufferBarrierTests.cpp (99%) rename src/{ => dawn}/tests/end2end/CopyTests.cpp (99%) rename src/{ => dawn}/tests/end2end/CopyTextureForBrowserTests.cpp (99%) rename src/{ => dawn}/tests/end2end/CreatePipelineAsyncTests.cpp (99%) rename src/{ => dawn}/tests/end2end/CullingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/D3D12CachingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/D3D12ResourceWrappingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DebugMarkerTests.cpp (98%) rename src/{ => dawn}/tests/end2end/DeprecatedAPITests.cpp (99%) rename src/{ => dawn}/tests/end2end/DepthBiasTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DepthStencilCopyTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DepthStencilLoadOpTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DepthStencilSamplingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DepthStencilStateTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DestroyTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DeviceInitializationTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DeviceLostTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DrawIndexedIndirectTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DrawIndexedTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DrawIndirectTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DrawTests.cpp (99%) rename src/{ => dawn}/tests/end2end/DynamicBufferOffsetTests.cpp (99%) rename src/{ => dawn}/tests/end2end/EntryPointTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ExternalTextureTests.cpp (99%) rename src/{ => dawn}/tests/end2end/FirstIndexOffsetTests.cpp (99%) rename src/{ => dawn}/tests/end2end/GpuMemorySynchronizationTests.cpp (99%) rename src/{ => dawn}/tests/end2end/IOSurfaceWrappingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/IndexFormatTests.cpp (99%) rename src/{ => dawn}/tests/end2end/MaxLimitTests.cpp (99%) rename src/{ => dawn}/tests/end2end/MemoryAllocationStressTests.cpp (98%) rename src/{ => dawn}/tests/end2end/MultisampledRenderingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/MultisampledSamplingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/NonzeroBufferCreationTests.cpp (99%) rename src/{ => dawn}/tests/end2end/NonzeroTextureCreationTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ObjectCachingTests.cpp (99%) rename src/{ => dawn}/tests/end2end/OpArrayLengthTests.cpp (99%) rename src/{ => dawn}/tests/end2end/PipelineLayoutTests.cpp (98%) rename src/{ => dawn}/tests/end2end/PrimitiveStateTests.cpp (99%) rename src/{ => dawn}/tests/end2end/PrimitiveTopologyTests.cpp (99%) rename src/{ => dawn}/tests/end2end/QueryTests.cpp (99%) rename src/{ => dawn}/tests/end2end/QueueTests.cpp (99%) rename src/{ => dawn}/tests/end2end/QueueTimelineTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ReadOnlyDepthStencilAttachmentTests.cpp (99%) rename src/{ => dawn}/tests/end2end/RenderAttachmentTests.cpp (99%) rename src/{ => dawn}/tests/end2end/RenderBundleTests.cpp (99%) rename src/{ => dawn}/tests/end2end/RenderPassLoadOpTests.cpp (99%) rename src/{ => dawn}/tests/end2end/RenderPassTests.cpp (99%) rename src/{ => dawn}/tests/end2end/SamplerFilterAnisotropicTests.cpp (99%) rename src/{ => dawn}/tests/end2end/SamplerTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ScissorTests.cpp (99%) rename src/{ => dawn}/tests/end2end/ShaderFloat16Tests.cpp (99%) rename src/{ => dawn}/tests/end2end/ShaderTests.cpp (99%) rename src/{ => dawn}/tests/end2end/StorageTextureTests.cpp (99%) rename src/{ => dawn}/tests/end2end/SubresourceRenderAttachmentTests.cpp (99%) rename src/{ => dawn}/tests/end2end/SwapChainTests.cpp (99%) rename src/{ => dawn}/tests/end2end/SwapChainValidationTests.cpp (99%) rename src/{ => dawn}/tests/end2end/Texture3DTests.cpp (99%) rename src/{ => dawn}/tests/end2end/TextureFormatTests.cpp (99%) rename src/{ => dawn}/tests/end2end/TextureSubresourceTests.cpp (99%) rename src/{ => dawn}/tests/end2end/TextureViewTests.cpp (99%) rename src/{ => dawn}/tests/end2end/TextureZeroInitTests.cpp (99%) rename src/{ => dawn}/tests/end2end/VertexFormatTests.cpp (99%) rename src/{ => dawn}/tests/end2end/VertexOnlyRenderPipelineTests.cpp (99%) rename src/{ => dawn}/tests/end2end/VertexStateTests.cpp (99%) rename src/{ => dawn}/tests/end2end/VideoViewsTests.cpp (100%) rename src/{ => dawn}/tests/end2end/VideoViewsTests.h (99%) rename src/{ => dawn}/tests/end2end/VideoViewsTests_gbm.cpp (100%) rename src/{ => dawn}/tests/end2end/VideoViewsTests_win.cpp (100%) rename src/{ => dawn}/tests/end2end/ViewportOrientationTests.cpp (98%) rename src/{ => dawn}/tests/end2end/ViewportTests.cpp (99%) rename src/{ => dawn}/tests/end2end/WindowSurfaceTests.cpp (99%) rename src/{ => dawn}/tests/perf_tests/BufferUploadPerf.cpp (99%) rename src/{ => dawn}/tests/perf_tests/DawnPerfTest.cpp (99%) rename src/{ => dawn}/tests/perf_tests/DawnPerfTest.h (99%) rename src/{ => dawn}/tests/perf_tests/DawnPerfTestPlatform.cpp (98%) rename src/{ => dawn}/tests/perf_tests/DawnPerfTestPlatform.h (98%) rename src/{ => dawn}/tests/perf_tests/DrawCallPerf.cpp (99%) rename src/{ => dawn}/tests/perf_tests/README.md (100%) rename src/{ => dawn}/tests/perf_tests/ShaderRobustnessPerf.cpp (99%) rename src/{ => dawn}/tests/perf_tests/SubresourceTrackingPerf.cpp (99%) rename src/{ => dawn}/tests/unittests/AsyncTaskTests.cpp (100%) rename src/{ => dawn}/tests/unittests/BitSetIteratorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/BuddyAllocatorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/BuddyMemoryAllocatorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ChainUtilsTests.cpp (100%) rename src/{ => dawn}/tests/unittests/CommandAllocatorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ConcurrentCacheTests.cpp (100%) rename src/{ => dawn}/tests/unittests/EnumClassBitmasksTests.cpp (100%) rename src/{ => dawn}/tests/unittests/EnumMaskIteratorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ErrorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/FeatureTests.cpp (100%) rename src/{ => dawn}/tests/unittests/GPUInfoTests.cpp (100%) rename src/{ => dawn}/tests/unittests/GetProcAddressTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ITypArrayTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ITypBitsetTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ITypSpanTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ITypVectorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/LimitsTests.cpp (100%) rename src/{ => dawn}/tests/unittests/LinkedListTests.cpp (100%) rename src/{ => dawn}/tests/unittests/MathTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ObjectBaseTests.cpp (100%) rename src/{ => dawn}/tests/unittests/PerStageTests.cpp (100%) rename src/{ => dawn}/tests/unittests/PerThreadProcTests.cpp (100%) rename src/{ => dawn}/tests/unittests/PlacementAllocatedTests.cpp (100%) rename src/{ => dawn}/tests/unittests/RefBaseTests.cpp (100%) rename src/{ => dawn}/tests/unittests/RefCountedTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ResultTests.cpp (100%) rename src/{ => dawn}/tests/unittests/RingBufferAllocatorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/SerialMapTests.cpp (100%) rename src/{ => dawn}/tests/unittests/SerialQueueTests.cpp (100%) rename src/{ => dawn}/tests/unittests/SlabAllocatorTests.cpp (100%) rename src/{ => dawn}/tests/unittests/StackContainerTests.cpp (100%) rename src/{ => dawn}/tests/unittests/SubresourceStorageTests.cpp (100%) rename src/{ => dawn}/tests/unittests/SystemUtilsTests.cpp (100%) rename src/{ => dawn}/tests/unittests/ToBackendTests.cpp (100%) rename src/{ => dawn}/tests/unittests/TypedIntegerTests.cpp (100%) rename src/{ => dawn}/tests/unittests/WindowsUtilsTests.cpp (100%) rename src/{ => dawn}/tests/unittests/d3d12/CopySplitTests.cpp (100%) rename src/{ => dawn}/tests/unittests/native/CommandBufferEncodingTests.cpp (99%) rename src/{ => dawn}/tests/unittests/native/DestroyObjectTests.cpp (99%) rename src/{ => dawn}/tests/unittests/native/DeviceCreationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/native/mocks/BindGroupLayoutMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/BindGroupMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/BufferMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/CommandBufferMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/ComputePipelineMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/DeviceMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/ExternalTextureMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/PipelineLayoutMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/QuerySetMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/RenderPipelineMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/SamplerMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/ShaderModuleMock.cpp (100%) rename src/{ => dawn}/tests/unittests/native/mocks/ShaderModuleMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/SwapChainMock.h (100%) rename src/{ => dawn}/tests/unittests/native/mocks/TextureMock.h (100%) rename src/{ => dawn}/tests/unittests/validation/BindGroupValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/BufferValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/CommandBufferValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/ComputeIndirectValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/ComputeValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/CopyCommandsValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/CopyTextureForBrowserTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/DebugMarkerValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/DeviceValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/DrawIndirectValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/DynamicStateCommandValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/ErrorScopeValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/ExternalTextureTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/IndexBufferValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/InternalUsageValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/LabelTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/MinimumBufferSizeValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/MultipleDeviceTests.cpp (97%) rename src/{ => dawn}/tests/unittests/validation/OverridableConstantsValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/PipelineAndPassCompatibilityTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/QueryValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp (97%) rename src/{ => dawn}/tests/unittests/validation/QueueSubmitValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/QueueWriteBufferValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/QueueWriteTextureValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/RenderBundleValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/RenderPipelineValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/ResourceUsageTrackingTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/SamplerValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/ShaderModuleValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/StorageTextureValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/TextureSubresourceTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/TextureValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/TextureViewValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/ToggleValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/UnsafeAPIValidationTests.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/ValidationTest.cpp (98%) rename src/{ => dawn}/tests/unittests/validation/ValidationTest.h (100%) rename src/{ => dawn}/tests/unittests/validation/VertexBufferValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/VertexStateValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/VideoViewsValidationTests.cpp (99%) rename src/{ => dawn}/tests/unittests/validation/WriteBufferTests.cpp (98%) rename src/{ => dawn}/tests/unittests/wire/WireAdapterTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireArgumentTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireBasicTests.cpp (98%) rename src/{ => dawn}/tests/unittests/wire/WireBufferMappingTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireDestroyObjectTests.cpp (96%) rename src/{ => dawn}/tests/unittests/wire/WireDisconnectTests.cpp (98%) rename src/{ => dawn}/tests/unittests/wire/WireErrorCallbackTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireExtensionTests.cpp (69%) rename src/{ => dawn}/tests/unittests/wire/WireInjectDeviceTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireInjectInstanceTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireInjectSwapChainTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireInjectTextureTests.cpp (98%) rename src/{ => dawn}/tests/unittests/wire/WireInstanceTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireMemoryTransferServiceTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireOptionalTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireQueueTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireShaderModuleTests.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireTest.cpp (99%) rename src/{ => dawn}/tests/unittests/wire/WireTest.h (100%) rename src/{ => dawn}/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp (100%) rename src/{ => dawn}/tests/white_box/BufferAllocatedSizeTests.cpp (98%) rename src/{ => dawn}/tests/white_box/D3D12DescriptorHeapTests.cpp (99%) rename src/{ => dawn}/tests/white_box/D3D12ResidencyTests.cpp (99%) rename src/{ => dawn}/tests/white_box/D3D12ResourceHeapTests.cpp (99%) rename src/{ => dawn}/tests/white_box/EGLImageWrappingTests.cpp (99%) rename src/{ => dawn}/tests/white_box/InternalResourceUsageTests.cpp (98%) rename src/{ => dawn}/tests/white_box/InternalStorageBufferBindingTests.cpp (99%) rename src/{ => dawn}/tests/white_box/MetalAutoreleasePoolTests.mm (98%) rename src/{ => dawn}/tests/white_box/QueryInternalShaderTests.cpp (99%) rename src/{ => dawn}/tests/white_box/VulkanErrorInjectorTests.cpp (99%) rename src/{ => dawn}/tests/white_box/VulkanImageWrappingTests.cpp (99%) rename src/{ => dawn}/tests/white_box/VulkanImageWrappingTests.h (100%) rename src/{ => dawn}/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp (98%) rename src/{ => dawn}/tests/white_box/VulkanImageWrappingTests_OpaqueFD.cpp (99%) diff --git a/BUILD.gn b/BUILD.gn index 7f9a6a9b53..4862c88c34 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 c15ef1c619..50907b8476 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 a37d0b5ad1..749736ba26 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 0ef484b804..e47e9f0d3d 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 9073df1e47..d549b906da 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 0000000000..4f7a559b16 --- /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 937daf00ea..fcf74f7b43 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 7f80af9472..0256bb85bf 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 f4ffffa62d..877b2fccdf 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 da7bbbe0ec..1991922c48 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 8852896694..a927e715bc 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 3589aeae2e..997a1d4326 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 ef9ec13ed4..62295fc3ea 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 05d536fca5..4193fc2f25 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 0b156deaa5..828a21b75b 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 b893c02912..9debcc29f1 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 3810a70ac1..44d77cc0fe 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 24ec1dc62d..fc6f476100 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 6249d01e53..6040d61263 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 4c156dc2ec..00d99c56d3 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 e2387143dc..6086f2d462 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 69fc8a839d..f6761eba08 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 5fb159eedb..89a76c4656 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 947b139751..e7037ea1fc 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 a796274543..fd85607a00 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 ba8409abe1..10f4035a50 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 a845ca19cc..f9d5ba7a63 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 aa83fbbfb2..a1c52361b5 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 476733f71c..d519b4da64 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 27da015db7..a388ea4dc2 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 480d384014..72200b1423 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 dab828cf8b..964ba8841f 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 5fc3c84848..1a30b0d93d 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 69a0e10f46..ae1f2a4f32 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 d1c000e739..9c893cfaa3 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 c4496c37c4..d622a33f11 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 dd5dbe9eb2..35054d3d7c 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 78fa955930..5b547abbe2 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 f6db23ffaa..d954e325e2 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 41475b6672..d908c7ee11 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 021dcc0de2..f30aa7234f 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 c4fccec4b5..1116e028ed 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 14383af762..a8e21fe946 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 84060178e2..c28b297136 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 9987311c89..e8782813ac 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 526023dd60..55e86ce5c4 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 bc5160b479..5c80a5ea48 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 8efa93b32f..9b241de70d 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 2211f20def..e911837830 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 be514eed6c..ceee660628 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 97d606fa09..d5b19592b6 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 a48bd72b89..b4a9c63ad2 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 5eea31945b..c2fe883100 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 e72c39e8f1..ce01ca506c 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 c72a5b8522..59fe068468 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 ee8322eb72..f8bcc74b56 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 162ba0fd48..6218ad9e73 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 1950266d3c..55f238f663 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 b9d06b318f..73a863d605 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 26787e29a4..85139c93f0 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 ed5a08e4de..516cd197dd 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 444217a0f5..fef5f8103c 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 0f1b54a87c..16b56d2837 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 5b559be1b2..97043cfc99 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 5718d09070..0b8f4acbb1 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 4076b0ce88..f9dd8c88a4 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 b7ada26b44..96f4a03034 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 5c5df395b0..b0ba5ad2ef 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 45cdac989b..75ea0fca3e 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 d0b8e32237..38bf83b8b6 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 68801285e7..1dac34ed30 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 88f9031630..d45e288832 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 59a9b6dfd5..c5b6099800 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 63add8e631..491cae0126 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 6e0f108b66..a66044097b 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 293cfa8ccd..e2d95f3639 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 b2a31270df..ef2afde79b 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 baa8747303..f8d9a58b14 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 7f214302ad..6890785c59 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 9009590810..4286425f15 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 1fdd390c82..d3449d9dfc 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 3c3a2a72b7..fc4b0c6c4f 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 1778963cd4..7f3370d439 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 83fc0d38f4..d8f69929f8 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 cefc78a249..edc2b99685 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 29b5551a2e..b31f4f8224 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 faeae42354..e6a665d37c 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 8fdc8c4acd..083048e178 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 d81a5baa0f..d33315ea6f 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 c0527b0983..6dcedb9fc0 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 aee8e5bcdc..9a29049175 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 653cc8c2a6..2c357fac61 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 9f53196784..1974f3c750 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 d4be0c583a..6be9436691 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 fe014df6f5..75d2871176 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 1781fc5e58..548d212048 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 fdbdafc117..3da0dadb41 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 ff9bf64520..f41d6d977b 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 6b00e80472..1adbe5ca1e 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 c683496633..0a541ccea7 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 e5ce711e16..b70c68b6a1 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 7cf38ae11b..eb94dccab5 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 b6a3efbbdc..01c09add51 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 6b49cba1c0..fc1b4638e6 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 b58809428e..33ea7fcadf 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 71d28684a9..9ec4ae6710 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 4e17c1e034..784c8aa17d 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 5faca9c824..6d62e345ba 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 435c88016a..ec4a74d42b 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 cdd70b4f0d..825717122f 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 5bff5d240c..5981a0b763 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 c78020b8bf..7fd283bddc 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 c5d3535237..cd297d3b27 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 ee3988e4b5..d004e93294 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 cd8a19a7c1..c0eacff748 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 dba6c17c0c..7268c00f7f 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 ab72b1fd82..ca2dfe9bdd 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 8e3d42319d..61aa8f032a 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 bec883b8bc..68283638dd 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 68817b9685..404db884fc 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 738ff92c2a..623697d292 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 f05df01108..5fe7a909e2 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 60254dbbde..0b5f7f3c01 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 a5f12c26b0..f84748f6ad 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 9fb6fccc19..892cae7cd9 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 8a582cd107..bbb8589121 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 2e2bd5c5b0..6d7dce2316 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 0b2fc9a66d..1adb1d2fe7 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 fd5c51de3e..f30ff716f3 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 8359686267..ec03dbc124 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 4c2a26e117..79f28af8f5 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 22c581cdd5..79f53fd3b9 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 917bd0bf5b..a99c6343ae 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 8fda1bc13c..856ec2a54c 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 69d7d1ece8..53adeb6bb6 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 a3ad726ff0..dbf3ebc8e1 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 72a373b431..31c511624b 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 5258de0881..cfe5973da5 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 f6e38da6b3..428777c28c 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 138336d72a..0b7f476e8e 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 f4d950235a..f56243ddc3 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 4e32af798c..81892157a4 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 5d77b5074a..a9d1c4b2bc 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 3462168394..ba2ee46446 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 cccc274fb3..35e7889e11 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 3fa8b3681c..eeb2f6913a 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 ef5efff160..7c8677b361 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 34ac429e36..0f5c9573e8 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 17be31abb1..c1d2d453c9 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 dee3070990..72773010f3 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 878b18494d..abf5d9d6cc 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 29d8b25dc5..eb831d83ab 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 8a1a5ca342..41db0917f2 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 7850eda560..658325ccaf 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 6f3ba38436..5ba589c023 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 c3e0a04e6a..6ec0485f78 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 cb155a63c0..9e1ac58f0c 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); + .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(); - })); + 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); + .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); + 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(); - })); + 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); + .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); + 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(); - })); + 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); + .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(); - })); + 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); + .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); + 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(); - })); + 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 172a8ef771..fd3b25813d 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 bce0d915ac..eef7671bc9 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 222eaa9b77..5bcc8a688c 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 e0591fe976..991050b453 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 da6e2c2077..ab6ec71920 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 4a051cec12..530e31d0cf 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 e5da98f24a..ca68cdd505 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 cb6f391c8b..31b9c1faf9 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 bb0123ee3f..9ffa6243aa 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 e5d9fd2982..cba143e622 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 9be4dc183f..991c14583d 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 7f81819343..82fa79d3c8 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 2959953c12..8c454f2c32 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 69afb3ba3c..4ad2eacb5e 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 1d541d0a3d..a6593fd079 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 029bef9b1f..5e46b504e9 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 a4f4a79b09..c19ab5d156 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 8a4db410a4..766f861c5b 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 bfa9c09f7e..b357a03904 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 5efd0987b6..12499735d0 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 3b785f830f..d3475c98ac 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 a382822e4d..6c54924dad 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 a6f295587f..b41abdb37e 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 f0088739e7..23b8d95b65 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) {