updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2024-08-31 08:46:51 -05:00
parent a15523c375
commit 72a0b653ba
11 changed files with 37 additions and 37 deletions

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#ifndef REPERTORY_TEST_INCLUDE_TEST_HPP_ #ifndef FIFTHGRID_TEST_INCLUDE_TEST_HPP_
#define REPERTORY_TEST_INCLUDE_TEST_HPP_ #define FIFTHGRID_TEST_INCLUDE_TEST_HPP_
#if defined(U) #if defined(U)
#undef U #undef U
@ -36,7 +36,7 @@ using namespace ::testing;
#include "utils/all.hpp" #include "utils/all.hpp"
namespace repertory::test { namespace fifthgrid::test {
#if defined(PROJECT_ENABLE_LIBSODIUM) #if defined(PROJECT_ENABLE_LIBSODIUM)
[[nodiscard]] auto [[nodiscard]] auto
create_random_file(std::size_t size) -> utils::file::i_file &; create_random_file(std::size_t size) -> utils::file::i_file &;
@ -58,6 +58,6 @@ auto generate_test_directory() -> utils::file::i_directory &;
[[nodiscard]] auto get_test_input_dir() -> std::string; [[nodiscard]] auto get_test_input_dir() -> std::string;
[[nodiscard]] auto get_test_output_dir() -> std::string; [[nodiscard]] auto get_test_output_dir() -> std::string;
} // namespace repertory::test } // namespace fifthgrid::test
#endif // REPERTORY_TEST_INCLUDE_TEST_HPP_ #endif // FIFTHGRID_TEST_INCLUDE_TEST_HPP_

View File

@ -24,15 +24,15 @@
namespace { namespace {
static std::recursive_mutex file_mtx{}; static std::recursive_mutex file_mtx{};
static std::vector<std::unique_ptr<repertory::utils::file::i_fs_item>> static std::vector<std::unique_ptr<fifthgrid::utils::file::i_fs_item>>
generated_files{}; generated_files{};
static void delete_generated_files() { static void delete_generated_files() {
repertory::recur_mutex_lock lock{file_mtx}; fifthgrid::recur_mutex_lock lock{file_mtx};
std::optional<std::string> parent_path; std::optional<std::string> parent_path;
for (auto &&path : generated_files) { for (auto &&path : generated_files) {
if (parent_path->empty()) { if (parent_path->empty()) {
parent_path = repertory::utils::path::get_parent_path(path->get_path()); parent_path = fifthgrid::utils::path::get_parent_path(path->get_path());
} }
[[maybe_unused]] auto removed = path->remove(); [[maybe_unused]] auto removed = path->remove();
@ -41,7 +41,7 @@ static void delete_generated_files() {
if (parent_path.has_value()) { if (parent_path.has_value()) {
EXPECT_TRUE( EXPECT_TRUE(
repertory::utils::file::directory(*parent_path).remove_recursively()); fifthgrid::utils::file::directory(*parent_path).remove_recursively());
} }
} }
@ -52,7 +52,7 @@ struct file_deleter final {
static auto deleter{std::make_unique<file_deleter>()}; static auto deleter{std::make_unique<file_deleter>()};
} // namespace } // namespace
namespace repertory::test { namespace fifthgrid::test {
#if defined(PROJECT_ENABLE_LIBSODIUM) #if defined(PROJECT_ENABLE_LIBSODIUM)
auto create_random_file(std::size_t size) -> utils::file::i_file & { auto create_random_file(std::size_t size) -> utils::file::i_file & {
recur_mutex_lock lock{file_mtx}; recur_mutex_lock lock{file_mtx};
@ -134,4 +134,4 @@ auto get_test_output_dir() -> std::string {
return test_path; return test_path;
} }
} // namespace repertory::test } // namespace fifthgrid::test

View File

@ -21,7 +21,7 @@
*/ */
#include "test.hpp" #include "test.hpp"
namespace repertory { namespace fifthgrid {
TEST(utils_collection, excludes) { TEST(utils_collection, excludes) {
auto data = {"cow", "moose", "dog", "chicken"}; auto data = {"cow", "moose", "dog", "chicken"};
EXPECT_FALSE(utils::collection::excludes(data, "chicken")); EXPECT_FALSE(utils::collection::excludes(data, "chicken"));
@ -247,4 +247,4 @@ TEST(utils_collection, remove_element) {
EXPECT_EQ(static_cast<std::uint8_t>(0xEE), col.at(1U)); EXPECT_EQ(static_cast<std::uint8_t>(0xEE), col.at(1U));
} }
} }
} // namespace repertory } // namespace fifthgrid

View File

@ -21,7 +21,7 @@
*/ */
#include "test.hpp" #include "test.hpp"
namespace repertory { namespace fifthgrid {
TEST(utils_common, calculate_read_size) { TEST(utils_common, calculate_read_size) {
auto read_size = utils::calculate_read_size(0U, 0U, 0U); auto read_size = utils::calculate_read_size(0U, 0U, 0U);
EXPECT_EQ(0U, read_size); EXPECT_EQ(0U, read_size);
@ -273,7 +273,7 @@ TEST(utils_common, get_environment_variable) {
std::string path; std::string path;
#if defined(_WIN32) #if defined(_WIN32)
path.resize(repertory::max_path_length + 1U); path.resize(fifthgrid::max_path_length + 1U);
auto size = ::GetEnvironmentVariableA(path_env.c_str(), path.data(), 0U); auto size = ::GetEnvironmentVariableA(path_env.c_str(), path.data(), 0U);
path.resize(size); path.resize(size);
@ -305,4 +305,4 @@ TEST(utils_common, get_next_available_port_fails_if_starting_point_is_zero) {
EXPECT_EQ(0U, available_port); EXPECT_EQ(0U, available_port);
} }
#endif // defined(PROJECT_ENABLE_BOOST) #endif // defined(PROJECT_ENABLE_BOOST)
} // namespace repertory } // namespace fifthgrid

View File

@ -23,7 +23,7 @@
#if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST) #if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)
namespace repertory { namespace fifthgrid {
TEST(utils_encrypting_reader, read_file_data) { TEST(utils_encrypting_reader, read_file_data) {
const auto token = std::string("moose"); const auto token = std::string("moose");
auto &source_file = test::create_random_file( auto &source_file = test::create_random_file(
@ -220,6 +220,6 @@ TEST(utils_encrypting_reader, read_file_data_in_multiple_chunks_as_stream) {
} }
} }
} }
} // namespace repertory } // namespace fifthgrid
#endif // defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST) #endif // defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)

View File

@ -23,7 +23,7 @@
#if defined(PROJECT_ENABLE_LIBSODIUM) #if defined(PROJECT_ENABLE_LIBSODIUM)
namespace repertory { namespace fifthgrid {
static constexpr const std::string_view token{"moose"}; static constexpr const std::string_view token{"moose"};
static constexpr const std::wstring_view token_w{L"moose"}; static constexpr const std::wstring_view token_w{L"moose"};
@ -278,6 +278,6 @@ TEST(utils_encryption, decrypt_file_path) {
} }
} }
#endif // defined(PROJECT_ENABLE_BOOST) #endif // defined(PROJECT_ENABLE_BOOST)
} // namespace repertory } // namespace fifthgrid
#endif // defined(PROJECT_ENABLE_LIBSODIUM) #endif // defined(PROJECT_ENABLE_LIBSODIUM)

View File

@ -21,7 +21,7 @@
*/ */
#include "test.hpp" #include "test.hpp"
namespace repertory { namespace fifthgrid {
template <typename T, typename U> template <typename T, typename U>
constexpr bool is_decay_equ = std::is_same_v<std::decay_t<T>, U>; constexpr bool is_decay_equ = std::is_same_v<std::decay_t<T>, U>;
@ -63,4 +63,4 @@ TEST(utils_error, can_override_exception_handler) {
utils::error::set_exception_handler(&utils::error::default_exception_handler); utils::error::set_exception_handler(&utils::error::default_exception_handler);
} }
} // namespace repertory } // namespace fifthgrid

View File

@ -25,7 +25,7 @@ namespace {
static constexpr const auto file_type_count{1U}; static constexpr const auto file_type_count{1U};
} }
namespace repertory { namespace fifthgrid {
TEST(utils_file, can_create_file) { TEST(utils_file, can_create_file) {
for (auto idx = 0U; idx < file_type_count; ++idx) { for (auto idx = 0U; idx < file_type_count; ++idx) {
auto path = test::generate_test_file_name("utils_file"); auto path = test::generate_test_file_name("utils_file");
@ -300,4 +300,4 @@ TEST(util_file, file_exists_in_path) {
utils::string::from_utf8(test_dir.get_path()), L"moose.txt")); utils::string::from_utf8(test_dir.get_path()), L"moose.txt"));
} }
} }
} // namespace repertory } // namespace fifthgrid

View File

@ -23,7 +23,7 @@
#if defined(PROJECT_ENABLE_LIBSODIUM) #if defined(PROJECT_ENABLE_LIBSODIUM)
namespace repertory { namespace fifthgrid {
TEST(utils_hash, hash_type_sizes) { TEST(utils_hash, hash_type_sizes) {
EXPECT_EQ(32U, utils::encryption::hash_256_t{}.size()); EXPECT_EQ(32U, utils::encryption::hash_256_t{}.size());
EXPECT_EQ(48U, utils::encryption::hash_384_t{}.size()); EXPECT_EQ(48U, utils::encryption::hash_384_t{}.size());
@ -181,6 +181,6 @@ TEST(utils_hash, sha512) {
"5ac3bcc80844b7d50b1cc6603444bbe7cfcf8fc0aa1ee3c636d9e339", "5ac3bcc80844b7d50b1cc6603444bbe7cfcf8fc0aa1ee3c636d9e339",
hash.c_str()); hash.c_str());
} }
} // namespace repertory } // namespace fifthgrid
#endif // defined(PROJECT_ENABLE_LIBSODIUM) #endif // defined(PROJECT_ENABLE_LIBSODIUM)

View File

@ -25,27 +25,27 @@
namespace { namespace {
static const auto test_path = [](std::string str) -> std::string { static const auto test_path = [](std::string str) -> std::string {
#if defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES) #if defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES)
if (repertory::utils::string::begins_with(str, "\\")) { if (fifthgrid::utils::string::begins_with(str, "\\")) {
str = repertory::utils::string::to_lower( str = fifthgrid::utils::string::to_lower(
std::filesystem::current_path().string().substr(0U, 2U)) + std::filesystem::current_path().string().substr(0U, 2U)) +
str; str;
} }
str = std::string{repertory::utils::path::long_notation} + str; str = std::string{fifthgrid::utils::path::long_notation} + str;
#else // !defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES) #else // !defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES)
if (repertory::utils::string::begins_with(str, "\\")) { if (fifthgrid::utils::string::begins_with(str, "\\")) {
str = repertory::utils::string::to_lower( str = fifthgrid::utils::string::to_lower(
std::filesystem::current_path().string().substr(0U, 2U)) + std::filesystem::current_path().string().substr(0U, 2U)) +
str; str;
} }
#endif // defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES) #endif // defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES)
return repertory::utils::string::right_trim(str, '\\'); return fifthgrid::utils::string::right_trim(str, '\\');
}; };
} // namespace } // namespace
#endif // defined(_WIN32) #endif // defined(_WIN32)
namespace repertory { namespace fifthgrid {
TEST(utils_path, constants) { TEST(utils_path, constants) {
EXPECT_EQ(std::string_view{"\\"}, utils::path::backslash); EXPECT_EQ(std::string_view{"\\"}, utils::path::backslash);
EXPECT_EQ(std::wstring_view{L"\\"}, utils::path::backslash_w); EXPECT_EQ(std::wstring_view{L"\\"}, utils::path::backslash_w);
@ -400,7 +400,7 @@ TEST(utils_path, absolute_can_resolve_path_variables) {
std::string home{}; std::string home{};
#if defined(_WIN32) #if defined(_WIN32)
home.resize(repertory::max_path_length + 1U); home.resize(fifthgrid::max_path_length + 1U);
auto size = ::GetEnvironmentVariableA("USERPROFILE", home.data(), 0U); auto size = ::GetEnvironmentVariableA("USERPROFILE", home.data(), 0U);
home.resize(size); home.resize(size);
@ -546,4 +546,4 @@ TEST(utils_path, does_not_contain_trash_directory) {
} }
#endif // defined(_WIN32) #endif // defined(_WIN32)
} }
} // namespace repertory } // namespace fifthgrid

View File

@ -21,7 +21,7 @@
*/ */
#include "test.hpp" #include "test.hpp"
namespace repertory { namespace fifthgrid {
TEST(utils_string, begins_with) { TEST(utils_string, begins_with) {
std::string str{"moose"}; std::string str{"moose"};
EXPECT_TRUE(utils::string::begins_with(str, "m")); EXPECT_TRUE(utils::string::begins_with(str, "m"));
@ -134,4 +134,4 @@ TEST(utils_string, to_bool) {
EXPECT_FALSE(utils::string::to_bool("0")); EXPECT_FALSE(utils::string::to_bool("0"));
EXPECT_FALSE(utils::string::to_bool("00000.00000")); EXPECT_FALSE(utils::string::to_bool("00000.00000"));
} }
} // namespace repertory } // namespace fifthgrid