Commit 714e5ceb authored by Georgios D. Tsoukalas's avatar Georgios D. Tsoukalas Committed by Christos Stavrakakis

support both pithos and cyclades in tests.sh

parent fc1288ca
#!/bin/sh
set -e
export SYNNEFO_SETTINGS_DIR=/tmp/snf-test-settings
SNF_MANAGE=$(which snf-manage) ||
{ echo "Cannot find snf-manage in $PATH" 1>&2; exit 1; }
APPS="api db logic plankton quotas vmapi im quotaholder_app helpdesk"
TEST="$(which snf-manage) test $APPS --traceback --settings=synnefo.settings.test"
runtest () {
TEST="$SNF_MANAGE test $* --traceback --settings=synnefo.settings.test"
if coverage >/dev/null 2>&1; then
coverage run $TEST
coverage report --include=snf-*
else
echo "WARNING: Cannot find coverage in path, skipping coverage tests" 1>&2
$TEST
if coverage >/dev/null 2>&1; then
coverage run $TEST
coverage report --include=snf-*
else
echo "WARNING: Cannot find coverage in path, skipping coverage tests" 1>&2
$TEST
fi
}
export SYNNEFO_SETTINGS_DIR=/tmp/snf-test-settings
ASTAKOS_APPS="im quotaholder_app"
CYCLADES_APPS="api db logic plankton quotas vmapi helpdesk"
PITHOS_APPS="api"
TEST_COMPONENTS="$@"
if [ -z "$TEST_COMPONENTS" ]; then
TEST_COMPONENTS="astakos cyclades pithos"
fi
for component in $TEST_COMPONENTS; do
if [ "$component" = "astakos" ]; then
runtest $ASTAKOS_APPS
elif [ "$component" = "cyclades" ]; then
SYNNEFO_EXCLUDE_PACKAGES="$SYNNEFO_EXCLUDE_PACKAGES snf-pithos-app" \
runtest $CYCLADES_APPS
elif [ "$component" = "pithos" ]; then
SYNNEFO_EXCLUDE_PACKAGES="$SYNNEFO_EXCLUDE_PACKAGES snf-cyclades-app" \
runtest $PITHOS_APPS
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment