diff options
author | Tom Rini <trini@konsulko.com> | 2022-03-02 10:38:00 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-02 10:38:00 -0500 |
commit | f861ffa660dc47c4017c220b94d10a64439d46a7 (patch) | |
tree | 7ba56091d7713bf04e940afa9a2f8adcaeeb2a16 /tools/binman/elf_test.py | |
parent | f9a719e2954473f9be1f8c14a28288f943a00dd2 (diff) | |
parent | 642e51addf918e0dd1b901efaa9f5706c12365b7 (diff) |
Merge branch '2022-03-02-enable-pylint-in-CI' into next
To quote the author:
This series adds a new errors-only pylint check and adds it to the CI
systems.
It also fixes the current errors in the U-Boot Python code, disabling
errors where it seems necessary.
A small patch to buildman allows it to build sandbox without any changes
to the default config file
Diffstat (limited to 'tools/binman/elf_test.py')
-rw-r--r-- | tools/binman/elf_test.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py index a67915bda63..5084838b910 100644 --- a/tools/binman/elf_test.py +++ b/tools/binman/elf_test.py @@ -116,7 +116,7 @@ class TestElf(unittest.TestCase): entry = FakeEntry(10) section = FakeSection() with self.assertRaises(ValueError) as e: - syms = elf.LookupAndWriteSymbols('missing-file', entry, section) + elf.LookupAndWriteSymbols('missing-file', entry, section) self.assertIn("Filename 'missing-file' not found in input path", str(e.exception)) @@ -126,7 +126,7 @@ class TestElf(unittest.TestCase): section = FakeSection() elf_fname = self.ElfTestFile('u_boot_binman_syms') with self.assertRaises(ValueError) as e: - syms = elf.LookupAndWriteSymbols(elf_fname, entry, section) + elf.LookupAndWriteSymbols(elf_fname, entry, section) self.assertIn('entry_path has offset 4 (size 8) but the contents size ' 'is a', str(e.exception)) @@ -139,8 +139,7 @@ class TestElf(unittest.TestCase): entry = FakeEntry(10) section = FakeSection() elf_fname = self.ElfTestFile('u_boot_binman_syms_bad') - self.assertEqual(elf.LookupAndWriteSymbols(elf_fname, entry, section), - None) + elf.LookupAndWriteSymbols(elf_fname, entry, section) def testBadSymbolSize(self): """Test that an attempt to use an 8-bit symbol are detected @@ -152,7 +151,7 @@ class TestElf(unittest.TestCase): section = FakeSection() elf_fname =self.ElfTestFile('u_boot_binman_syms_size') with self.assertRaises(ValueError) as e: - syms = elf.LookupAndWriteSymbols(elf_fname, entry, section) + elf.LookupAndWriteSymbols(elf_fname, entry, section) self.assertIn('has size 1: only 4 and 8 are supported', str(e.exception)) @@ -165,7 +164,7 @@ class TestElf(unittest.TestCase): entry = FakeEntry(24) section = FakeSection(sym_value=None) elf_fname = self.ElfTestFile('u_boot_binman_syms') - syms = elf.LookupAndWriteSymbols(elf_fname, entry, section) + elf.LookupAndWriteSymbols(elf_fname, entry, section) self.assertEqual(tools.get_bytes(255, 20) + tools.get_bytes(ord('a'), 4), entry.data) @@ -177,7 +176,7 @@ class TestElf(unittest.TestCase): section = FakeSection() elf_fname = self.ElfTestFile('u_boot_binman_syms') with test_util.capture_sys_output() as (stdout, stderr): - syms = elf.LookupAndWriteSymbols(elf_fname, entry, section) + elf.LookupAndWriteSymbols(elf_fname, entry, section) self.assertTrue(len(stdout.getvalue()) > 0) finally: tout.init(tout.WARNING) |