dtoc: Save scan information across test runs

At present most of the tests scan the U-Boot source tree as part of their
run. This information does not change across tests, so we can save time
by remembering it.

Add a way to set up this information and use it for each test, taking a
copy first, so as not to mess up the original.

This reduces the run time from about 1.6 seconds to 1.5 seconds on my
machine. For code coverage (which cannot run in parallel), it reduces from
33 seconds to 5.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-02-03 06:00:51 -07:00
parent c58662fc65
commit a32eb7dca7
3 changed files with 43 additions and 10 deletions

View File

@@ -53,6 +53,8 @@ def run_tests(processes, args):
sys.argv = [sys.argv[0]]
test_name = args and args[0] or None
test_dtoc.setup()
test_util.RunTestSuites(
result, debug=True, verbosity=1, test_preserve_dirs=False,
processes=processes, test_name=test_name, toolpath=[],