From 9f4f57eed3a36fb2f84f828f9bebe14d730cba44 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Tue, 2 Jul 2019 17:00:08 -0700 Subject: [PATCH] sanitycheck: don't multiply CPU count We have a number of timing sensitive tests which run correctly on a much more frequent basis if the system is not so heavily loaded. Instead of squeezing a few more crumbs of performance by doubling the CPU count, just use the number of CPUs reported by the system. Signed-off-by: Andrew Boie --- scripts/sanitycheck | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 73fbe756507..2f11c3d388a 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -226,7 +226,6 @@ LAST_SANITY_XUNIT = os.path.join(ZEPHYR_BASE, "scripts", "sanity_chk", "last_sanity.xml") RELEASE_DATA = os.path.join(ZEPHYR_BASE, "scripts", "sanity_chk", "sanity_last_release.csv") -JOBS = multiprocessing.cpu_count() * 2 if os.isatty(sys.stdout.fileno()): TERMINAL = True @@ -3259,6 +3258,10 @@ def main(): if options.jobs: JOBS = options.jobs + elif options.build_only: + JOBS = multiprocessing.cpu_count() * 2 + else: + JOBS = multiprocessing.cpu_count() # Decrease JOBS for Ninja, if jobs weren't explicitly set if options.ninja and not options.jobs: