diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-30 22:17:46 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-04 17:51:43 -0500 |
commit | b82492bbccb0ecdee17108ed43c4220f00f3f4f3 (patch) | |
tree | ca38bcb5b59f05f837a2350588574e9eaa8f6fd5 /tools/buildman/test.py | |
parent | d6bf36c775213689763ad05913a1b5e76a61daaf (diff) |
buildman: Support single-threaded operation
At present even if only a single thread is in use, buildman still uses
threading.
For some debugging it is helpful to do everything in the main process.
Allow -T0 to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/test.py')
-rw-r--r-- | tools/buildman/test.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/buildman/test.py b/tools/buildman/test.py index 1a259d54ab..b9c65c0d32 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -187,7 +187,7 @@ class TestBuild(unittest.TestCase): expect += col.Color(expected_colour, ' %s' % board) self.assertEqual(text, expect) - def _SetupTest(self, echo_lines=False, **kwdisplay_args): + def _SetupTest(self, echo_lines=False, threads=1, **kwdisplay_args): """Set up the test by running a build and summary Args: @@ -199,8 +199,8 @@ class TestBuild(unittest.TestCase): Returns: Iterator containing the output lines, each a PrintLine() object """ - build = builder.Builder(self.toolchains, self.base_dir, None, 1, 2, - checkout=False, show_unknown=False) + build = builder.Builder(self.toolchains, self.base_dir, None, threads, + 2, checkout=False, show_unknown=False) build.do_make = self.Make board_selected = self.boards.GetSelectedDict() @@ -438,6 +438,12 @@ class TestBuild(unittest.TestCase): filter_migration_warnings=True) self._CheckOutput(lines, filter_migration_warnings=True) + def testSingleThread(self): + """Test operation without threading""" + lines = self._SetupTest(show_errors=True, threads=0) + self._CheckOutput(lines, list_error_boards=False, + filter_dtb_warnings=False) + def _testGit(self): """Test basic builder operation by building a branch""" options = Options() |