From 2115f7ff059260732208d9330d8d8db17734dfab Mon Sep 17 00:00:00 2001 From: Robert Jarzmik Date: Thu, 6 Nov 2014 20:46:50 +0100 Subject: [PATCH] aiaiai-test-patchset: optimize disk space When compiling multiple defconfigs, remove the build tree between each compilation to spare disk space. In this way the build trees don't accumulate on the disk while testing the same patchset, and the patchset scales with the number of defconfigs, which is not limiting the build anymore. Jacob: Honor preserve variable, so that when requested we maintain files. Signed-off-by: Robert Jarzmik Signed-off-by: Jacob Keller --- aiaiai-test-patchset | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset index dee9f80..2fcb519 100755 --- a/aiaiai-test-patchset +++ b/aiaiai-test-patchset @@ -247,6 +247,13 @@ test_configuration() aiaiai-diff-log $verbose $preserve "$tmpdir/diff-for-diff-log" "$log1.stderr.log" \ -w "$tmpdir" "$log2.stderr.log" > "$tmpdir/$config.stderr.diff" + + if [ -n "$preserve" ]; then + message "Preserving objdirs: $obj1 $obj2" + else + [ -d "$obj1" ] && (verbose "Removing $obj1"; rm -rf -- "$obj1" >&2) + [ -d "$obj2" ] && (verbose "Removing $obj2"; rm -rf -- "$obj2" >&2) + fi } tmpdir= -- 2.49.0