summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system/file_root.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/file_system/file_root.test.cpp')
-rw-r--r--test/buildtool/file_system/file_root.test.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp
index a934161b..b0dad5d1 100644
--- a/test/buildtool/file_system/file_root.test.cpp
+++ b/test/buildtool/file_system/file_root.test.cpp
@@ -1,3 +1,4 @@
+#include <atomic>
#include <thread>
#include "catch2/catch.hpp"
@@ -24,8 +25,10 @@ auto const kBarId = std::string{"ba0e162e1c47469e3fe4b393a8bf8c569f302116"};
[[nodiscard]] auto CreateTestRepo(bool do_checkout = false)
-> std::optional<std::filesystem::path> {
- auto repo_path = GetTestDir() / "test_repo" /
- std::filesystem::path{std::tmpnam(nullptr)}.filename();
+ static std::atomic<int> counter{};
+ auto repo_path =
+ GetTestDir() / "test_repo" /
+ std::filesystem::path{std::to_string(counter++)}.filename();
auto cmd = fmt::format("git clone {}{} {}",
do_checkout ? "--branch master " : "",
kBundlePath,