summaryrefslogtreecommitdiff
path: root/test/other_tools/git_operations/git_repo_remote.test.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-21 14:58:54 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-23 09:50:42 +0100
commit12d0c288ea23e1bd7e0401223ba413bca3d94869 (patch)
treeb6e16385368863b11ba8656b7b651440c9f5783b /test/other_tools/git_operations/git_repo_remote.test.cpp
parent17143ed02545efab55c175db66a9e31db4cce0f0 (diff)
downloadjustbuild-12d0c288ea23e1bd7e0401223ba413bca3d94869.tar.gz
just-mr: Shell out to system Git for update commit from SSH remote...
...due to limitations in SSH support in libgit2. In this case, we simply execute 'git ls-remote <repo> [<branch>]' and then parse the output. Remote interogation requires no local repository, so it is an asynchronious operation by default.
Diffstat (limited to 'test/other_tools/git_operations/git_repo_remote.test.cpp')
-rw-r--r--test/other_tools/git_operations/git_repo_remote.test.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/other_tools/git_operations/git_repo_remote.test.cpp b/test/other_tools/git_operations/git_repo_remote.test.cpp
index 1cdf643d..ae3f2e05 100644
--- a/test/other_tools/git_operations/git_repo_remote.test.cpp
+++ b/test/other_tools/git_operations/git_repo_remote.test.cpp
@@ -285,11 +285,12 @@ TEST_CASE("Single-threaded fake repository operations", "[git_repo_remote]") {
GitRepoRemote::InitAndOpen(path_commit_upd, /*is_bare=*/true);
REQUIRE(repo_commit_upd);
- // create path for tmp repo to use for remote ls
+ // create tmp dir to use for commits update
auto tmp_path_commit_upd = TestUtils::GetRepoPath();
+ REQUIRE(FileSystemManager::CreateDirectory(tmp_path_commit_upd));
// do remote ls
auto fetched_commit = repo_commit_upd->UpdateCommitViaTmpRepo(
- tmp_path_commit_upd, *repo_path, "master", logger);
+ tmp_path_commit_upd, *repo_path, "master", {}, logger);
REQUIRE(fetched_commit);
CHECK(*fetched_commit == kRootCommit);
@@ -375,14 +376,17 @@ TEST_CASE("Multi-threaded fake repository operations", "[git_repo_remote]") {
logger));
} break;
case 3: {
- // create path for tmp repo to use for remote ls
+ // create tmp dir to use for commits update
auto tmp_path_commit_upd = TestUtils::GetRepoPath();
+ REQUIRE(FileSystemManager::CreateDirectory(
+ tmp_path_commit_upd));
// do remote ls
auto fetched_commit =
target_repo->UpdateCommitViaTmpRepo(
tmp_path_commit_upd,
*remote_repo_path,
"master",
+ {},
logger);
REQUIRE(fetched_commit);