diff --git a/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt b/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt index ac73761414..c2d9fb8345 100644 --- a/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt +++ b/projects/rocprofiler-systems/examples/videodecode/CMakeLists.txt @@ -72,6 +72,20 @@ else() videodecode_message(AUTHOR_WARNING "${PROJECT_NAME} skipped. Missing RocDecode ...") endif() +# Copy video files to build directory +if(EXISTS "${ROCmVersion_DIR}/share/rocdecode/video") + if(NOT EXISTS "${CMAKE_BINARY_DIR}/videos") + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/videos") + endif() + + file(GLOB_RECURSE video_files "${ROCmVersion_DIR}/share/rocdecode/video/*H26*.mp4") + file(COPY ${video_files} DESTINATION ${CMAKE_BINARY_DIR}/videos) +else() + videodecode_message( + AUTHOR_WARNING + "Source directory ${ROCmVersion_DIR}/share/rocdecode/video does not exist") +endif() + # Find FFMPEG find_package(FFmpeg) if(NOT FFMPEG_FOUND) @@ -146,6 +160,10 @@ if(FFMPEG_FOUND AND ROCDECODE_FOUND) TARGETS videodecode DESTINATION bin COMPONENT rocprofiler-systems-examples) + install( + FILES ${CMAKE_BINARY_DIR}/videos + DESTINATION share/rocprofiler-systems/tests/videos + COMPONENT rocprofiler-systems-examples) endif() else() message( diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-videodecode-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-videodecode-tests.cmake index d109b53326..2728a63ebb 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-videodecode-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-videodecode-tests.cmake @@ -9,7 +9,7 @@ rocprofiler_systems_add_test( NAME videodecode TARGET videodecode GPU ON - RUN_ARGS -i ${ROCmVersion_DIR}/share/rocdecode/video/ -t 2 + RUN_ARGS -i ${PROJECT_BINARY_DIR}/videos -t 1 LABELS "videodecode") rocprofiler_systems_add_validation_test(