Skip to content

Commit d5ca6c3

Browse files
committed
ensure vvdecapp is built for the test suite
even when -DVVDEC_LIBRARY_ONLY=1 is set
1 parent 65509e7 commit d5ca6c3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,15 @@ endforeach()
429429
get_directory_property( ALL_TESTS TESTS )
430430
set_tests_properties( ${ALL_TESTS} PROPERTIES
431431
TIMEOUT 120
432-
FAIL_REGULAR_EXPRESSION "(WARNING:|runtime error)" )
432+
FAIL_REGULAR_EXPRESSION "(WARNING:|runtime error)"
433+
FIXTURES_REQUIRED "BuildTestBinaries" )
433434

434-
add_custom_target( test-ok USES_TERMINAL COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> -R "\"^(Test|MISSING)\"" )
435-
add_custom_target( test-all USES_TERMINAL COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> -R "\"^(Test|MISSING|Faulty)\"" )
435+
# ensure vvdecapp is built before the tests (as a test case setup fixture)
436+
add_test( NAME "build test binaries" COMMAND ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --target vvdecapp )
437+
set_tests_properties( "build test binaries" PROPERTIES FIXTURES_SETUP BuildTestBinaries TIMEOUT 0 )
438+
439+
add_custom_target( test-ok USES_TERMINAL COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> -R "\"^(Test|MISSING)\"" DEPENDS vvdecapp )
440+
add_custom_target( test-all USES_TERMINAL COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIG> -R "\"^(Test|MISSING|Faulty)\"" DEPENDS vvdecapp )
436441

437442
if( MISSING_BITSTREAM_FILES )
438443
message( STATUS "Some bitstream files are missing." )

0 commit comments

Comments
 (0)