summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-12-11 13:32:16 +0000
committerFrediano Ziglio <fziglio@redhat.com>2017-12-11 13:32:16 +0000
commita4aa66c7957f9a72f05cb2407d1d03550ddee796 (patch)
tree34a9bc27e68713974e4114687be4ac4d6757a7bd
parent34a63dc7743c3729132fea7d5acf4dae3c30db2a (diff)
Cache commit compilation
Svoid to recompile commit already checked. Some branches can share the same commit.
-rwxr-xr-xspice-server/rebase13
1 files changed, 11 insertions, 2 deletions
diff --git a/spice-server/rebase b/spice-server/rebase
index 0e3daa0..2c90db6 100755
--- a/spice-server/rebase
+++ b/spice-server/rebase
@@ -84,6 +84,8 @@ failed=''
failed_compile=''
processed=''
+declare -A commits
+
try_compile() {
local last_failed=''
if test "$COMPILE" = "no"; then
@@ -96,7 +98,14 @@ try_compile() {
for commit in $(git rev-list ${REBASE_TO}..$branch --reverse); do
echo "checking branch $branch commit $commit"
git checkout $commit &> /dev/null
- if ! make -j3 &> compile_err_$branch.txt; then
+ if [ "${commits[$commit]}" = "" ]; then
+ if ! make -j &> compile_err_$branch.txt; then
+ commits[$commit]='no'
+ else
+ commits[$commit]='yes'
+ fi
+ fi
+ if [ "${commits[$commit]}" = "no" ]; then
failed_compile+="
$branch:$commit"
last_failed='+'
@@ -107,7 +116,7 @@ try_compile() {
done
failed_compile+="$last_failed"
else
- if ! make -j3 &> compile_err_$branch.txt; then
+ if ! make -j &> compile_err_$branch.txt; then
failed_compile+="
$branch"
else