[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: fix some more syntax/type errors caused by the earlier changes
Mattia Rizzolo
gitlab at salsa.debian.org
Mon Dec 2 18:51:49 GMT 2019
Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net
Commits:
0c89cfc4 by Mattia Rizzolo at 2019-12-02T18:51:15Z
reproducible: fix some more syntax/type errors caused by the earlier changes
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
3 changed files:
- bin/reproducible_archlinux_scheduler.sh
- bin/reproducible_html_dashboard.sh
- bin/reproducible_json.py
Changes:
=====================================
bin/reproducible_archlinux_scheduler.sh
=====================================
@@ -207,7 +207,7 @@ update_archlinux_repositories() {
LIMIT $MAX;"
local OLD=$(query_db "$QUERY")
for PKG_ID in $(echo -n "$OLD" | cut -d '|' -f1) ; do
- QUERY="INSERT INTO schedule (package_id, date_scheduled, build_type) 'ALUES ('${PKG_ID}', '$SCHDATE', 'ci_build');"
+ QUERY="INSERT INTO schedule (package_id, date_scheduled, build_type) VALUES ('${PKG_ID}', '$SCHDATE', 'ci_build');"
query_db "$QUERY"
done
echo "$(date -u ) - done scheduling $MAX old packages."
=====================================
bin/reproducible_html_dashboard.sh
=====================================
@@ -368,7 +368,7 @@ write_build_performance_stats() {
done
write_page "</tr><tr><td class=\"left\">average test duration (on $DATE)</td>"
for ARCH in ${ARCHS} ; do
- RESULT=$(query_db "SELECT COALESCE(CAST(AVG(r.build_duration) AS INTEGER), 0) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_duration!='0' AND r.build_date LIKE '%$DATE%' AND s.architecture='$ARCH'")
+ RESULT=$(query_db "SELECT COALESCE(CAST(AVG(r.build_duration) AS INTEGER), 0) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_duration!='0' AND r.build_date::date = '$DATE' AND s.architecture='$ARCH'")
MIN=$(echo $RESULT/60|bc)
SEC=$(echo "$RESULT-($MIN*60)"|bc)
write_page "<td>$MIN min., $SEC sec.</td>"
=====================================
bin/reproducible_json.py
=====================================
@@ -55,6 +55,7 @@ crossarch = {}
crossarchversions = {}
for row in result:
pkg = dict(zip(keys, row))
+ pkg['build_date'] = str(pkg['build_date'])
log.debug(pkg)
output.append(pkg)
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/0c89cfc48b9ba3b647e6f841dae2d997e92b8b8a
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/0c89cfc48b9ba3b647e6f841dae2d997e92b8b8a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20191202/db5679d1/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list