Skip to content

Commit

Permalink
Merge pull request monero-project#9045
Browse files Browse the repository at this point in the history
504269e unit tests: fix running from pwd and auto test selected location (jeffro256)
  • Loading branch information
luigi1111 committed Nov 6, 2023
2 parents b0ea37a + 504269e commit cab0ebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set(MONERO_WALLET_CRYPTO_BENCH "auto" CACHE STRING "Select wallet crypto librari

# The docs say this only affects grouping in IDEs
set(folder "tests")
set(TEST_DATA_DIR "${CMAKE_CURRENT_LIST_DIR}/data")
set(TEST_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/data")

if (WIN32 AND STATIC)
add_definitions(-DSTATICLIB)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char** argv)
::testing::InitGoogleTest(&argc, argv);

// the default test data directory is ../data (relative to the executable's directory)
const auto default_test_data_dir = boost::filesystem::path(argv[0]).parent_path().parent_path() / "data";
const auto default_test_data_dir = boost::filesystem::canonical(argv[0]).parent_path().parent_path() / "data";

po::options_description desc_options("Command line options");
const command_line::arg_descriptor<std::string> arg_data_dir = { "data-dir", "Data files directory", default_test_data_dir.string() };
Expand Down

0 comments on commit cab0ebd

Please sign in to comment.