summaryrefslogtreecommitdiffstats
path: root/autobuild
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2015-11-07 17:35:17 +0000
committerPascal Terjan <pterjan@gmail.com>2015-11-07 17:35:17 +0000
commitdc60b8f56027a806877ff692b73932d347f29745 (patch)
treed385c9a23c1c5dcc9f5b427289ff7954a57908b8 /autobuild
parent6d8998d9fdc00a5163e6ca460c44f5637a1db1c6 (diff)
downloadpkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar
pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar.gz
pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar.bz2
pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar.xz
pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.zip
Add a link on failed architectures
Diffstat (limited to 'autobuild')
-rw-r--r--autobuild/results.php30
1 files changed, 9 insertions, 21 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index 053d4b2..2fcf432 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -166,34 +166,22 @@ function toggle(titleid, contentid){
<?php
# See if the pattern of recent build failures indicate a flaky build
-# This looks at the last 10 builds for at least two failures
+# This looks at the last 10 builds for at least 4 result change
function is_flaky($history) {
if (count($history) < 10)
return false;
# Most recent 5 builds
- $num_bad = 0;
- for ($i = 0; $i < 5; $i++) {
- if ($history[$i] === 'build_failure')
- $num_bad++;
+ $num_change = 0;
+ $current = $history[0];
+ for ($i = 1; $i < 10; $i++) {
+ if ($history[$i] != $current) {
+ $num_change++;
+ $current = $history[$i];
+ }
}
- if ($num_bad < 1 || $num_bad >= 5)
- return false;
- # Next older 5 builds
- $num_bad_older = 0;
- for ($i = 5; $i < 10; $i++) {
- if ($history[$i] === 'build_failure')
- $num_bad_older++;
- }
- if ($num_bad_older < 1 || $num_bad_older >= 5)
- return false;
-
- $num_bad = $num_bad + $num_bad_older;
- if ($num_bad < 2 || $num_bad > 7)
- return false;
-
- return true;
+ return $num_change >= 4;
}
function get_build_history($package) {