test(examples): print error message on fail

This commit is contained in:
Alexander Engelsberger 2021-06-21 15:06:37 +02:00
parent 2b2e4a5f37
commit 2649e3ac31
No known key found for this signature in database
GPG Key ID: BE3F5909FF0D83E3

View File

@ -5,13 +5,15 @@ failed=0
for example in $(find $1 -maxdepth 1 -name "*.py")
do
echo -n "$x" $example '... '
export DISPLAY= && python $example --fast_dev_run 1 &> /dev/null
export DISPLAY= && python $example --fast_dev_run 1 &> run_log.txt
if [[ $? -ne 0 ]]; then
echo "FAILED!!"
cat run_log.txt
failed=1
else
echo "SUCCESS!"
fi
rm run_log.txt
done
exit $failed