KERNELS_PYTEST_DIR="$( cd "$( dirname "$0" )/../../tests/kernels_pytest" && pwd )"
OPS_PYTEST="$( cd "$( dirname "$0" )/../../tests/ops_pytest" && pwd )"

if ! command -v coverage &> /dev/null
then
    echo "install coverage..."
    pip install coverage

    if [ $? -eq 0 ]; then
        echo "install coverage success"
    else
        echo "install coverage failure"
        exit 1
    fi
fi

${KERNELS_PYTEST_DIR}/build.sh
${KERNELS_PYTEST_DIR}/run_test.sh coverage
${OPS_PYTEST}/run_test.sh coverage

coverage report
coverage html
