buildman: Add a test for the -A option
authorSimon Glass <sjg@chromium.org>
Wed, 19 Jul 2023 23:48:35 +0000 (17:48 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 24 Jul 2023 15:34:10 +0000 (09:34 -0600)
This lacks a test at present. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/buildman/func_test.py

index 85222b9..ca579a2 100644 (file)
@@ -1016,3 +1016,10 @@ endif
             result = self._RunControl('-R', outfile, brds=None,
                                       get_builder=False)
         self.assertTrue(os.path.exists(outfile))
+
+    def test_print_prefix(self):
+        """Test that we can print the toolchain prefix"""
+        with test_util.capture_sys_output() as (stdout, stderr):
+            result = self._RunControl('-A', 'board0')
+        self.assertEqual('arm-\n', stdout.getvalue())
+        self.assertEqual('', stderr.getvalue())