forked from ktbyers/netmiko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplifying shell return code handling
- Loading branch information
Showing
2 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
import time | ||
import sys | ||
|
||
TRAVIS_DELAY = 0 | ||
TRAVIS_DELAY = 180 | ||
|
||
|
||
def main(): | ||
|