Commit 2a9531bf authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Add meta's test.

parent 62333c7c
...@@ -6,20 +6,28 @@ add_executable(test_libvlc_media_player libvlc/media_player.c ...@@ -6,20 +6,28 @@ add_executable(test_libvlc_media_player libvlc/media_player.c
add_executable(test_libvlc_media_list libvlc/media_list.c) add_executable(test_libvlc_media_list libvlc/media_list.c)
add_executable(test_libvlc_media_list_player libvlc/media_list_player.c add_executable(test_libvlc_media_list_player libvlc/media_list_player.c
samples/test.sample) samples/test.sample)
add_executable(test_libvlc_meta libvlc/meta.c
samples/meta.sample)
target_link_libraries(test_libvlc_core libvlc-control) target_link_libraries(test_libvlc_core libvlc-control)
target_link_libraries(test_libvlc_events libvlc-control) target_link_libraries(test_libvlc_events libvlc-control)
target_link_libraries(test_libvlc_media_player libvlc-control) target_link_libraries(test_libvlc_media_player libvlc-control)
target_link_libraries(test_libvlc_media_list libvlc-control) target_link_libraries(test_libvlc_media_list libvlc-control)
target_link_libraries(test_libvlc_media_list_player libvlc-control) target_link_libraries(test_libvlc_media_list_player libvlc-control)
target_link_libraries(test_libvlc_meta libvlc-control)
set(SAMPLES_SERVER http://streams.videolan.org/streams-videolan/reference) set(SAMPLES_SERVER http://streams.videolan.org/streams-videolan/reference)
add_custom_command( MACRO(download_sample sample dest)
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/samples/test.sample add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${dest}
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/samples COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/samples
COMMAND curl -L ${SAMPLES_SERVER}/avi/Hero-Div3.avi > ${CMAKE_CURRENT_BINARY_DIR}/samples/test.sample COMMAND curl -L ${SAMPLES_SERVER}/${sample} > ${CMAKE_CURRENT_BINARY_DIR}/${dest}
) )
ENDMACRO(download_sample)
download_sample(avi/Hero-Div3.avi samples/test.sample)
download_sample(metadata/id3tag/Wesh-Bonneville.mp3 samples/meta.sample)
add_test(test_libvlc_core add_test(test_libvlc_core
${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_core) ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_core)
...@@ -31,4 +39,6 @@ add_test(test_libvlc_media_list ...@@ -31,4 +39,6 @@ add_test(test_libvlc_media_list
${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list) ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list)
add_test(test_libvlc_media_list_player add_test(test_libvlc_media_list_player
${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list_player) ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list_player)
add_test(test_libvlc_meta
${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_meta)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment