diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 13 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 6 |
2 files changed, 16 insertions, 3 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 0091723601..3f42332588 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -2281,6 +2281,19 @@ class GitShallowTest(FetcherTest): | |||
2281 | self.assertRevCount(1) | 2281 | self.assertRevCount(1) |
2282 | assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')) | 2282 | assert os.path.exists(os.path.join(self.gitdir, '.git', 'shallow')) |
2283 | 2283 | ||
2284 | def test_shallow_succeeds_with_tag_containing_slash(self): | ||
2285 | self.add_empty_file('a') | ||
2286 | self.add_empty_file('b') | ||
2287 | self.git('tag t1/t2/t3', cwd=self.srcdir) | ||
2288 | self.assertRevCount(2, cwd=self.srcdir) | ||
2289 | |||
2290 | srcrev = self.git('rev-parse HEAD', cwd=self.srcdir).strip() | ||
2291 | self.d.setVar('SRCREV', srcrev) | ||
2292 | uri = self.d.getVar('SRC_URI').split()[0] | ||
2293 | uri = '%s;tag=t1/t2/t3' % uri | ||
2294 | self.fetch_shallow(uri) | ||
2295 | self.assertRevCount(1) | ||
2296 | |||
2284 | class GitLfsTest(FetcherTest): | 2297 | class GitLfsTest(FetcherTest): |
2285 | def skipIfNoGitLFS(): | 2298 | def skipIfNoGitLFS(): |
2286 | if not shutil.which('git-lfs'): | 2299 | if not shutil.which('git-lfs'): |
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 2fff1b3669..9a589a5c8e 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -353,7 +353,7 @@ def print_event_log(event, includelogs, loglines, termfilter): | |||
353 | termfilter.clearFooter() | 353 | termfilter.clearFooter() |
354 | bb.error("Logfile of failure stored in: %s" % logfile) | 354 | bb.error("Logfile of failure stored in: %s" % logfile) |
355 | if includelogs and not event.errprinted: | 355 | if includelogs and not event.errprinted: |
356 | print("Log data follows:") | 356 | bb.plain("Log data follows:") |
357 | f = open(logfile, "r") | 357 | f = open(logfile, "r") |
358 | lines = [] | 358 | lines = [] |
359 | while True: | 359 | while True: |
@@ -366,11 +366,11 @@ def print_event_log(event, includelogs, loglines, termfilter): | |||
366 | if len(lines) > int(loglines): | 366 | if len(lines) > int(loglines): |
367 | lines.pop(0) | 367 | lines.pop(0) |
368 | else: | 368 | else: |
369 | print('| %s' % l) | 369 | bb.plain('| %s' % l) |
370 | f.close() | 370 | f.close() |
371 | if lines: | 371 | if lines: |
372 | for line in lines: | 372 | for line in lines: |
373 | print(line) | 373 | bb.plain(line) |
374 | 374 | ||
375 | def _log_settings_from_server(server, observe_only): | 375 | def _log_settings_from_server(server, observe_only): |
376 | # Get values of variables which control our output | 376 | # Get values of variables which control our output |