feat: copy packager_test.py in CMake (#1284)
This is used to run a fairly large number of integrations tests (which are exposing some failures on the CMake branch). Let's copy these over first to enable the integration tests workflow. Actually running integration tests in CTest is off by default (gated by `SKIP_INTEGRATION_TESTS` while we fix the tests).
This commit is contained in:
parent
985abb23d6
commit
e516608c5e
|
@ -22,6 +22,8 @@ option(LIBPACKAGER_SHARED "Build libpackager as a shared library" OFF)
|
|||
# Enable CMake's test infrastructure.
|
||||
enable_testing()
|
||||
|
||||
option(SKIP_INTEGRATION_TESTS "Skip the packager integration tests" ON)
|
||||
|
||||
# Subdirectories with their own CMakeLists.txt
|
||||
add_subdirectory(packager)
|
||||
add_subdirectory(link-test)
|
||||
|
|
|
@ -191,8 +191,37 @@ target_link_libraries(packager_test
|
|||
gtest
|
||||
gtest_main)
|
||||
|
||||
configure_file(packager.pc.in packager.pc @ONLY)
|
||||
list(APPEND packager_test_py_sources
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/app/test/packager_app.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/app/test/packager_test.py"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/app/test/test_env.py")
|
||||
|
||||
list(APPEND packager_test_py_output
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/packager_app.py"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/packager_test.py"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/test_env.py")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${packager_test_py_output}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/app/test/packager_app.py ${CMAKE_CURRENT_BINARY_DIR}/packager_app.py
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/app/test/packager_test.py ${CMAKE_CURRENT_BINARY_DIR}/packager_test.py
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/app/test/test_env.py ${CMAKE_CURRENT_BINARY_DIR}/test_env.py
|
||||
DEPENDS ${packager_test_py_sources}
|
||||
)
|
||||
|
||||
add_custom_target(packager_test_py_copy ALL
|
||||
DEPENDS ${packager_test_py_output} packager
|
||||
SOURCES ${packager_test_py_sources}
|
||||
)
|
||||
|
||||
if(NOT SKIP_INTEGRATION_TESTS)
|
||||
add_test (NAME packager_test_py
|
||||
COMMAND ${PYTHON_EXECUTABLE} packager_test.py
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
configure_file(packager.pc.in packager.pc @ONLY)
|
||||
|
||||
install(DIRECTORY ../include/packager
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
# Copyright 2023 Google LLC. All rights reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file or at
|
||||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
add_library(libpackager STATIC
|
||||
job_manager.cc
|
||||
single_thread_job_manager.cc)
|
||||
target_link_libraries(libpackager
|
||||
absl::synchronization
|
||||
media_chunking
|
||||
media_origin
|
||||
status)
|
Loading…
Reference in New Issue