#!/bin/bash

. $TEST_ROOT_DIR/run-test-common

python -c "import sys; print('Python: %s'%sys.version)"
python -c "import numpy; print('NumPy: %s'%numpy.version.full_version)"
python -c "import scipy; print('SciPy: %s'%scipy.version.full_version)"
python -c "import pytest; print('PyTest: %s'%pytest.__version__)"

# TODO why doesn't "py.test --pyargs cntk" work?
MODULE_DIR="$(python -c "import cntk, os, sys; sys.stdout.write(os.path.dirname(os.path.abspath(cntk.__file__)))")"
[ $? -eq 0 ] || exit $?
py.test "$MODULE_DIR" --verbose --deviceid $TEST_DEVICE 

if [ "$?" -eq "0" ]; then
  echo "__COMPLETED__"
fi
