@@ -201,6 +201,10 @@ rem Win32 to x86, ARM64EC to ARM64, no changes for other platforms
201201set BUILD_ARCH_DIR = %BUILD_ARCH:Win32 =x86 %
202202set BUILD_ARCH_DIR = %BUILD_ARCH_DIR:ARM64EC =ARM64 %
203203
204+ rem Map build arch to test arch (for TAEF)
205+ rem Win32 to x86, no changes for other platforms
206+ set TEST_ARCH = %BUILD_ARCH:Win32 =x86 %
207+
204208rem By default, run all clang tests and execution tests and dxilconv tests
205209if " %TEST_ALL% " == " 1" (
206210 set TEST_CLANG = 1
@@ -309,9 +313,9 @@ if exist "%HCT_EXTRAS%\hcttest-before.cmd" (
309313if " %TEST_CLANG% " == " 1" (
310314 echo Running Clang unit tests ...
311315 if " %TEST_CLANG_FILTER% " == " " (
312- set SELECT_FILTER = /select:" @Priority<1 AND @Architecture='%BUILD_ARCH % '"
316+ set SELECT_FILTER = /select:" @Priority<1 AND @Architecture='%TEST_ARCH % '"
313317 ) else (
314- set SELECT_FILTER = /select:" @Name='%TEST_CLANG_FILTER% ' AND @Architecture='%BUILD_ARCH % '"
318+ set SELECT_FILTER = /select:" @Name='%TEST_CLANG_FILTER% ' AND @Architecture='%TEST_ARCH % '"
315319 )
316320
317321 call :runte clang-hlsl-tests.dll /p:" HlslDataDir=%HLSL_SRC_DIR% \tools\clang\test\HLSL" !SELECT_FILTER! %ADDITIONAL_OPTS%
@@ -331,7 +335,7 @@ if "%TEST_EXEC%"=="1" (
331335set EXEC_COMMON_ARGS = /p:" HlslDataDir=%HLSL_SRC_DIR% \tools\clang\test\HLSL" /runIgnoredTests /p:" ExperimentalShaders=*" %TEST_ADAPTER% %USE_AGILITY_SDK%
332336if " %TEST_EXEC% " == " 1" (
333337 echo Sniffing for D3D12 configuration ...
334- call :runte clang-hlsl-tests.dll /select:" @Name='ExecutionTest::BasicTriangleTest' AND @Architecture='%BUILD_ARCH % '" %EXEC_COMMON_ARGS%
338+ call :runte clang-hlsl-tests.dll /select:" @Name='ExecutionTest::BasicTriangleTest' AND @Architecture='%TEST_ARCH % '" %EXEC_COMMON_ARGS%
335339 set RES_EXEC = !ERRORLEVEL!
336340 if errorlevel 1 (
337341 if not " %TEST_EXEC_REQUIRED% " == " 1" (
@@ -346,9 +350,9 @@ if "%TEST_EXEC%"=="1" (
346350
347351if " %TEST_EXEC% " == " 1" (
348352 if " %TEST_EXEC_FUTURE% " == " 1" (
349- set SELECT_FILTER = /select:" @Name='%TEST_EXEC_FILTER% ' AND @Priority=2 AND @Architecture='%BUILD_ARCH % '"
353+ set SELECT_FILTER = /select:" @Name='%TEST_EXEC_FILTER% ' AND @Priority=2 AND @Architecture='%TEST_ARCH % '"
350354 ) else (
351- set SELECT_FILTER = /select:" @Name='%TEST_EXEC_FILTER% ' AND @Priority<2 AND @Architecture='%BUILD_ARCH % '"
355+ set SELECT_FILTER = /select:" @Name='%TEST_EXEC_FILTER% ' AND @Priority<2 AND @Architecture='%TEST_ARCH % '"
352356 )
353357 call :runte clang-hlsl-tests.dll !SELECT_FILTER! %EXEC_COMMON_ARGS% %ADDITIONAL_OPTS%
354358 set RES_EXEC = !ERRORLEVEL!
@@ -364,9 +368,9 @@ if exist "%HCT_EXTRAS%\hcttest-extras.cmd" (
364368
365369if " %TEST_DXILCONV% " == " 1" (
366370 if " %TEST_DXILCONV_FILTER% " == " " (
367- set SELECT_FILTER = /select:" @Architecture='%BUILD_ARCH % '"
371+ set SELECT_FILTER = /select:" @Architecture='%TEST_ARCH % '"
368372 ) else (
369- set SELECT_FILTER = /select:" @Name='%TEST_DXILCONV_FILTER% ' AND @Architecture='%BUILD_ARCH % '"
373+ set SELECT_FILTER = /select:" @Name='%TEST_DXILCONV_FILTER% ' AND @Architecture='%TEST_ARCH % '"
370374 )
371375 call :runte dxilconv-tests.dll /p:" HlslDataDir=%HLSL_SRC_DIR% \projects\dxilconv\test" !SELECT_FILTER!
372376 set RES_DXILCONV = !ERRORLEVEL!
0 commit comments