refactor: simplify D3D12 test infrastructure

- Delete run_tests.py and run_tests.bat (use cmake/ctest directly)
- Fix integration test CMakeLists: output_ppm name, threshold=0, GT.ppm copy
- Rewrite TEST_SPEC.md to be concise
- Update integration test CTest registration
This commit is contained in:
2026-03-22 21:41:56 +08:00
parent 50b50d06a0
commit fa50892150
7 changed files with 65 additions and 769 deletions

View File

@@ -46,6 +46,6 @@ add_test(NAME D3D12_Minimal_Integration
$<TARGET_FILE:D3D12_Minimal>
minimal.ppm
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
5
0
WORKING_DIRECTORY $<TARGET_FILE_DIR:D3D12_Minimal>
)

View File

@@ -55,6 +55,6 @@ add_test(NAME D3D12_Quad_Integration
$<TARGET_FILE:D3D12_Quad>
quad.ppm
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
5
0
WORKING_DIRECTORY $<TARGET_FILE_DIR:D3D12_Quad>
)

View File

@@ -43,13 +43,16 @@ add_custom_command(TARGET D3D12_Sphere POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/tests/RHI/D3D12/integration/run_integration_test.py
$<TARGET_FILE_DIR:D3D12_Sphere>/
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
$<TARGET_FILE_DIR:D3D12_Sphere>/
)
add_test(NAME D3D12_Sphere_Integration
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE_DIR:D3D12_Sphere>/run_integration_test.py
$<TARGET_FILE:D3D12_Sphere>
screenshot.ppm
sphere.ppm
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
5
0
WORKING_DIRECTORY $<TARGET_FILE_DIR:D3D12_Sphere>
)

View File

@@ -52,6 +52,6 @@ add_test(NAME D3D12_Triangle_Integration
$<TARGET_FILE:D3D12_Triangle>
triangle.ppm
${CMAKE_CURRENT_SOURCE_DIR}/GT.ppm
5
0
WORKING_DIRECTORY $<TARGET_FILE_DIR:D3D12_Triangle>
)