Merge lp:~stub/charms/trusty/postgresql/fix-test-returncode into lp:charms/trusty/postgresql

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 134
Proposed branch: lp:~stub/charms/trusty/postgresql/fix-test-returncode
Merge into: lp:charms/trusty/postgresql
Diff against target: 32 lines (+15/-0)
1 file modified
Makefile (+15/-0)
To merge this branch: bzr merge lp:~stub/charms/trusty/postgresql/fix-test-returncode
Reviewer Review Type Date Requested Status
Cory Johns (community) Approve
Review Queue (community) automated testing Needs Fixing
Review via email: mp+277312@code.launchpad.net

Commit message

Fix test return codes

Description of the change

Late in debugging of the rewrite branch I added '| ts' to the end of the integration test commands so I could get timings and narrow down problems. Unfortunately, this swallows the error code so the tests would always succeed.

Fix this.

To post a comment you must log in.
Revision history for this message
Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/1441/

review: Approve (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/1427/

review: Needs Fixing (automated testing)
Revision history for this message
Cory Johns (johnsca) wrote :

Stuart,

This change looks perfectly acceptable to me, and I have merged it into the upstream charm.

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2015-11-02 05:12:22 +0000
3+++ Makefile 2015-11-12 05:35:18 +0000
4@@ -3,6 +3,12 @@
5 SERIES := $(shell juju get-environment default-series)
6 HOST_SERIES := $(shell lsb_release -sc)
7
8+# /!\ Ensure that errors early in pipes cause failures, rather than
9+# overridden by the last stage of the pipe. cf. 'test.py | ts'
10+SHELL := /bin/bash
11+export SHELLOPTS:=errexit:pipefail
12+
13+
14 default:
15 @echo "One of:"
16 @echo " make testdeps"
17@@ -11,6 +17,15 @@
18 @echo " make integration"
19 @echo " make coverage (opens browser)"
20
21+
22+_fail_ex:
23+ false | ts
24+
25+_success_ex:
26+ true | ts
27+
28+
29+
30 test: testdeps lint unittest integration
31
32 testdeps:

Subscribers

People subscribed via source and target branches

to all changes: