Commit a12014e7 authored by Andreas Tille's avatar Andreas Tille

enable checking more than one task

parent 3537ee2e
......@@ -58,12 +58,23 @@ while getopts "hjm" o; do
done
shift $((OPTIND-1))
if [ $# -ne 2 ] ; then
if [ $# -lt 2 ] ; then
usage
exit 1
fi
psql $SERVICE <<EOT
TASKSTRING="task = '$2'"
if [ "$3" != "" ] ; then
TASKSTRING="task in ('$2','$3')"
fi
if which psql-public-udd >/dev/null ; then
RUNPSQL=psql-public-udd
else
RUNPSQL="psql $SERVICE"
fi
$RUNPSQL >$1-$2-tests.out <<EOT
SELECT source, vote, MAX(testsuite) as testsuite, tags FROM (
SELECT source, vote, testsuite, tags, row_number() OVER (PARTITION BY source ORDER BY vote DESC) FROM (
SELECT DISTINCT p.source, p.package, CASE WHEN pop.vote IS NULL THEN -1 ELSE pop.vote END AS vote, s.testsuite, d.tags FROM packages p
......@@ -71,7 +82,7 @@ SELECT source, vote, MAX(testsuite) as testsuite, tags FROM (
LEFT OUTER JOIN (SELECT source, testsuite FROM sources WHERE release = 'sid' ) s ON p.source = s.source
LEFT OUTER JOIN (SELECT package, array_agg(tag) AS tags FROM debtags WHERE tag LIKE 'uitoolkit::%' OR tag LIKE '%x11%' GROUP BY package) d ON p.package = d.package
WHERE p.package IN (
SELECT package FROM blends_dependencies WHERE blend = '$1' AND task = '$2'
SELECT package FROM blends_dependencies WHERE blend = '$1' AND $TASKSTRING
)
AND p.release = 'sid'
) tmp1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment