From a32eb7dca7c3ea8d23e1bc0ce927ad2a00d8bf45 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 3 Feb 2021 06:00:51 -0700 Subject: 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 --- tools/dtoc/main.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/dtoc/main.py') diff --git a/tools/dtoc/main.py b/tools/dtoc/main.py index b0ad0f3952..355b1e6277 100755 --- a/tools/dtoc/main.py +++ b/tools/dtoc/main.py @@ -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=[], -- cgit v1.2.3