diff --git a/script/test b/script/test index fe2d7ecb..1f6c3380 100755 --- a/script/test +++ b/script/test @@ -2,22 +2,13 @@ # script/test: Run static code checks and unit tests -# If a command fails, exit the script -set -e +source "$(dirname "${0}")"/../script/include/global_header.inc.sh -# Ensure we are in the app root directory (not the /script directory) -cd "$(dirname "${0}")/.." +# Define all relevant python files and directories for this app +PYTHON_FILES="./app.py ./atst ./config" -if [ -z "${SKIP_PIPENV+xxxx}" ]; then - CMD_PREFIX='pipenv run ' -fi -PYLINT_CMD="${CMD_PREFIX}pylint" -PYTHON_CMD="${CMD_PREFIX}python" +# Enable Python testing +RUN_PYTHON_TESTS="true" -# Run lint check -echo "Running lint..." -${PYLINT_CMD} app.py atst/ tests/ - -# Run unit tests -echo "Running unit tests..." -${PYTHON_CMD} -m pytest -s $* +# Run the shared test script +source ./script/include/run_test