Skip to content

Commit

Permalink
Enable tracing in fuzz tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PatKamin committed Sep 4, 2023
1 parent 18b85d4 commit 8ccb7ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
-B${{github.workspace}}/build
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DUR_ENABLE_TRACING=OFF
-DUR_ENABLE_TRACING=ON
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DUR_BUILD_TESTS=ON
-DUR_USE_ASAN=ON
Expand Down
9 changes: 8 additions & 1 deletion test/fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ function(add_fuzz_test name label)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

set(ENV_VARS UR_ENABLE_LAYERS=UR_LAYER_FULL_VALIDATION)
if (UR_BUILD_ADAPTER_L0)
if(UR_BUILD_ADAPTER_L0)
list(APPEND ENV_VARS
UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_level_zero>\"
NEOReadDebugKeys=1
DisableDeepBind=1)
else()
list(APPEND ENV_VARS UR_ADAPTERS_FORCE_LOAD=\"$<TARGET_FILE:ur_adapter_null>\")
endif()
if(UR_ENABLE_TRACING)
list(APPEND ENV_VARS
XPTI_TRACE_ENABLE=1
XPTI_FRAMEWORK_DISPATCHER=$<TARGET_FILE:xptifw>
XPTI_SUBSCRIBERS=$<TARGET_FILE:collector>
UR_ENABLE_LAYERS=UR_LAYER_TRACING)
endif()
set_tests_properties(${TEST_TARGET_NAME} PROPERTIES
LABELS ${label}
ENVIRONMENT "${ENV_VARS}")
Expand Down

0 comments on commit 8ccb7ba

Please sign in to comment.