diff options
author | Simon Glass | 2014-12-01 17:33:56 -0700 |
---|---|---|
committer | Simon Glass | 2015-01-14 21:16:52 -0800 |
commit | 0740127f4d59564a8bdb64c59fb4f5c2357350f9 (patch) | |
tree | c7206912827df0876c76e469afde11803f2b7192 /tools | |
parent | 5971ab5c44cb0c32c88fcdc90a3a9b6430463c4c (diff) |
buildman: Don't remove entire output directory when testing
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@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/buildman/control.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 747c80d76a5..2249b0f7003 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -215,7 +215,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, |