diff options
author | Pascal Terjan <pterjan@gmail.com> | 2015-11-07 17:35:17 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2015-11-07 17:35:17 +0000 |
commit | dc60b8f56027a806877ff692b73932d347f29745 (patch) | |
tree | d385c9a23c1c5dcc9f5b427289ff7954a57908b8 | |
parent | 6d8998d9fdc00a5163e6ca460c44f5637a1db1c6 (diff) | |
download | pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar.gz pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar.bz2 pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.tar.xz pkgsubmit-dc60b8f56027a806877ff692b73932d347f29745.zip |
Add a link on failed architectures
-rw-r--r-- | autobuild/results.php | 30 | ||||
-rw-r--r-- | index.php | 3 |
2 files changed, 11 insertions, 22 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) { @@ -194,7 +194,8 @@ if ($total > 0) { $failed_arches = array_keys($p['status']['fail']); if (!empty($failed_arches)) { sort($failed_arches); - $s .= '<span class="failure"><span class="status-box"></span> ' . join(' ', $failed_arches) . '</span>'; + $typelink = '/uploads/failure/' . $p['path']; + $s .= '<a rel="nofollow" href="' . $typelink . '" class="status-link"><span class="failure"><span class="status-box"></span> ' . join(' ', $failed_arches) . '</span></a>'; } $s .= '</td></tr>'; |