[PATCH] aiaiai-test-patchset: optimize disk space

Jacob Keller jacob.e.keller at intel.com
Thu Nov 13 10:58:41 PST 2014


From: Robert Jarzmik <robert.jarzmik at free.fr>

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 <robert.jarzmik at free.fr>
Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
---
 aiaiai-test-patchset | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset
index dee9f80be2a6..2fcb51910e73 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.1.2.555.gfbecd99




More information about the aiaiai mailing list