aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index b1a929242a..4be84f6e17 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -23,7 +23,6 @@ import urllib.error
from binman import bintool
from binman import cbfs_util
from binman import cmdline
-from binman import comp_util
from binman import control
from binman import elf
from binman import elf_test
@@ -5229,15 +5228,6 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
self._DoBinman(*args)
self.assertIn('failed to fetch with all methods', stdout.getvalue())
- def testInvalidCompress(self):
- with self.assertRaises(ValueError) as e:
- comp_util.compress(b'', 'invalid')
- self.assertIn("Unknown algorithm 'invalid'", str(e.exception))
-
- with self.assertRaises(ValueError) as e:
- comp_util.decompress(b'1234', 'invalid')
- self.assertIn("Unknown algorithm 'invalid'", str(e.exception))
-
def testBintoolDocs(self):
"""Test for creation of bintool documentation"""
with test_util.capture_sys_output() as (stdout, stderr):
@@ -5858,6 +5848,12 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
orig2 = self._decompress(comp_data)
self.assertEqual(orig, orig2)
+ def testInvalidCompress(self):
+ """Test that invalid compress algorithm is detected"""
+ with self.assertRaises(ValueError) as e:
+ self._DoTestFile('237_compress_dtb_invalid.dts')
+ self.assertIn("Unknown algorithm 'invalid'", str(e.exception))
+
if __name__ == "__main__":
unittest.main()