diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.py | 5 | ||||
-rwxr-xr-x | bin/reproducible_common.sh | 19 | ||||
-rwxr-xr-x | bin/reproducible_html_graphs.sh | 46 |
3 files changed, 45 insertions, 25 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index c05f3d63..7c1574cf 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -161,9 +161,10 @@ html_head_page = Template((tab*2).join(""" <li><a href="index_last_48h.html">packages tested in the last 48h</a></li> <li><a href="index_all_abc.html">all tested packages (sorted alphabetically)</a></li> <li><a href="index_dd-list.html">maintainers of unreproducible packages</a></li> - <li><a href="/index_repo_stats.html">apt repository stats</a></li> <li><a href="/index_pkg_sets.html">package sets stats</a></li> - <li><a href="/index_stats.html">stats</a></li> + <li><a href="index_suite_stats.html">\$suite stats</a></li> + <li><a href="/index_repo_stats.html">repositories overview</a></li> + <li><a href="/reproducible_stats.html">reproducible stats</a></li> </ul> </header>""".splitlines(True))) diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index daefb044..4bba38d1 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -76,8 +76,8 @@ META_PKGSET[13]="maint_pkg-perl-maintainers" init_html() { MAINVIEW="stats" ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted" - ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list repo_stats pkg_sets stats" - GLOBALVIEWS="issues notes no_notes repo_stats pkg_sets stats" + ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list pkg_sets suite_stats repo_stats stats" + GLOBALVIEWS="issues notes no_notes pkg_sets repo_stats stats" SPOKENTARGET["issues"]="issues" SPOKENTARGET["notes"]="packages with notes" SPOKENTARGET["no_notes"]="packages without notes" @@ -86,9 +86,10 @@ init_html() { SPOKENTARGET["last_48h"]="packages tested in the last 48h" SPOKENTARGET["all_abc"]="all tested packages (sorted alphabetically)" SPOKENTARGET["dd-list"]="maintainers of unreproducible packages" - SPOKENTARGET["repo_stats"]="apt repository stats" SPOKENTARGET["pkg_sets"]="package sets stats" - SPOKENTARGET["stats"]="$SUITE stats" + SPOKENTARGET["suite_stats"]="$SUITE stats" + SPOKENTARGET["repo_stats"]="repositories overview" + SPOKENTARGET["stats"]="reproducible stats" # query some data we need everywhere AMOUNT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT count(*) FROM sources WHERE suite=\"${SUITE}\"") COUNT_TOTAL=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(*) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite=\"${SUITE}\"") @@ -166,10 +167,12 @@ write_page_header() { continue fi write_page "<li><a href=\"$BASEURL/index_${TARGET}.html\">${SPOKEN_TARGET}</a></li>" - done - for i in $SUITES ; do - if [ "$i" != "$SUITE" ] ; then - write_page "<li><a href=\"/$i\">suite: $i</a></li>" + if [ "$TARGET" = "suite_stats" ] ; then + for i in $SUITES ; do + if [ "$i" != "$SUITE" ] ; then + write_page "<li><a href=\"/$i\">suite: $i</a></li>" + fi + done fi done write_page "</ul>" diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index cd612d1f..52d342af 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -254,7 +254,7 @@ write_usertag_table() { fi } -VIEW=stats +VIEW=suite_stats PAGE=index_${VIEW}.html echo "$(date) - starting to write $PAGE page." write_page_header $VIEW "Overview of various statistics about reproducible builds for $SUITE" @@ -284,21 +284,11 @@ set_icon blacklisted write_icon write_page "$COUNT_BLACKLISTED blacklisted packages neither.</p>" write_page "<p>" -# FIXME: we don't do 2 / stats_builds_age.png yet :/ (and 6 is special anyway) -for i in 0 3 4 5 1 ; do - if [ $i -ne 0 ] && [ "$SUITE" != "sid" ] ; then - # do most stats only for sid - continue - fi - if [ "$i" = "3" ] ; then - write_usertag_table - fi - write_page " <a href=\"/userContent/${TABLE[$i]}.png\"><img src=\"/userContent/$SUITE/${TABLE[$i]}.png\" class=\"graph\" alt=\"${MAINLABEL[$i]}\"></a>" - # redo pngs once a day - if [ ! -f /var/lib/jenkins/userContent/${TABLE[$i]}.png ] || [ -z $(find /var/lib/jenkins/userContent -maxdepth 1 -mtime +0 -name ${TABLE[$i]}.png) ] ; then - redo_png $i ${TABLE[$i]}.png +write_page " <a href=\"/userContent/${TABLE[0]}.png\"><img src=\"/userContent/$SUITE/${TABLE[0]}.png\" class=\"graph\" alt=\"${MAINLABEL[0]}\"></a>" +# redo png once a day +if [ ! -f /var/lib/jenkins/userContent/$SUITE/${TABLE[0]}.png ] || [ -z $(find /var/lib/jenkins/userContent/$SUITE -maxdepth 1 -mtime +0 -name ${TABLE[0]}.png) ] ; then + redo_png $i ${TABLE[0]}.png fi -done write_page "</p>" write_page_footer publish_page $SUITE @@ -371,3 +361,29 @@ done write_page_footer publish_page +if [ "$SUITE" != "sid" ] ; then + # stop here if not called with no arguments... + exit 0 +fi +VIEW=stats +PAGE=index_${VIEW}.html +echo "$(date) - starting to write $PAGE page." +write_page_header $VIEW "Overview of various statistics about reproducible builds" +write_page "<p>" +write_page "<p>" +# FIXME: we don't do 2 / stats_builds_age.png yet :/ (and 6 and 0 are done already) +for i in 3 4 5 1 ; do + if [ "$i" = "3" ] ; then + write_usertag_table + fi + write_page " <a href=\"/userContent/${TABLE[$i]}.png\"><img src=\"/userContent/$SUITE/${TABLE[$i]}.png\" class=\"graph\" alt=\"${MAINLABEL[$i]}\"></a>" + # redo pngs once a day + if [ ! -f /var/lib/jenkins/userContent/${TABLE[$i]}.png ] || [ -z $(find /var/lib/jenkins/userContent -maxdepth 1 -mtime +0 -name ${TABLE[$i]}.png) ] ; then + redo_png $i ${TABLE[$i]}.png + fi +done +write_page "</p>" +write_page_footer +publish_page $SUITE + + |