From e4a98edf0b80c036c62e9a21a45ce1b0f373d56b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 14 Mar 2015 20:42:36 +0100 Subject: reproducible: fixup: match suites ordering in query --- bin/reproducible_html_graphs.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index 6f5dcf15..1b12418f 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -280,20 +280,20 @@ create_png_from_table() { # run query if [ $1 -eq 1 ] ; then # not sure if it's worth to generate the following query... - sqlite3 -init ${INIT} --nullvalue 0 -csv ${PACKAGES_DB} "select s.datum, - s.reproducible as 'reproducible_testing', + sqlite3 -init ${INIT} --nullvalue 0 -csv ${PACKAGES_DB} "SELECT s.datum, + COALESCE((SELECT e.reproducible FROM stats_builds_per_day AS e where s.datum=e.datum and suite='testing'),0) as 'reproducible_testing', COALESCE((SELECT e.reproducible FROM stats_builds_per_day AS e where s.datum=e.datum and suite='unstable'),0) as 'reproducible_unstable', COALESCE((SELECT e.reproducible FROM stats_builds_per_day AS e where s.datum=e.datum and suite='experimental'),0) as 'reproducible_experimental', - s.unreproducible as 'unreproducible_testing', + (SELECT e.unreproducible FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='testing') AS unreproducible_testing, (SELECT e.unreproducible FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='unstable') AS unreproducible_unstable, (SELECT e.unreproducible FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='experimental') AS unreproducible_experimental, - s.FTBFS as 'FTBFS_testing', + (SELECT e.FTBFS FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='testing') AS FTBFS_testing, (SELECT e.FTBFS FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='unstable') AS FTBFS_unstable, (SELECT e.FTBFS FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='experimental') AS FTBFS_experimental, - s.other as 'other_testing', + (SELECT e.other FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='testing') AS other_testing, (SELECT e.other FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='unstable') AS other_unstable, (SELECT e.other FROM stats_builds_per_day e WHERE s.datum=e.datum AND suite='experimental') AS other_experimental - FROM stats_builds_per_day AS s WHERE s.suite='testing' GROUP BY s.datum" >> ${TABLE[$1]}.csv + FROM stats_builds_per_day AS s GROUP BY s.datum" >> ${TABLE[$1]}.csv elif [ $1 -eq 2 ] ; then sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT datum, ((oldest_reproducible + oldest_unreproducible + oldest_FTBFS)/3) FROM ${TABLE[$1]} ${WHERE_EXTRA} ORDER BY datum" >> ${TABLE[$1]}.csv elif [ $1 -eq 7 ] ; then -- cgit v1.2.3-70-g09d2