Skip to content

Commit 92ee02e

Browse files
authored
[lit] Make lit the only test runner (#5402)
Remove disable-lit and enable-lit from hctbuild/hcttest. This is to allow write lit FileCheck shell test.
1 parent 65aa41f commit 92ee02e

7 files changed

Lines changed: 7 additions & 737 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ option(LLVM_BUILD_TESTS
391391
"Build LLVM unit tests. If OFF, just generate build targets." OFF)
392392
option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
393393

394+
option(HLSL_INCLUDE_TESTS "Generate build targets for the HLSL unit tests." ON)
395+
394396
option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
395397
option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
396398
option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OFF)

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ before_build:
3838
- cmd: call utils\hct\hctstart %HLSL_SRC_DIR% %HLSL_BLD_DIR%
3939

4040
build_script:
41-
- cmd: call utils\hct\hctbuild -%PLATFORM% -%CONFIGURATION% -show-cmake-log -spirvtest -enable-lit
41+
- cmd: call utils\hct\hctbuild -%PLATFORM% -%CONFIGURATION% -show-cmake-log -spirvtest
4242
- sh: mkdir build && cd build
4343
- sh: cmake .. -GNinja -C ../cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DLLVM_ENABLE_WERROR=On
4444
- sh: ninja
4545

4646
test_script:
4747
- ps: utils\appveyor\appveyor_test.ps1
48-
- cmd: call utils\hct\hcttest -rel clang -enable-lit
48+
- cmd: call utils\hct\hcttest -rel clang
4949
- sh: ./bin/dxc --help
5050
- sh: ./bin/dxc -T ps_6_0 ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
5151
- sh: ./bin/dxc -T ps_6_0 -Fo passthru-ps.dxil ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ stages:
2828
submodules: true
2929
- script: |
3030
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
31-
call utils\hct\hctbuild.cmd -$(platform) -$(configuration) -show-cmake-log -spirvtest -enable-lit
31+
call utils\hct\hctbuild.cmd -$(platform) -$(configuration) -show-cmake-log -spirvtest
3232
displayName: 'Building'
3333
- script: |
3434
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
35-
call utils\hct\hcttest.cmd -$(configuration) noexec -enable-lit
35+
call utils\hct\hcttest.cmd -$(configuration) noexec
3636
displayName: 'DXIL Tests'
3737
- script: |
3838
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
39-
call utils\hct\hcttest.cmd -$(configuration) spirv_only -enable-lit
39+
call utils\hct\hcttest.cmd -$(configuration) spirv_only
4040
displayName: 'SPIRV Tests'
4141
4242
- job: Nix

cmake/caches/PredefinedParams.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ if (DXC_COVERAGE)
1212
set(LLVM_CODE_COVERAGE_TEST_TARGETS "check-all" CACHE STRING "")
1313
endif()
1414

15-
# TODO: remove this option after switch to support lit only.
16-
if (DXC_DISABLE_LIT)
17-
set(LLVM_TEST_VALUE OFF)
18-
else()
19-
set(LLVM_TEST_VALUE ON)
20-
endif()
21-
22-
set(LLVM_INCLUDE_TESTS ${LLVM_TEST_VALUE} CACHE BOOL "")
23-
set(CLANG_INCLUDE_TESTS ${LLVM_TEST_VALUE} CACHE BOOL "")
24-
2515
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "")
2616
set(LLVM_APPEND_VC_REV ON CACHE BOOL "")
2717
set(LLVM_DEFAULT_TARGET_TRIPLE "dxil-ms-dx" CACHE STRING "")

utils/hct/hctbuild.cmd

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ set SPV_TEST=OFF
4242
set DXILCONV=ON
4343
set DXC_CMAKE_SYSTEM_VERSION=
4444
set SHOW_CMAKE_LOG=0
45-
set ENABLE_LIT=ON
4645
set WINSDK_MIN_VERSION=10.0.17763.0
4746
set INSTALL_DIR=
4847
set DEFAULT_EXEC_ADAPTER=-DTAEF_EXEC_ADAPTER=
@@ -189,16 +188,6 @@ if "%1"=="-dxc-cmake-system-version" (
189188
if "%1"=="-show-cmake-log" (
190189
set SHOW_CMAKE_LOG=1
191190
shift /1 & goto :parse_args
192-
)
193-
if "%1"=="-disable-lit" (
194-
echo Disable LIT testing
195-
set ENABLE_LIT=OFF
196-
shift /1 & goto :parse_args
197-
)
198-
if "%1"=="-enable-lit" (
199-
echo Enable LIT testing
200-
set ENABLE_LIT=ON
201-
shift /1 & goto :parse_args
202191
)
203192
if "%1"=="-lit-xml-output-path" (
204193
set "CMAKE_OPTS=%CMAKE_OPTS% -DLLVM_LIT_ARGS=--xunit-xml-output=%~2"
@@ -325,7 +314,6 @@ set CMAKE_OPTS=%CMAKE_OPTS% -DENABLE_SPIRV_CODEGEN:BOOL=%SPIRV%
325314
set CMAKE_OPTS=%CMAKE_OPTS% -DSPIRV_BUILD_TESTS:BOOL=%SPV_TEST%
326315
set CMAKE_OPTS=%CMAKE_OPTS% -DCLANG_ENABLE_ARCMT:BOOL=OFF
327316
set CMAKE_OPTS=%CMAKE_OPTS% -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF
328-
set CMAKE_OPTS=%CMAKE_OPTS% -DCLANG_INCLUDE_TESTS:BOOL=%ENABLE_LIT% -DLLVM_INCLUDE_TESTS:BOOL=%ENABLE_LIT%
329317
set CMAKE_OPTS=%CMAKE_OPTS% -DHLSL_INCLUDE_TESTS:BOOL=ON
330318
set CMAKE_OPTS=%CMAKE_OPTS% -DLLVM_TARGETS_TO_BUILD:STRING=None
331319
set CMAKE_OPTS=%CMAKE_OPTS% -DLLVM_INCLUDE_DOCS:BOOL=OFF -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF

utils/hct/hcttest.cmd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ if "%1"=="-clean" (
161161
set TEST_EXTRAS=1
162162
) else if "%1"=="-ninja" (
163163
set GENERATOR_NINJA=1
164-
) else if "%1"=="-disable-lit" (
165-
set TEST_USE_LIT=0
166-
) else if "%1"=="-enable-lit" (
167-
set TEST_USE_LIT=1
168164
) else if "%1"=="-rel" (
169165
set BUILD_CONFIG=Release
170166
) else if /i "%1"=="-Release" (
@@ -417,11 +413,6 @@ if "%TEST_CLANG%"=="1" (
417413
set RES_CLANG=!ERRORLEVEL!
418414
)
419415

420-
if "%TEST_CMD%"=="1" (
421-
copy /y %HLSL_SRC_DIR%\utils\hct\cmdtestfiles\smoke.hlsl %TEST_DIR%\smoke.hlsl
422-
call %HLSL_SRC_DIR%\utils\hct\hcttestcmds.cmd %TEST_DIR% %HLSL_SRC_DIR%\tools\clang\test\HLSL
423-
set RES_CMD=!ERRORLEVEL!
424-
)
425416

426417
if "%TEST_EXEC%"=="1" (
427418
call :copyagility

0 commit comments

Comments
 (0)