summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-01-12 22:50:49 -0700
committerCommit Bot <commit-bot@chromium.org>2022-01-14 03:06:42 +0000
commitc7e09bf5303f43059429ff6cf3d441394e033010 (patch)
treef82f79941451f2954d14d4e9a77c9950e9649eea
parent4b02b34ddbcc09a92f23444b31d806af577e6a0b (diff)
downloadchrome-ec-c7e09bf5303f43059429ff6cf3d441394e033010.tar.gz
zephyr: zmake: Don't use temp directories for testall
Using build/zephyr/<project_name> for testall builds enables: - Faster testall when only a minor change is made (only 27s with Goma enabled!). - Easy access to the build artifacts for inspection or flashing. Seems like a no brainer to make this change... the temp directories was just a thing from when zmake did not have the default directories in the early days. BUG=b:214321770 BRANCH=none TEST=only 27s for a second testall with goma enabled Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5ed149051e74f5ba3d0e4cdca4ec7530cf8eeee2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385776 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--zephyr/zmake/zmake/zmake.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index b3506d56ad..222e069c8b 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -11,7 +11,6 @@ import pathlib
import re
import shutil
import subprocess
-import tempfile
import zmake.build_config
import zmake.generate_readme
@@ -595,31 +594,21 @@ class Zmake:
def testall(self, clobber=False):
"""Test all the valid test targets"""
- tmp_dirs = []
for project in zmake.project.find_projects(
self.module_paths["ec"] / "zephyr"
).values():
is_test = project.config.is_test
- temp_build_dir = tempfile.mkdtemp(
- suffix="-{}".format(project.config.project_name),
- prefix="zbuild-",
- )
- tmp_dirs.append(temp_build_dir)
# Configure and run the test.
self.executor.append(
func=lambda: self._configure(
project=project,
- build_dir=pathlib.Path(temp_build_dir),
build_after_configure=True,
test_after_configure=is_test,
clobber=clobber,
)
)
- rv = self.executor.wait()
- for tmpdir in tmp_dirs:
- shutil.rmtree(tmpdir)
- return rv
+ return self.executor.wait()
def _run_lcov(self, build_dir, lcov_file, initial=False, gcov=""):
gcov = os.path.abspath(gcov)