tests: Don't count number of test units for demos

...there are no 'test' directives in demo, and this causes a
script failure.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2022-05-19 01:23:45 +02:00
parent c447344158
commit fe536d78ba

View file

@ -386,8 +386,10 @@ test_one() {
return
fi
__ntests="$(grep -c "^test$(printf '\t')" "${__test_file}")"
[ ${DEMO} -eq 0 ] && status_file_start "${1}" "${__ntests}"
if [ ${DEMO} -eq 0 ]; then
__ntests="$(grep -c "^test$(printf '\t')" "${__test_file}")"
status_file_start "${1}" "${__ntests}"
fi
[ ${CI} -eq 1 ] && video_link "${1}"