[U-Boot] [PATCH 06/17] buildman: Don't remove entire output directory when testing
Simon Glass
sjg at chromium.org
Tue Dec 2 01:33:56 CET 2014
When running tests the output directory is often wiped. This is only safe if
a branch is being built. The output directory may contain other things
besides the buildman test output.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/buildman/control.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index df24509..331b4f9 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -213,7 +213,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
# output directory itself rather than any subdirectory.
if not options.no_subdirs:
output_dir = os.path.join(options.output_dir, dirname)
- if clean_dir and os.path.exists(output_dir):
+ if (clean_dir and output_dir != options.output_dir and
+ os.path.exists(output_dir)):
shutil.rmtree(output_dir)
builder = Builder(toolchains, output_dir, options.git_dir,
options.threads, options.jobs, gnu_make=gnu_make, checkout=True,
--
2.2.0.rc0.207.ga3a616c
More information about the U-Boot
mailing list