Skip to content

Commit ec820d2

Browse files
Added tools tests to test_all.bat (close #189); run tools tests on CI; updated core and tools
1 parent 3dc006c commit ec820d2

4 files changed

Lines changed: 61 additions & 3 deletions

File tree

.github/workflows/windows.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,34 @@ jobs:
4949
run: |
5050
cd "$GITHUB_WORKSPACE\DiligentCore\Tests\DiligentCoreAPITest\assets"
5151
"${{runner.workspace}}\build\DiligentCore\Tests\DiligentCoreAPITest\${{ matrix.config }}\DiligentCoreAPITest.exe" --mode=d3d12_sw
52+
5253
- name: DiligentCoreAPITest D3D12 DXC
5354
if: success()
5455
shell: bash
5556
run: |
5657
cd "$GITHUB_WORKSPACE\DiligentCore\Tests\DiligentCoreAPITest\assets"
5758
"${{runner.workspace}}\build\DiligentCore\Tests\DiligentCoreAPITest\${{ matrix.config }}\DiligentCoreAPITest.exe" --mode=d3d12_sw --shader_compiler=dxc
5859
60+
- name: DiligentToolsTest
61+
if: success()
62+
shell: bash
63+
run: |
64+
cd "$GITHUB_WORKSPACE\DiligentTools\Tests\DiligentToolsTest\assets"
65+
"${{runner.workspace}}\build\DiligentTools\Tests\DiligentToolsTest\${{ matrix.config }}\DiligentToolsTest.exe"
66+
67+
- name: DiligentToolsGPUTest D3D11
68+
if: success()
69+
shell: bash
70+
run: |
71+
cd "$GITHUB_WORKSPACE\DiligentTools\Tests\DiligentToolsGPUTest\assets"
72+
"${{runner.workspace}}\build\DiligentTools\Tests\DiligentToolsGPUTest\${{ matrix.config }}\DiligentToolsGPUTest.exe" --mode=d3d11_sw
73+
74+
- name: DiligentToolsGPUTest D3D12
75+
if: success()
76+
shell: bash
77+
run: |
78+
cd "$GITHUB_WORKSPACE\DiligentTools\Tests\DiligentToolsGPUTest\assets"
79+
"${{runner.workspace}}\build\DiligentTools\Tests\DiligentToolsGPUTest\${{ matrix.config }}\DiligentToolsGPUTest.exe" --mode=d3d12_sw
5980
6081
build-win10-dev:
6182
strategy:
@@ -132,3 +153,16 @@ jobs:
132153
cd "$GITHUB_WORKSPACE\DiligentCore\Tests\DiligentCoreAPITest\assets"
133154
"${{runner.workspace}}\build\DiligentCore\Tests\DiligentCoreAPITest\${{ matrix.config }}\DiligentCoreAPITest.exe" --mode=d3d11_sw
134155
156+
- name: DiligentToolsTest
157+
if: success()
158+
shell: bash
159+
run: |
160+
cd "$GITHUB_WORKSPACE\DiligentTools\Tests\DiligentToolsTest\assets"
161+
"${{runner.workspace}}\build\DiligentTools\Tests\DiligentToolsTest\${{ matrix.config }}\DiligentToolsTest.exe"
162+
163+
- name: DiligentToolsGPUTest D3D11
164+
if: success()
165+
shell: bash
166+
run: |
167+
cd "$GITHUB_WORKSPACE\DiligentTools\Tests\DiligentToolsGPUTest\assets"
168+
"${{runner.workspace}}\build\DiligentTools\Tests\DiligentToolsGPUTest\${{ matrix.config }}\DiligentToolsGPUTest.exe" --mode=d3d11_sw

DiligentTools

Tests/test_all.bat

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ set D3D11_ERROR=0
3636
set D3D12_ERROR=0
3737
set GL_ERROR=0
3838
set VK_ERROR=0
39+
set TOOLS_TEST_ERROR=0
40+
set TOOLS_GPU_TEST_ERROR=0
3941
set APP_ERROR=0
4042

4143
set CURR_DIR=%cd%
@@ -56,6 +58,11 @@ cd "%CURR_DIR%\..\DiligentCore\Tests\DiligentCoreTest\assets"
5658
set CORE_TEST_EXE_PATH="%build_folder%\DiligentCore\Tests\DiligentCoreTest\%config%\DiligentCoreTest.exe"
5759
(%CORE_TEST_EXE_PATH%) || set /a CORE_TEST_ERROR=%CORE_TEST_ERROR%+1
5860

61+
cd "%CURR_DIR%\..\DiligentTools\Tests\DiligentToolsTest\assets"
62+
set TOOLS_TEST_EXE_PATH="%build_folder%\DiligentTools\Tests\DiligentToolsTest\%config%\DiligentToolsTest.exe"
63+
(%TOOLS_TEST_EXE_PATH%) || set /a TOOLS_TEST_ERROR=%TOOLS_TEST_ERROR%+1
64+
65+
5966
cd "%CURR_DIR%\..\DiligentCore\Tests\DiligentCoreAPITest\assets"
6067
set API_TEST_EXE_PATH="%build_folder%\DiligentCore\Tests\DiligentCoreAPITest\%config%\DiligentCoreAPITest.exe"
6168

@@ -73,6 +80,18 @@ set API_TEST_EXE_PATH="%build_folder%\DiligentCore\Tests\DiligentCoreAPITest\%co
7380
(%API_TEST_EXE_PATH% --mode=vk) || set /a VK_ERROR=%VK_ERROR%+1
7481
(%API_TEST_EXE_PATH% --mode=vk --shader_compiler=dxc) || set /a VK_ERROR=%VK_ERROR%+10
7582

83+
84+
cd "%CURR_DIR%\..\DiligentTools\Tests\DiligentToolsGPUTest\assets"
85+
set TOOLS_GPU_TEST_EXE_PATH="%build_folder%\DiligentTools\Tests\DiligentToolsGPUTest\%config%\DiligentToolsGPUTest.exe"
86+
87+
(%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d11) || set /a TOOLS_GPU_TEST_ERROR=%TOOLS_GPU_TEST_ERROR%+1
88+
(%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d11_sw) || set /a TOOLS_GPU_TEST_ERROR=%TOOLS_GPU_TEST_ERROR%+10
89+
(%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d12) || set /a TOOLS_GPU_TEST_ERROR=%TOOLS_GPU_TEST_ERROR%+100
90+
(%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d12_sw) || set /a TOOLS_GPU_TEST_ERROR=%TOOLS_GPU_TEST_ERROR%+1000
91+
(%TOOLS_GPU_TEST_EXE_PATH% --mode=gl) || set /a TOOLS_GPU_TEST_ERROR=%TOOLS_GPU_TEST_ERROR%+10000
92+
(%TOOLS_GPU_TEST_EXE_PATH% --mode=vk) || set /a TOOLS_GPU_TEST_ERROR=%TOOLS_GPU_TEST_ERROR%+100000
93+
94+
7695
cd "%CURR_DIR%"
7796

7897
echo.
@@ -86,12 +105,17 @@ set FONT_DEFAULT=
86105

87106
if "%FORMATTING_ERROR%"=="0" (@echo %FONT_GREEN%Format validation PASSED) else (@echo %FONT_RED%Format validation FAILED with code %FORMATTING_ERROR%)
88107
if "%CORE_TEST_ERROR%"=="0" (@echo %FONT_GREEN%Core tests PASSED) else (@echo %FONT_RED%Core tests FAILED with code %CORE_TEST_ERROR%)
108+
89109
if "%D3D11_ERROR%"=="0" (@echo %FONT_GREEN%D3D11 tests PASSED) else (@echo %FONT_RED%D3D11 tests FAILED with code %D3D11_ERROR%)
90110
if "%D3D12_ERROR%"=="0" (@echo %FONT_GREEN%D3D12 tests PASSED) else (@echo %FONT_RED%D3D12 tests FAILED with code %D3D12_ERROR%)
91111
if "%GL_ERROR%"=="0" (@echo %FONT_GREEN%GL tests PASSED) else (@echo %FONT_RED%GL tests FAILED with code %GL_ERROR%)
92112
if "%VK_ERROR%"=="0" (@echo %FONT_GREEN%Vk tests PASSED) else (@echo %FONT_RED%Vk tests FAILED with code %VK_ERROR%)
113+
114+
if "%TOOLS_TEST_ERROR%"=="0" (@echo %FONT_GREEN%Tools tests PASSED) else (@echo %FONT_RED%Tools tests FAILED with code %TOOLS_TEST_ERROR%)
115+
if "%TOOLS_GPU_TEST_ERROR%"=="0" (@echo %FONT_GREEN%Tools GPU tests PASSED) else (@echo %FONT_RED%Tools GPU tests FAILED with code %TOOLS_GPU_TEST_ERROR%)
116+
93117
if "%APP_ERROR%"=="0" (@echo %FONT_GREEN%Sample app tests PASSED) else (@echo %FONT_RED%Sample app tests FAILED with code %APP_ERROR%)
94118

95119
@echo %FONT_DEFAULT%
96120

97-
exit /B %D3D11_ERROR%+%D3D12_ERROR%+%GL_ERROR%+%VK_ERROR%+%APP_ERROR%
121+
exit /B %FORMATTING_ERROR%+%CORE_TEST_ERROR%+%D3D11_ERROR%+%D3D12_ERROR%+%GL_ERROR%+%VK_ERROR%+%TOOLS_TEST_ERROR%+%TOOLS_GPU_TEST_ERROR%+%APP_ERROR%

0 commit comments

Comments
 (0)