prototorch_models/tests/test_examples.sh

18 lines
309 B
Bash
Raw Normal View History

2021-05-21 18:16:17 +02:00
#! /bin/bash
failed=0
2021-05-21 18:16:17 +02:00
for example in $(find $1 -maxdepth 1 -name "*.py")
do
echo -n "$x" $example '... '
2021-05-25 21:28:05 +02:00
export DISPLAY= && python $example --fast_dev_run 1 &> /dev/null
2021-05-21 18:16:17 +02:00
if [[ $? -ne 0 ]]; then
2021-05-25 21:28:05 +02:00
echo "FAILED!!"
failed=1
else
2021-05-25 21:28:05 +02:00
echo "SUCCESS!"
2021-05-21 18:16:17 +02:00
fi
done
2021-05-25 21:28:05 +02:00
exit $failed