mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
tests: ringdb: use system's temporary dir path
Fixes failing test during Arch package build (due to attempt to write to ~/.bitmonero/...). Prefix temp dir path with "monero-" because we are not putting it on the system, so good to identify ourselves in case the dir gets left over due to crash, etc.
This commit is contained in:
parent
702a41034d
commit
68b1197f5d
1 changed files with 4 additions and 4 deletions
|
@ -76,13 +76,13 @@ public:
|
|||
private:
|
||||
std::string make_filename()
|
||||
{
|
||||
boost::filesystem::path path = tools::get_default_data_dir();
|
||||
path /= "fake";
|
||||
boost::filesystem::path path =
|
||||
boost::filesystem::temp_directory_path();
|
||||
#if defined(__MINGW32__) || defined(__MINGW__)
|
||||
filename = tempnam(path.string().c_str(), "ringdb-test-");
|
||||
filename = tempnam(path.string().c_str(), "monero-ringdb-test-");
|
||||
EXPECT_TRUE(filename != NULL);
|
||||
#else
|
||||
path /= "ringdb-test-XXXXXX";
|
||||
path /= "monero-ringdb-test-XXXXXX";
|
||||
filename = strdup(path.string().c_str());
|
||||
EXPECT_TRUE(mkdtemp(filename) != NULL);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue