run_tests()
{
- SELECTED_TESTS=$1
+ SELECTED_TESTS=$@
+
+ echo ""
+ echo "Running tests:"
+ echo "======================"
+ for TEST_NAME in $SELECTED_TESTS; do
+ echo $TEST_NAME
+ done
+ echo "======================"
+ echo ""
for TEST_NAME in $SELECTED_TESTS; do
mkdir -p $TEST_CACHE_PATH
fi
if [ ! -e $MODELFILE ]; then
+ echo ""
+ echo "Download test file for $TEST_NAME"
+ echo "======================"
+
pushd $TEST_CACHE_PATH
wget $MODELFILE_SERVER/$MODELFILE_NAME
popd
fi
+ echo ""
+ echo "Run $TEST_NAME"
+ echo "======================"
# Run driver to test framework
$DRIVER_BIN $MODELFILE
done
pushd $TEST_ROOT_PATH > /dev/null
for DIR in $TEST_DIRS; do
if [ -d "$DIR" ]; then
- TESTS_FOUND=$(find "$DIR" -type f -name 'config.sh' | sed 's|^./||' )
- TESTS_TO_RUN="$TESTS_TO_RUN ${TESTS_FOUND%/*}"
+ TESTS_FOUND=$(find "$DIR" -type f -name 'config.sh' | sed 's|^./||' | xargs dirname | sort)
+ TESTS_TO_RUN="$TESTS_TO_RUN $TESTS_FOUND"
fi
done
popd > /dev/null