diff options
author | adrian-turjak <adriant@catalyst.net.nz> | 2017-07-20 01:42:20 +1200 |
---|---|---|
committer | Adrian Turjak <adriant@catalyst.net.nz> | 2017-07-29 00:10:22 +1200 |
commit | 280848c55ffeb8cfe948acd5f2ca234d2c1264f5 (patch) | |
tree | 2ed8be79b3479439ffcc51c0cf2144807ff021d0 /tools | |
parent | 79a3c65f4a4446d571ad1a51be075e142426a00a (diff) | |
download | horizon-280848c55ffeb8cfe948acd5f2ca234d2c1264f5.tar.gz |
Ensure tox registers failures properly
Tox runs tests via unit_tests.sh which when not
running a test subset will mean tox only checks for
the final exit code. This means horizon test failues
will not be seen by tox unless openstack_dashboard
tests also fail.
This change forces an exit code which !=0 if either
test run fails.
Change-Id: I8fbcb834d9817e7eea1b2c39fc4caab6004b981b
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/unit_tests.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/unit_tests.sh b/tools/unit_tests.sh index edff8acfc..05480a205 100755 --- a/tools/unit_tests.sh +++ b/tools/unit_tests.sh @@ -25,6 +25,12 @@ if [ -n "$subset" ]; then fi else $testcommand horizon --settings=horizon.test.settings $posargs + horizon_tests=$? $testcommand openstack_dashboard --settings=openstack_dashboard.test.settings \ --exclude-dir=openstack_dashboard/test/integration_tests $posargs + openstack_dashboard_tests=$? + # we have to tell tox if either of these test runs failed + if [[ $horizon_tests != 0 || $openstack_dashboard_tests != 0 ]]; then + exit 1; + fi fi |