Skip to content

Commit

Permalink
Copy test data before run
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Mar 16, 2023
1 parent 4b40c3b commit 3df9cf3
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions libmamba/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ set(LIBMAMBA_TEST_SRCS
src/core/test_configuration.cpp
src/core/test_cpp.cpp
src/core/test_env_file_reading.cpp
src/core/test_env_lockfile.cpp
src/core/test_environments_manager.cpp
src/core/test_execution.cpp
src/core/test_filesystem.cpp
src/core/test_history.cpp
src/core/test_invoke.cpp
src/core/history_test/test_history.cpp
src/core/test_lockfile.cpp
src/core/test_output.cpp
src/core/test_pinning.cpp
src/core/test_output.cpp
src/core/test_progress_bar.cpp
src/core/test_satisfiability_error.cpp
src/core/test_shell_init.cpp
src/core/test_tasksync.cpp
src/core/test_thread_utils.cpp
src/core/test_transfer.cpp
src/core/test_url.cpp
src/core/test_validate.cpp
src/core/test_virtual_packages.cpp
src/core/test_util.cpp
src/core/test_util_cast.cpp
src/core/test_util_compare.cpp
src/core/test_util_graph.cpp
src/core/test_util_string.cpp
src/core/test_validate.cpp
src/core/test_virtual_packages.cpp
src/core/test_util_graph.cpp
src/core/test_env_lockfile.cpp
src/core/test_execution.cpp
src/core/test_invoke.cpp
src/core/test_tasksync.cpp
src/core/test_filesystem.cpp
src/core/test_satisfiability_error.cpp
)

message(STATUS "Building libmamba C++ tests")
Expand All @@ -64,10 +64,13 @@ target_link_libraries(
PRIVATE GTest::GTest GTest::Main Threads::Threads
)

# Copy data directory into binary dir to avoid modifications
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/data" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")

target_compile_definitions(
test_libmamba
PRIVATE
MAMBA_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data"
MAMBA_TEST_DATA_DIR="${CMAKE_CURRENT_BINARY_DIR}/data"
MAMBA_TEST_LOCK_EXE="$<TARGET_FILE:testing_libmamba_lock>"
)

Expand Down

0 comments on commit 3df9cf3

Please sign in to comment.