diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-22 14:23:24 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-23 09:50:43 +0100 |
commit | d6eb885a3f205e00a3be9f2ae2e8f510cae15d8a (patch) | |
tree | dabb8e10973ae1d5f21f4c01bda72b3d1b68402d /test | |
parent | e0c38d7083e6c972a432bfff3a9863f251f2170c (diff) | |
download | justbuild-d6eb885a3f205e00a3be9f2ae2e8f510cae15d8a.tar.gz |
just-mr: Add git binary option
In the rare cases that we need to shell out to git, let the user
configure what binary to use. Option resolves in the same way as
the just executable, including allowing it to be set via just-mrrc.
Updates all cases of shelling out to git (fetch and commit update).
Update just-mr and just-mrrc docs accordingly.
Diffstat (limited to 'test')
-rw-r--r-- | test/other_tools/git_operations/git_repo_remote.test.cpp | 22 |
1 files changed, 17 insertions, 5 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 ae3f2e05..5e4f9f9e 100644 --- a/test/other_tools/git_operations/git_repo_remote.test.cpp +++ b/test/other_tools/git_operations/git_repo_remote.test.cpp @@ -248,8 +248,12 @@ TEST_CASE("Single-threaded fake repository operations", "[git_repo_remote]") { auto tmp_path_fetch_all = TestUtils::GetRepoPath(); REQUIRE(FileSystemManager::CreateDirectory(tmp_path_fetch_all)); // fetch all with base refspecs - REQUIRE(repo_fetch_all->FetchViaTmpRepo( - tmp_path_fetch_all, *repo_path, std::nullopt, {}, logger)); + REQUIRE(repo_fetch_all->FetchViaTmpRepo(tmp_path_fetch_all, + *repo_path, + std::nullopt, + "git", + {}, + logger)); // check commit is there after fetch CHECK(*repo_fetch_all->CheckCommitExists(kRootCommit, logger)); @@ -271,8 +275,13 @@ TEST_CASE("Single-threaded fake repository operations", "[git_repo_remote]") { REQUIRE( FileSystemManager::CreateDirectory(tmp_path_fetch_wRefspec)); // fetch all - REQUIRE(repo_fetch_wRefspec->FetchViaTmpRepo( - tmp_path_fetch_wRefspec, *repo_path, "master", {}, logger)); + REQUIRE( + repo_fetch_wRefspec->FetchViaTmpRepo(tmp_path_fetch_wRefspec, + *repo_path, + "master", + "git", + {}, + logger)); // check commit is there after fetch CHECK(*repo_fetch_wRefspec->CheckCommitExists(kRootCommit, logger)); @@ -290,7 +299,7 @@ TEST_CASE("Single-threaded fake repository operations", "[git_repo_remote]") { 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", "git", {}, logger); REQUIRE(fetched_commit); CHECK(*fetched_commit == kRootCommit); @@ -358,6 +367,7 @@ TEST_CASE("Multi-threaded fake repository operations", "[git_repo_remote]") { target_repo->FetchViaTmpRepo(tmp_path_fetch_all, *remote_repo_path, std::nullopt, + "git", {}, logger)); } break; @@ -372,6 +382,7 @@ TEST_CASE("Multi-threaded fake repository operations", "[git_repo_remote]") { tmp_path_fetch_wRefspec, *remote_repo_path, "master", + "git", {}, logger)); } break; @@ -386,6 +397,7 @@ TEST_CASE("Multi-threaded fake repository operations", "[git_repo_remote]") { tmp_path_commit_upd, *remote_repo_path, "master", + "git", {}, logger); |