diff --git a/scripts/clmc-service/install.sh b/scripts/clmc-service/install.sh index 84039236d71171b6264010ea81575527e887332a..49283376d927da3823a2f14839cd4cd5d479cdf8 100755 --- a/scripts/clmc-service/install.sh +++ b/scripts/clmc-service/install.sh @@ -139,6 +139,16 @@ if [ $? -ne 0 ] ; then exit 1 fi +# running tests using tox +echo "----> Running tox" +TOX_OUTPUT="$(tox)" +# check if tox output contains the 'congratulations :)' bit for tests passed +if [[ $TOX_OUTPUT != *"congratulations :)"* ]]; then + echo "CLMC service unit tests failed." + exit 1 +fi +echo "----> Tox execution of unit tests passed successfully" + # install the service echo "----> Installing CLMC web service" pip3 install .