From: Simon Glass <[email protected]>

Move about 10 test files for ChromeOS entries (GBB, vblock, FMAP)
into a cros/ subdirectory. Drop the numeric prefixes and update all
references.

Signed-off-by: Simon Glass <[email protected]>
---

 doc/develop/binman_tests.rst                  |  2 +-
 tools/binman/ftest.py                         | 22 +++++++++----------
 .../test/{067_fmap.dts => cros/fmap.dts}      |  0
 .../binman/test/{071_gbb.dts => cros/gbb.dts} |  0
 .../gbb_no_size.dts}                          |  0
 .../gbb_too_small.dts}                        |  0
 .../test/{074_vblock.dts => cros/vblock.dts}  |  0
 .../vblock_bad_entry.dts}                     |  0
 .../vblock_bad_phandle.dts}                   |  0
 .../vblock_content.dts}                       |  0
 .../vblock_no_content.dts}                    |  0
 11 files changed, 12 insertions(+), 12 deletions(-)
 rename tools/binman/test/{067_fmap.dts => cros/fmap.dts} (100%)
 rename tools/binman/test/{071_gbb.dts => cros/gbb.dts} (100%)
 rename tools/binman/test/{073_gbb_no_size.dts => cros/gbb_no_size.dts} (100%)
 rename tools/binman/test/{072_gbb_too_small.dts => cros/gbb_too_small.dts} 
(100%)
 rename tools/binman/test/{074_vblock.dts => cros/vblock.dts} (100%)
 rename tools/binman/test/{077_vblock_bad_entry.dts => 
cros/vblock_bad_entry.dts} (100%)
 rename tools/binman/test/{076_vblock_bad_phandle.dts => 
cros/vblock_bad_phandle.dts} (100%)
 rename tools/binman/test/{189_vblock_content.dts => cros/vblock_content.dts} 
(100%)
 rename tools/binman/test/{075_vblock_no_content.dts => 
cros/vblock_no_content.dts} (100%)

diff --git a/doc/develop/binman_tests.rst b/doc/develop/binman_tests.rst
index 745ca259d44..c7fa9ae6199 100644
--- a/doc/develop/binman_tests.rst
+++ b/doc/develop/binman_tests.rst
@@ -436,7 +436,7 @@ correct. You can to this with ``terminal.capture()``, for 
example:
 .. code-block:: python
 
     with terminal.capture() as (_, stderr):
-        self._DoTestFile('071_gbb.dts', force_missing_bintools='futility',
+        self._DoTestFile('cros/gbb.dts', force_missing_bintools='futility',
                          entry_args=entry_args)
     err = stderr.getvalue()
     self.assertRegex(err, "Image 'image'.*missing bintools.*: futility")
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 5284fd3a11a..c2cea9e6618 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -1816,7 +1816,7 @@ class TestFunctional(unittest.TestCase):
 
     def testFmap(self):
         """Basic test of generation of a flashrom fmap"""
-        data = self._DoReadFile('067_fmap.dts')
+        data = self._DoReadFile('cros/fmap.dts')
         fhdr, fentries = fmap_util.DecodeFmap(data[32:])
         expected = (U_BOOT_DATA + tools.get_bytes(ord('!'), 12) +
                     U_BOOT_DATA + tools.get_bytes(ord('a'), 12))
@@ -1898,7 +1898,7 @@ class TestFunctional(unittest.TestCase):
             'keydir': 'devkeys',
             'bmpblk': 'bmpblk.bin',
         }
-        data, _, _, _ = self._DoReadFileDtb('071_gbb.dts', 
entry_args=entry_args)
+        data, _, _, _ = self._DoReadFileDtb('cros/gbb.dts', 
entry_args=entry_args)
 
         # Since futility
         expected = (GBB_DATA + GBB_DATA + tools.get_bytes(0, 8) +
@@ -1908,14 +1908,14 @@ class TestFunctional(unittest.TestCase):
     def testGbbTooSmall(self):
         """Test for the Chromium OS Google Binary Block being large enough"""
         with self.assertRaises(ValueError) as e:
-            self._DoReadFileDtb('072_gbb_too_small.dts')
+            self._DoReadFileDtb('cros/gbb_too_small.dts')
         self.assertIn("Node '/binman/gbb': GBB is too small",
                       str(e.exception))
 
     def testGbbNoSize(self):
         """Test for the Chromium OS Google Binary Block having a size"""
         with self.assertRaises(ValueError) as e:
-            self._DoReadFileDtb('073_gbb_no_size.dts')
+            self._DoReadFileDtb('cros/gbb_no_size.dts')
         self.assertIn("Node '/binman/gbb': GBB must have a fixed size",
                       str(e.exception))
 
@@ -1925,7 +1925,7 @@ class TestFunctional(unittest.TestCase):
             'keydir': 'devkeys',
         }
         with terminal.capture() as (_, stderr):
-            self._DoTestFile('071_gbb.dts', force_missing_bintools='futility',
+            self._DoTestFile('cros/gbb.dts', force_missing_bintools='futility',
                              entry_args=entry_args)
         err = stderr.getvalue()
         self.assertRegex(err, "Image 'image'.*missing bintools.*: futility")
@@ -1966,7 +1966,7 @@ class TestFunctional(unittest.TestCase):
         entry_args = {
             'keydir': 'devkeys',
         }
-        data, _, _, _ = self._DoReadFileDtb('074_vblock.dts',
+        data, _, _, _ = self._DoReadFileDtb('cros/vblock.dts',
                                             entry_args=entry_args)
         expected = U_BOOT_DATA + VBLOCK_DATA + U_BOOT_DTB_DATA
         self.assertEqual(expected, data)
@@ -1974,21 +1974,21 @@ class TestFunctional(unittest.TestCase):
     def testVblockNoContent(self):
         """Test we detect a vblock which has no content to sign"""
         with self.assertRaises(ValueError) as e:
-            self._DoReadFile('075_vblock_no_content.dts')
+            self._DoReadFile('cros/vblock_no_content.dts')
         self.assertIn("Node '/binman/vblock': Collection must have a 'content' 
"
                       'property', str(e.exception))
 
     def testVblockBadPhandle(self):
         """Test that we detect a vblock with an invalid phandle in contents"""
         with self.assertRaises(ValueError) as e:
-            self._DoReadFile('076_vblock_bad_phandle.dts')
+            self._DoReadFile('cros/vblock_bad_phandle.dts')
         self.assertIn("Node '/binman/vblock': Cannot find node for phandle "
                       '1000', str(e.exception))
 
     def testVblockBadEntry(self):
         """Test that we detect an entry that points to a non-entry"""
         with self.assertRaises(ValueError) as e:
-            self._DoReadFile('077_vblock_bad_entry.dts')
+            self._DoReadFile('cros/vblock_bad_entry.dts')
         self.assertIn("Node '/binman/vblock': Cannot find entry for node "
                       "'other'", str(e.exception))
 
@@ -2000,7 +2000,7 @@ class TestFunctional(unittest.TestCase):
             'keydir': 'devkeys',
         }
         data = self._DoReadFileDtb(
-            '189_vblock_content.dts', use_real_dtb=True, update_dtb=True,
+            'cros/vblock_content.dts', use_real_dtb=True, update_dtb=True,
             entry_args=entry_args)[0]
         hashlen = 32  # SHA256 hash is 32 bytes
         self.assertEqual(U_BOOT_DATA, data[:len(U_BOOT_DATA)])
@@ -2021,7 +2021,7 @@ class TestFunctional(unittest.TestCase):
             'keydir': 'devkeys',
         }
         with terminal.capture() as (_, stderr):
-            self._DoTestFile('074_vblock.dts',
+            self._DoTestFile('cros/vblock.dts',
                              force_missing_bintools='futility',
                              entry_args=entry_args)
         err = stderr.getvalue()
diff --git a/tools/binman/test/067_fmap.dts b/tools/binman/test/cros/fmap.dts
similarity index 100%
rename from tools/binman/test/067_fmap.dts
rename to tools/binman/test/cros/fmap.dts
diff --git a/tools/binman/test/071_gbb.dts b/tools/binman/test/cros/gbb.dts
similarity index 100%
rename from tools/binman/test/071_gbb.dts
rename to tools/binman/test/cros/gbb.dts
diff --git a/tools/binman/test/073_gbb_no_size.dts 
b/tools/binman/test/cros/gbb_no_size.dts
similarity index 100%
rename from tools/binman/test/073_gbb_no_size.dts
rename to tools/binman/test/cros/gbb_no_size.dts
diff --git a/tools/binman/test/072_gbb_too_small.dts 
b/tools/binman/test/cros/gbb_too_small.dts
similarity index 100%
rename from tools/binman/test/072_gbb_too_small.dts
rename to tools/binman/test/cros/gbb_too_small.dts
diff --git a/tools/binman/test/074_vblock.dts 
b/tools/binman/test/cros/vblock.dts
similarity index 100%
rename from tools/binman/test/074_vblock.dts
rename to tools/binman/test/cros/vblock.dts
diff --git a/tools/binman/test/077_vblock_bad_entry.dts 
b/tools/binman/test/cros/vblock_bad_entry.dts
similarity index 100%
rename from tools/binman/test/077_vblock_bad_entry.dts
rename to tools/binman/test/cros/vblock_bad_entry.dts
diff --git a/tools/binman/test/076_vblock_bad_phandle.dts 
b/tools/binman/test/cros/vblock_bad_phandle.dts
similarity index 100%
rename from tools/binman/test/076_vblock_bad_phandle.dts
rename to tools/binman/test/cros/vblock_bad_phandle.dts
diff --git a/tools/binman/test/189_vblock_content.dts 
b/tools/binman/test/cros/vblock_content.dts
similarity index 100%
rename from tools/binman/test/189_vblock_content.dts
rename to tools/binman/test/cros/vblock_content.dts
diff --git a/tools/binman/test/075_vblock_no_content.dts 
b/tools/binman/test/cros/vblock_no_content.dts
similarity index 100%
rename from tools/binman/test/075_vblock_no_content.dts
rename to tools/binman/test/cros/vblock_no_content.dts
-- 
2.43.0

Reply via email to