faultspaceplot: add sanity check

faultspaceplot.sh now fails gracefully if the requested
variant/benchmark combination does not exist in the database.

Change-Id: Ied3b5a0e72cc5ae8e6ce352b65486f15bb13576b
This commit is contained in:
Horst Schirmeier
2018-07-13 12:13:08 +02:00
parent e64fd740fe
commit 385830969c

View File

@ -60,6 +60,13 @@ $MYSQL <<EOT > $RAWCSV
AND t.accesstype = 'R';
EOT
# sanity check
if [ $(wc -l < $RAWCSV) -le 1 ]; then
rm "$RAWCSV"
echo "no result data found for variant/benchmark $VARIANT/$BENCHMARK." >&2
exit 1
fi
# compact data
echo "compacting data.."
COMPACTCSV=$(mktemp)