Skip to content
Snippets Groups Projects
Commit cca6692a authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Adding run_tests.sh

parent 4bea59aa
No related branches found
No related tags found
No related merge requests found
Pipeline #15361 failed
#!/bin/bash
set -e
function usage {
echo "arguments:"
echo "-w warnings are errors"
exit 1
}
# parse the command line
excluded_files=""
extra_arguments=""
while getopts "w" opt ; do
case $opt in
w)
echo "WARNING: warnings are treated like errors for debugging."
extra_arguments="-W error"
;;
*)
usage
;;
esac
done
if [[ ! -z $excluded_files ]] ; then
ignore_option="--ignore=$excluded_files"
fi
# create a virtual environement and install all dependencies
if [[ ! -d venv ]] ; then
python3 -m venv --prompt enstools-compression venv
source venv/bin/activate
pip install -U pip
pip install -e .
pip install --force-reinstall pytest pytest-mock
fi
source venv/bin/activate
pytest ${extra_arguments} ${ignore_option}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment