Improve example test script (with failing example)

This commit is contained in:
Alexander Engelsberger 2021-05-21 18:48:37 +02:00
parent c6992da123
commit 2aa631f4e6
3 changed files with 15 additions and 5 deletions

View File

@ -4,7 +4,9 @@ language: python
python: 3.8
cache:
directories:
- "$HOME/.cache/pip"
- "./tests/artifacts"
- "$HOME/datasets"
install:
- pip install git+git://github.com/si-cim/prototorch@dev --progress-bar off
- pip install .[all] --progress-bar off

View File

@ -4,7 +4,8 @@ import argparse
import prototorch as pt
import pytorch_lightning as pl
import torch
#import torch
if __name__ == "__main__":
# Command-line arguments

View File

@ -1,10 +1,17 @@
#! /bin/bash
failed=0
for example in $(find $1 -maxdepth 1 -name "*.py")
do
echo "test:" $example
export DISPLAY= && python $example --fast_dev_run 1
echo -n "$x" $example '... '
export DISPLAY= && python $example --fast_dev_run 1 &> /dev/null
if [[ $? -ne 0 ]]; then
exit 1
echo "Failed!!!!"
failed=1
else
echo "Success."
fi
done
done
exit $failed