Commit Graph

4 Commits

Author SHA1 Message Date
Alexis Lothoré
db6ace80a0 oeqa/utils/gitarchive: fall back to local tags when listing existing tags
e9cff55e73 has switched tag listing from bare "git tag" to "git
ls-remote" to make sure not to miss remote tags which are not fetched
locally. This mechanism first checks for configured remote repository, next
for possibly passed url, and then fails if none worked.

However there are still cases where no remote repository is
configured and no url is provided (for instance: buildperf tests use an
empty git directory to store tests). Fix those cases by putting back the
old behavior (local tags check) as last resort, with at least a warning for
future diagnostics if we still encounter tagging issues

Fixes: e9cff55e73 ("oeqa/utils/gitarchive: fix tag computation when creating archive")
(From OE-Core rev: 34e1f845687d2f7169f5d6c1bb54e1a7ab5412c4)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-23 22:33:39 +01:00
Alexis Lothoré
3c1ee6d8b0 oeqa/utils/gitarchive: allow to pass a logger to get_tags
Propagate a "log" parameter to get_tags in order to know what method is
used to retrieve existing tags

(From OE-Core rev: f8212eda45444dfb330e4d930eeceefde936adeb)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-23 22:33:39 +01:00
Alexis Lothoré
9519610870 oeqa/selftest/gitarchive: add tests about tags lisiting when no remote is configured
Add specific tests on gitarchive for when tag listing is required but no
remote is configured in target directory: it should either succeed if valid
url is provided, or fail is url is not provided or wrong

(From OE-Core rev: 5e9d84d82fde81d66550d8c694ea70f0911fa4f7)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 11:34:12 +01:00
Alexis Lothoré
f30867795c oeqa/selftest: introduce gitarchive tests
Add a test suite for gitarchive.py. For now, only introduce tests on
methods which needs to read existing tags

The tests rely on tmpdirs to create local, "fake" results repository in
order to allow basic git commands

(From OE-Core rev: bc9b8ef4bc3e51ba7fca372ab7e532a80975d819)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-21 11:34:12 +01:00