#! /bin/bash

NULL=

# Keep this ordered from the fast and more low level ones to the ones which
# require a full image build/run/etc.
ALL_TESTS="\
    test_internal \
    test_no_image \
    test_dockerfile \
    test_images \
    test_run \
    "

OPTS=
if [ "$V" = "1" ]; then
    OPTS="$OPTS -v"
fi

if [ $# -eq 0 ]; then
    TESTS_TO_RUN=($ALL_TESTS)
else
    TESTS_TO_RUN=("$@")
fi

cd $(dirname $0)
export PYTHONPATH="..:$PYTHONPATH"
python -m unittest $OPTS "${TESTS_TO_RUN[@]}"
