diff --git a/.jenkins_builds b/.jenkins_builds index 5ac02aaf..6ea987fb 100644 --- a/.jenkins_builds +++ b/.jenkins_builds @@ -6,7 +6,7 @@ pipeline { environment { DEVELOPER_PRIVATE_KEY = "/.ci/repertory/cert/developer.priv" DEVELOPER_PUBLIC_KEY = "/.ci/repertory/cert/developer.pub" - PROJECT_TEST_DIR = "/.ci/repertory/test" + PROJECT_TEST_CONFIG_DIR = "/.ci/repertory/test_config" } options { diff --git a/post_build.sh b/post_build.sh index b834725b..4f5435c6 100755 --- a/post_build.sh +++ b/post_build.sh @@ -3,8 +3,8 @@ CURRENT_DIR=$(dirname "$0") CURRENT_DIR=$(realpath ${CURRENT_DIR}) -rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_config/ \ - ${PROJECT_BUILD_DIR}/build/test_config/ +rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_input/ \ + ${PROJECT_BUILD_DIR}/build/test_input/ -rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_config/ \ - ${PROJECT_DIST_DIR}/test_config/ +rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_input/ \ + ${PROJECT_DIST_DIR}/test_input/ diff --git a/repertory/repertory_test/src/winfsp_drive_test.cpp b/repertory/repertory_test/src/winfsp_drive_test.cpp index e30caef5..a31a4d29 100644 --- a/repertory/repertory_test/src/winfsp_drive_test.cpp +++ b/repertory/repertory_test/src/winfsp_drive_test.cpp @@ -165,65 +165,6 @@ namespace repertory { // } // } // } -// -// TEST_F(winfsp_test, all_tests) { -// if (PROVIDER_INDEX == 0) { -// for (std::size_t idx = 0U; idx < 2U; idx++) { -// launch_app( -// ("cmd.exe /c unittests.exe --gtest_filter=winfsp_test.all_tests " -// "--provider_index " + -// std::to_string(idx) + " > unittests" + std::to_string(idx) + -// ".log 2>&1")); -// } -// -// return; -// } -// -// if (PROVIDER_INDEX == 1U) { -// return; -// } -// -// std::string mount_point; -// const auto drive_args = mount_setup(mount_point); -// -// event_capture ec({ -// "drive_mounted", -// "drive_unmounted", -// "drive_unmount_pending", -// "drive_mount_result", -// }); -// -// std::thread th([&] { -// const auto mounted = ec.wait_for_event("drive_mounted"); -// EXPECT_TRUE(mounted); -// if (mounted) { -// root_creation_test(mount_point); -// { -// const auto file = create_test(this, mount_point); -// delete_file_test(file); -// } -// { -// const auto dir = utils::path::combine(mount_point, {"TestDir"}); -// create_directory_test(dir); -// remove_directory_test(dir); -// } -// write_file_test(mount_point); -// read_file_test(mount_point); -// // TODO enable after rename support is available -// // rename_file_test(this, mount_point); -// // rename_directory_test(mount_point); -// overwrite_file_test(mount_point); -// get_set_basic_info_test(mount_point); -// } -// -// if (mounted) { -// unmount(this, mount_point); -// ec.wait_for_empty(); -// } -// }); -// -// execute_mount(this, drive_args, th); -// } TYPED_TEST_CASE(winfsp_test, winfsp_provider_types); diff --git a/repertory/repertory_test/test_config/encrypt/sub10/moose.txt b/repertory/repertory_test/test_input/encrypt/sub10/moose.txt similarity index 83% rename from repertory/repertory_test/test_config/encrypt/sub10/moose.txt rename to repertory/repertory_test/test_input/encrypt/sub10/moose.txt index 77356c31..9daeafb9 100644 --- a/repertory/repertory_test/test_config/encrypt/sub10/moose.txt +++ b/repertory/repertory_test/test_input/encrypt/sub10/moose.txt @@ -1 +1 @@ -test +test diff --git a/repertory/repertory_test/test_config/encrypt/test.txt b/repertory/repertory_test/test_input/encrypt/test.txt similarity index 85% rename from repertory/repertory_test/test_config/encrypt/test.txt rename to repertory/repertory_test/test_input/encrypt/test.txt index 8f0ef0d5..a8cb35ca 100644 --- a/repertory/repertory_test/test_config/encrypt/test.txt +++ b/repertory/repertory_test/test_input/encrypt/test.txt @@ -1 +1 @@ -moose +moose diff --git a/support/test/src/test.cpp b/support/test/src/test.cpp index 735b3143..41aea437 100644 --- a/support/test/src/test.cpp +++ b/support/test/src/test.cpp @@ -110,10 +110,19 @@ auto generate_test_file_name(std::string_view file_name_no_extension) return generated_files.back()->get_path(); } +auto get_test_config_dir() -> std::string { + static auto test_path = ([]() -> std::string { + auto dir = utils::get_environment_variable("PROJECT_TEST_CONFIG_DIR"); + return utils::path::combine(dir.empty() ? "." : dir, {"test_config"}); + })(); + + return test_path; +} + auto get_test_input_dir() -> std::string { static auto test_path = ([]() -> std::string { - auto dir = utils::get_environment_variable("PROJECT_TEST_DIR"); - return utils::path::combine(dir.empty() ? "." : dir, {"test_config"}); + auto dir = utils::get_environment_variable("PROJECT_TEST_INPUT_DIR"); + return utils::path::combine(dir.empty() ? "." : dir, {"test_input"}); })(); return test_path;