Commit ac16ff0b authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

ci: Extend tests.sh to run astakosclient unittests

parent 3d711cd6
...@@ -64,7 +64,7 @@ cmd_options = --nofailfast --no-ipv6 --action-timeout=240 ...@@ -64,7 +64,7 @@ cmd_options = --nofailfast --no-ipv6 --action-timeout=240
[Unit Tests] [Unit Tests]
component = astakos cyclades pithos component = astakos cyclades pithos astakosclient
[Repository] [Repository]
......
...@@ -64,7 +64,7 @@ cmd_options = --nofailfast --no-ipv6 --action-timeout=240 ...@@ -64,7 +64,7 @@ cmd_options = --nofailfast --no-ipv6 --action-timeout=240
[Unit Tests] [Unit Tests]
component = astakos cyclades pithos component = astakos cyclades pithos astakosclient
[Repository] [Repository]
......
...@@ -4,15 +4,19 @@ set -e ...@@ -4,15 +4,19 @@ set -e
SNF_MANAGE=$(which snf-manage) || SNF_MANAGE=$(which snf-manage) ||
{ echo "Cannot find snf-manage in $PATH" 1>&2; exit 1; } { echo "Cannot find snf-manage in $PATH" 1>&2; exit 1; }
runtest () { runTest () {
TEST="$SNF_MANAGE test $* --traceback --noinput --settings=synnefo.settings.test" TEST="$SNF_MANAGE test $* --traceback --noinput --settings=synnefo.settings.test"
runCoverage "$TEST"
}
runCoverage () {
if coverage >/dev/null 2>&1; then if coverage >/dev/null 2>&1; then
coverage run $TEST coverage run $1
coverage report --include=snf-* coverage report --include=snf-*
else else
echo "WARNING: Cannot find coverage in path, skipping coverage tests" 1>&2 echo "WARNING: Cannot find coverage in path, skipping coverage tests" 1>&2
$TEST $1
fi fi
} }
...@@ -24,17 +28,20 @@ PITHOS_APPS="api" ...@@ -24,17 +28,20 @@ PITHOS_APPS="api"
TEST_COMPONENTS="$@" TEST_COMPONENTS="$@"
if [ -z "$TEST_COMPONENTS" ]; then if [ -z "$TEST_COMPONENTS" ]; then
TEST_COMPONENTS="astakos cyclades pithos" TEST_COMPONENTS="astakos cyclades pithos astakosclient"
fi fi
for component in $TEST_COMPONENTS; do for component in $TEST_COMPONENTS; do
if [ "$component" = "astakos" ]; then if [ "$component" = "astakos" ]; then
runtest $ASTAKOS_APPS runTest $ASTAKOS_APPS
elif [ "$component" = "cyclades" ]; then elif [ "$component" = "cyclades" ]; then
export SYNNEFO_EXCLUDE_PACKAGES="snf-pithos-app" export SYNNEFO_EXCLUDE_PACKAGES="snf-pithos-app"
runtest $CYCLADES_APPS runTest $CYCLADES_APPS
elif [ "$component" = "pithos" ]; then elif [ "$component" = "pithos" ]; then
export SYNNEFO_EXCLUDE_PACKAGES="snf-cyclades-app" export SYNNEFO_EXCLUDE_PACKAGES="snf-cyclades-app"
runtest $PITHOS_APPS runTest $PITHOS_APPS
elif [ "$component" = "astakosclient" ]; then
TEST="nosetests astakosclient"
runCoverage "$TEST"
fi fi
done done
...@@ -856,6 +856,7 @@ class SynnefoCI(object): ...@@ -856,6 +856,7 @@ class SynnefoCI(object):
cmd = """ cmd = """
pip install -U mock pip install -U mock
pip install -U factory_boy pip install -U factory_boy
pip install -U nose
""" """
_run(cmd, False) _run(cmd, False)
......
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