summaryrefslogtreecommitdiff
path: root/tcwg-benchmark-bare.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2021-04-06 14:31:11 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2021-04-06 14:34:07 +0000
commit3461dd207a41f5b3665d457edc17a231e72cdb95 (patch)
treee3fcec7879cfdfb9b00fc29d8df0a4baebcc7148 /tcwg-benchmark-bare.sh
parent591a8fa69de47fdc3876187e0783dc40e32d22e8 (diff)
tcwg-benchmark-bare.sh: Delete temporary toolchain copies after use
We are accumulating local toolchain copies (via rsync currently), leading to disk full issues. We can remove them after the benchmark completed. The current patch does not delete the toolchain if the benchmark failed, because we run under 'set -e', and thus we exit/execute the trap handler before removing the toolchain. Change-Id: Ie52bf3498118046d057093c9db39763c44f1b0c1
Diffstat (limited to 'tcwg-benchmark-bare.sh')
-rwxr-xr-xtcwg-benchmark-bare.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tcwg-benchmark-bare.sh b/tcwg-benchmark-bare.sh
index 878eabe3..e21222d2 100755
--- a/tcwg-benchmark-bare.sh
+++ b/tcwg-benchmark-bare.sh
@@ -216,3 +216,13 @@ case "$bench_list" in
--verbose true
;;
esac
+
+# Delete temporary toolchains to avoid filling disk
+case "$toolchain_url" in
+ "ssh://"*)
+ # Nothing to do, we didn't copy any toolchain
+ ;;
+ "http://"*|"https://"*|"rsync://"*)
+ rm -rf $toolchaindir
+ ;;
+esac