diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-12-08 11:15:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-09 19:17:11 +0000 |
| commit | 97a7fe536d3f8afbbfe709852a21eee67d739a98 (patch) | |
| tree | 7d97501bd68c40437f25342864307247d03a53a5 | |
| parent | b3d1a7297fb80af41bd1e8dbc2e448abf5e7df08 (diff) | |
| download | poky-97a7fe536d3f8afbbfe709852a21eee67d739a98.tar.gz | |
selftest/sstatetest: print output from bitbake with actual newlines, not \n
Assert*() functions from python unittest would join the multiline output with \n, making it
almost unreadable.
(From OE-Core rev: 1b01a71e77f70af77887c27be21265ac61f2c9a7)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/sstatetests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 7c2b14e95f..7900185450 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py | |||
| @@ -798,9 +798,9 @@ TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" | |||
| 798 | 798 | ||
| 799 | self.delete_recipeinc(change_recipe) | 799 | self.delete_recipeinc(change_recipe) |
| 800 | for item in expected_sametmp_output: | 800 | for item in expected_sametmp_output: |
| 801 | self.assertIn(item, result_sametmp.output) | 801 | self.assertIn(item, result_sametmp.output, msg = "Item {} not found in output:\n{}".format(item, result_sametmp.output)) |
| 802 | for item in expected_difftmp_output: | 802 | for item in expected_difftmp_output: |
| 803 | self.assertIn(item, result_difftmp.output) | 803 | self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output)) |
| 804 | 804 | ||
| 805 | def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output): | 805 | def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output): |
| 806 | self.write_config(""" | 806 | self.write_config(""" |
| @@ -820,9 +820,9 @@ TMPDIR = "${TOPDIR}/tmp-sstateprintdiff-2" | |||
| 820 | result_difftmp = bitbake("-S printdiff {}".format(target)) | 820 | result_difftmp = bitbake("-S printdiff {}".format(target)) |
| 821 | 821 | ||
| 822 | for item in expected_sametmp_output: | 822 | for item in expected_sametmp_output: |
| 823 | self.assertIn(item, result_sametmp.output) | 823 | self.assertIn(item, result_sametmp.output, msg = "Item {} not found in output:\n{}".format(item, result_sametmp.output)) |
| 824 | for item in expected_difftmp_output: | 824 | for item in expected_difftmp_output: |
| 825 | self.assertIn(item, result_difftmp.output) | 825 | self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output)) |
| 826 | 826 | ||
| 827 | 827 | ||
| 828 | # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe | 828 | # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe |
