From c3c43bcfcce58ff0c5fbe4eefea4a842ec4226ec Mon Sep 17 00:00:00 2001 From: Sergio Date: Tue, 18 Jun 2024 15:50:27 +0200 Subject: [PATCH] Fix tests --- alibuild_helpers/git.py | 2 +- tests/test_build.py | 2 +- tests/test_workarea.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alibuild_helpers/git.py b/alibuild_helpers/git.py index 4780ceab..387a6c01 100644 --- a/alibuild_helpers/git.py +++ b/alibuild_helpers/git.py @@ -63,7 +63,7 @@ def checkoutCmd(self, ref): return ["checkout", "-f", ref] def fetchCmd(self, source, *refs): - return ["fetch", "-f"] + clone_speedup_options() + [source, *refs] + return ["fetch", "-f"] + clone_speedup_options() + [source, *refs] def setWriteUrlCmd(self, url): return ["remote", "set-url", "--push", "origin", url] diff --git a/tests/test_build.py b/tests/test_build.py index 07dfd04d..a4b48358 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -111,7 +111,7 @@ GIT_CHECKOUT_ZLIB_ARGS = ("checkout", "-f", "master"), \ "/sw/SOURCES/zlib/v1.2.3/8822efa61f", False -GIT_FETCH_REF_ROOT_ARGS = ("fetch", "-f", "https://github.com/root-mirror/root", "+refs/tags/*:refs/tags/*", +GIT_FETCH_REF_ROOT_ARGS = ("fetch", "-f", "--filter=blob:none", "https://github.com/root-mirror/root", "+refs/tags/*:refs/tags/*", "+refs/heads/*:refs/heads/*"), "/sw/MIRROR/root", False GIT_CLONE_SRC_ROOT_ARGS = ("clone", "-n", "https://github.com/root-mirror/root", "/sw/SOURCES/ROOT/v6-08-30/f7b3366117", diff --git a/tests/test_workarea.py b/tests/test_workarea.py index b127994a..8d208c35 100644 --- a/tests/test_workarea.py +++ b/tests/test_workarea.py @@ -63,7 +63,7 @@ def test_reference_sources_updated(self, mock_git, mock_open, mock_makedirs, moc mock_exists.assert_has_calls([]) mock_makedirs.assert_called_with("%s/sw/MIRROR" % getcwd(), exist_ok=True) mock_git.assert_called_once_with([ - "fetch", "-f", spec["source"], "+refs/tags/*:refs/tags/*", "+refs/heads/*:refs/heads/*", + "fetch", "-f", "--filter=blob:none", spec["source"], "+refs/tags/*:refs/tags/*", "+refs/heads/*:refs/heads/*", ], directory="%s/sw/MIRROR/aliroot" % getcwd(), check=False, prompt=True) self.assertEqual(spec.get("reference"), "%s/sw/MIRROR/aliroot" % getcwd())