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

# Entry point for BBC Feature Tests

# Clean out anything that might be lurking around...
#git clean -fdx

# Export QNX enable variable
export ZOOX_ENABLE_QNX70=1

# Do a bazel shutdown before clearing out bazel cache
#bazel shutdown

# Clear out bazel cache
#rm -rf ~/.cache/bazel/


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

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

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

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