From 408cce48a583ff907c1ad8bd349a385e8ee554ec Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 7 Dec 2018 23:45:19 +0530 Subject: [PATCH] travis: fail fast if --with-marvin fails with nose (#3024) * travis: fail fast if --with-marvin fails with nose Install missing dependency pycrypto. This fixes issue with recent Travis runs which gave incorrect results around smoketests with simulator where each test run failed with an error like "nosetests: error: no such option: --with-marvin". Signed-off-by: Rohit Yadav --- tools/travis/before_install.sh | 4 +--- tools/travis/script.sh | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh index d6fb25cfbb3..a084d380056 100755 --- a/tools/travis/before_install.sh +++ b/tools/travis/before_install.sh @@ -98,11 +98,9 @@ echo " echo -e "\nInstalling some python packages: " -pip install --user --upgrade pip - for ((i=0;i<$RETRY_COUNT;i++)) do - pip install --user --upgrade lxml paramiko nose texttable ipmisim pyopenssl mock flask netaddr pylint pycodestyle six astroid > /tmp/piplog + pip install --user --upgrade lxml paramiko nose texttable ipmisim pyopenssl pycrypto mock flask netaddr pylint pycodestyle six astroid > /tmp/piplog if [[ $? -eq 0 ]]; then echo -e "\npython packages installed successfully" break; diff --git a/tools/travis/script.sh b/tools/travis/script.sh index c370225bb56..edf53ee0f09 100755 --- a/tools/travis/script.sh +++ b/tools/travis/script.sh @@ -26,6 +26,8 @@ mkdir -p integration-test-results/component TESTS=($@) echo "Running tests: " ${TESTS[@]} +set -e + for suite in "${TESTS[@]}" ; do echo "Currently running test: $suite" nosetests --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator || true ;