]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
aiaiai-test-patchset: optimize disk space
authorRobert Jarzmik <robert.jarzmik@free.fr>
Thu, 6 Nov 2014 19:46:50 +0000 (20:46 +0100)
committerJacob Keller <jacob.e.keller@intel.com>
Thu, 13 Nov 2014 18:33:40 +0000 (10:33 -0800)
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@free.fr>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
aiaiai-test-patchset

index dee9f80be2a6eb6afdca3109dd76a2836f83ccde..2fcb51910e73625d197c234158aeef22c1858b0c 100755 (executable)
@@ -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=