Skip to content

Commit

Permalink
Simplifying shell return code handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed May 8, 2015
1 parent 308bd9e commit a177769
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
30 changes: 13 additions & 17 deletions tests/test_suite.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
#!/bin/sh

RETURN_CODE=0
py.test -v test_netmiko_show.py --test_device cisco8812
if [ $? -ne 0 ]; then
RETURN_CODE=1
fi
#py.test -v test_netmiko_config.py --test_device cisco881

# Exit on the first test failure and set RETURN_CODE = 1
echo "Starting tests...good luck:" \
&& py.test -v test_netmiko_show.py --test_device cisco881 \
&& py.test -v test_netmiko_config.py --test_device cisco881 \
&& py.test -v test_netmiko_show.py --test_device arista_sw4 \
&& py.test -v test_netmiko_config.py --test_device arista_sw4 \
&& py.test -v test_netmiko_show.py --test_device hp_procurve \
&& py.test -v test_netmiko_config.py --test_device hp_procurve \
&& py.test -v test_netmiko_show.py --test_device juniper_srx \
&& py.test -v test_netmiko_config.py --test_device juniper_srx \
&& py.test -v test_netmiko_commit.py --test_device juniper_srx \
|| RETURN_CODE=1

#py.test -v test_netmiko_show.py --test_device cisco_asa
#py.test -v test_netmiko_config.py --test_device cisco_asa

#py.test -v test_netmiko_show.py --test_device arista_sw4
#py.test -v test_netmiko_config.py --test_device arista_sw4

#py.test -v test_netmiko_show.py --test_device hp_procurve
#py.test -v test_netmiko_config.py --test_device hp_procurve

#py.test -v test_netmiko_show.py --test_device juniper_srx
#py.test -v test_netmiko_config.py --test_device juniper_srx
#py.test -v test_netmiko_commit.py --test_device juniper_srx


exit $RETURN_CODE

2 changes: 1 addition & 1 deletion travis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import time
import sys

TRAVIS_DELAY = 0
TRAVIS_DELAY = 180


def main():
Expand Down

0 comments on commit a177769

Please sign in to comment.