diff options
author | Simon Glass <sjg@chromium.org> | 2023-02-21 12:40:27 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-03-08 11:38:48 -0800 |
commit | cd37d5bccf63e75af395dd5e3b5dd21abbd86881 (patch) | |
tree | 77e90d65fb403bd9e5b8dbe5e607df10ed76f797 /tools/buildman/func_test.py | |
parent | 5a93c1574330b2d6146ab172f99e3f8e20a5402a (diff) |
buildman: Write out the build command used
It is sometimes useful to see the exact 'make' command used by buildman
for a commit. Add an output file for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/func_test.py')
-rw-r--r-- | tools/buildman/func_test.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 559e4edf74b..799c609446e 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -723,3 +723,16 @@ Some images are invalid''' control.get_allow_missing(False, False, 2, True)) self.assertEqual(False, control.get_allow_missing(False, True, 2, True)) + + def testCmdFile(self): + """Test that the -cmd-out file is produced""" + self._RunControl('-o', self._output_dir) + board0_dir = os.path.join(self._output_dir, 'current', 'board0') + self.assertTrue(os.path.exists(os.path.join(board0_dir, 'done'))) + cmd_fname = os.path.join(board0_dir, 'out-cmd') + self.assertTrue(os.path.exists(cmd_fname)) + data = tools.read_file(cmd_fname) + lines = data.splitlines() + self.assertEqual(2, len(lines)) + self.assertRegex(lines[0], b'make O=/.*board0_defconfig') + self.assertRegex(lines[0], b'make O=/.*-s.*') |