summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system/git_tree.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/file_system/git_tree.test.cpp')
-rw-r--r--test/buildtool/file_system/git_tree.test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/buildtool/file_system/git_tree.test.cpp b/test/buildtool/file_system/git_tree.test.cpp
index caaba96a..a3baf4ac 100644
--- a/test/buildtool/file_system/git_tree.test.cpp
+++ b/test/buildtool/file_system/git_tree.test.cpp
@@ -30,8 +30,10 @@ auto const kFailId = std::string{"0123456789abcdef0123456789abcdef01234567"};
[[nodiscard]] auto CreateTestRepo(bool is_bare = 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 {}{} {}",
is_bare ? "--bare " : "",
kBundlePath,