tests.sh 489 Bytes
Newer Older
1
#!/bin/sh
2

3
4
set -e

5
6
7
8
export SYNNEFO_SETTINGS_DIR=/tmp/snf-test-settings

SNF_MANAGE=$(which snf-manage) ||
	echo "Cannot find snf-manage in $PATH" 1>&2 && exit 1
9

10
APPS="api db logic plankton quotas vmapi im quotaholder_app helpdesk"
11
TEST="$SNF_MANAGE test $APPS --traceback --settings=synnefo.settings.test"
12
13
14
15
16

if coverage >/dev/null 2>&1; then
  coverage run $TEST
  coverage report --include=snf-*
else
17
  echo "WARNING: Cannot find coverage in path, skipping coverage tests" 1>&2
18
19
  $TEST
fi