Skip to content

Commit 33dd542

Browse files
authored
Use WARP from nuget by default (microsoft#7427)
Previously using WARP from nuget was something that had to be opted in to. This change makes it the default behvior. This allows some simplifications. The nuget package is installed at configure time. If the user wants to override the nuget installation behavior then they can pass in extra parameters, rather than having an alternative mechanism for describing which package to use. The actual DLL to load is specified through a TAEF parameter and specifies the full path to the DLL.
1 parent 465bd12 commit 33dd542

8 files changed

Lines changed: 175 additions & 293 deletions

File tree

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ stages:
4444
displayName: 'DXIL Tests'
4545
- script: |
4646
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
47-
call utils\hct\hcttest.cmd -$(configuration) exec-warp
48-
displayName: 'DXIL Execution Tests (Nuget WARP)'
47+
call utils\hct\hcttest.cmd -$(configuration) exec
48+
displayName: 'DXIL Execution Tests'
4949
5050
- job: Nix
5151
timeoutInMinutes: 165

cmake/modules/Nuget.cmake

Lines changed: 0 additions & 233 deletions
This file was deleted.

tools/clang/test/CMakeLists.txt

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ configure_lit_site_cfg(
2626
${CMAKE_CURRENT_BINARY_DIR}/taef/lit.site.cfg
2727
)
2828

29+
# HLSL Change begin
30+
# This must be done before configuring taef_exec's lit.site.cfg.
31+
include(taef_exec/DownloadWarp.cmake)
32+
# HLSL Change end
33+
34+
2935
configure_lit_site_cfg(
3036
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec/lit.site.cfg.in
3137
${CMAKE_CURRENT_BINARY_DIR}/taef_exec/lit.site.cfg
@@ -211,52 +217,40 @@ add_lit_testsuites(CLANG ${CMAKE_CURRENT_SOURCE_DIR}
211217
FOLDER "Clang tests/Suites"
212218
)
213219

214-
# The code below here _ONLY_ executes when building with Visual Studio or Xcode.
215-
if (NOT CMAKE_CONFIGURATION_TYPES)
216-
return()
217-
endif()
218220

219-
# Add the unit test suite
220-
add_lit_target("check-clang-unit" "Running lit suite clang-unit"
221-
${CMAKE_CURRENT_SOURCE_DIR}/Unit
222-
PARAMS ${CLANG_TEST_PARAMS}
223-
DEPENDS ClangUnitTests
224-
ARGS ${CLANG_TEST_EXTRA_ARGS}
225-
)
221+
# add_lit_testsuites doesn't generate targets for Visual Studio or Xcode builds
222+
# (since these IDEs cannot handle the huge number of targets it generates).
223+
#
224+
# We must manually generate targets that we want to expose when using these
225+
# generators.
226+
if(CMAKE_CONFIGURATION_TYPES)
226227

227-
# Add TAEF targets
228-
if (WIN32)
229-
add_lit_target("check-clang-taef" "Running lit suite hlsl"
230-
${CMAKE_CURRENT_SOURCE_DIR}/taef
231-
PARAMS ${CLANG_TEST_PARAMS}
232-
DEPENDS ClangHLSLTests
233-
ARGS ${CLANG_TEST_EXTRA_ARGS}
234-
)
235-
set(TAEF_EXEC_ADAPTER "" CACHE STRING "adapter for taef exec test")
236-
237-
# Use a custom target so we can depend on it and re-run the cmake logic which downloads warp
238-
# from nuget if requested.
239-
add_custom_target(WarpFromNuget
240-
COMMAND "${CMAKE_COMMAND}"
241-
-DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
242-
-DBUILD_TYPE=${CMAKE_BUILD_TYPE}
243-
-DBINARY_DIR=${CMAKE_BINARY_DIR}
244-
-P "${CMAKE_SOURCE_DIR}/cmake/modules/nuget.cmake")
245-
246-
add_lit_target("check-clang-taef-exec" "Running lit suite hlsl execution test"
247-
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec
228+
# Add the unit test suite
229+
add_lit_target("check-clang-unit" "Running lit suite clang-unit"
230+
${CMAKE_CURRENT_SOURCE_DIR}/Unit
248231
PARAMS ${CLANG_TEST_PARAMS}
249-
adapter=${TAEF_EXEC_ADAPTER}
250-
DEPENDS ExecHLSLTests dxexp
232+
DEPENDS ClangUnitTests
251233
ARGS ${CLANG_TEST_EXTRA_ARGS}
252234
)
253235

254-
add_lit_target("check-clang-taef-exec-warp" "Running lit suite hlsl execution test with D3D WARP from nuget"
255-
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec
256-
PARAMS ${CLANG_TEST_PARAMS}
257-
adapter=${TAEF_EXEC_ADAPTER}
258-
DEPENDS ExecHLSLTests dxexp WarpFromNuget
259-
ARGS ${CLANG_TEST_EXTRA_ARGS}
260-
)
236+
# Add TAEF targets
237+
if(WIN32)
238+
add_lit_target("check-clang-taef" "Running lit suite hlsl"
239+
${CMAKE_CURRENT_SOURCE_DIR}/taef
240+
PARAMS ${CLANG_TEST_PARAMS}
241+
DEPENDS ClangHLSLTests
242+
ARGS ${CLANG_TEST_EXTRA_ARGS}
243+
)
244+
set(TAEF_EXEC_ADAPTER "" CACHE STRING "adapter for taef exec test")
245+
246+
add_lit_target("check-clang-taef-exec" "Running lit suite hlsl execution test"
247+
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec
248+
PARAMS ${CLANG_TEST_PARAMS}
249+
adapter=${TAEF_EXEC_ADAPTER}
250+
DEPENDS ExecHLSLTests dxexp
251+
ARGS ${CLANG_TEST_EXTRA_ARGS}
252+
)
253+
endif()
261254
endif()
255+
262256
# HLSL Change End

0 commit comments

Comments
 (0)