#! /bin/sh
set -xe
origin="$PWD"

# Set up virtualenv
if [ -d doorbot_env ]; then
    rm -rf doorbot_env
fi

virtualenv -p python3.6 doorbot_env
. doorbot_env/bin/activate
python -m pip install -r firmware/validation/doorbot/requirements.txt

# DBC files are generated by the make_dbcs fixture defined in the dbc_builder.py plugin.

# Run Smoke Test
python -m pytest firmware/validation/doorbot/test_deploy.py \
                 --exitfirst \
                 --verbose

# Run everything else
python -m pytest firmware/validation/doorbot/ \
                 --ignore=firmware/validation/doorbot/test_deploy.py \
                 --verbose
