From 0afb6b95a9ef0fca265486fef0dc63027e0f2aeb Mon Sep 17 00:00:00 2001 From: Kevin Breitenstein Date: Mon, 25 Sep 2023 13:05:29 -0500 Subject: [PATCH] Add git-lfs version test This adds a test of the git-lfs version to be at least 2.10, when local file path support was added. --- ci/test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ci/test.py b/ci/test.py index c63588c..a0d59b6 100755 --- a/ci/test.py +++ b/ci/test.py @@ -1098,6 +1098,22 @@ def test_top_dir(self): self.assertEqual(oe_topdir, pyrex_topdir) + @skipIfOS("ubuntu", "14.04") + def test_git_lfs_version(self): + # Require the version that first supports local paths, so bitbake can + # reference a local path with lfs. + d = self.assertPyrexContainerCommand( + "git lfs version", quiet_init=True, capture=True + ) + # Returns a User-Agent string git-lfs uses, + # which is in the format git-lfs/major.minor.patch (platform information) + self.assertTrue(d.startswith("git-lfs")) + (major, minor, patch) = ( + int(x) for x in d.split("/")[1].split(" ")[0].split(".") + ) + + self.assertTrue(major > 2 or (major == 2 and minor >= 10)) + def test_env_capture(self): if self.pokyver < (4, 0): varname = "BB_ENV_EXTRAWHITE"