Fix the logic to check if the email auth token is present.
While at it, make output more verbose for easier debug.
Change-Id: I3459396c4fca66ca7c1f4a4fd23d65b7019ed6d6
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
# ask for email report
-if [ -z "$KCI_EMAIL_AUTH_TOKEN" ]; then
+set -x
+if [ -n "$KCI_EMAIL_AUTH_TOKEN" ]; then
KCI_API='https://kernelci.dev.baylibre.com:8081'
TREE_NAME=$(grep kernel.tree: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2)
BRANCH=$(grep git.branch: $JOB_FILE_NEW | sed 's,[[:space:]],,g' | cut -d: -f2)
echo "There is no test plan identified"
fi
fi
+set +x
+
# after one successful submit, we're done
if [ x"$status" = x"Complete" ]; then
exit 0