summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-07-08 11:40:52 +1000
committerAmitay Isaacs <amitay@samba.org>2014-07-08 10:17:54 +0200
commitdd1f23dc682c2e45950905cc4c13d032aef83698 (patch)
tree1be7e2f92d583e50cf08a5610bda295418af278e /ctdb
parente118a36c4ce8299e270278e27c3a5f5f9afb0049 (diff)
downloadsamba-dd1f23dc682c2e45950905cc4c13d032aef83698.tar.gz
ctdb-build: Check the return value of RUN_COMMAND
RUN_COMMAND does not raise exceptions if the command fails, but returns non-zero status. Ensure that make terminates with non-zero status if RUN_COMMAND fails. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/wscript15
1 files changed, 12 insertions, 3 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index df7ce98a77f..db5e5b6f430 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -528,7 +528,10 @@ def build(bld):
def testonly(ctx):
cmd = 'tests/run_tests.sh -V tests/var'
- samba_utils.RUN_COMMAND(cmd)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('tests exited with exit status %d' % ret)
+ sys.exit(ret)
def test(ctx):
import Scripting
@@ -537,7 +540,10 @@ def test(ctx):
def autotest(ctx):
cmd = 'LD_PRELOAD=bin/shared/libsocket-wrapper.so tests/run_tests.sh -e -S -C'
- samba_utils.RUN_COMMAND(cmd)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('autotest exited with exit status %d' % ret)
+ sys.exit(ret)
def show_version(ctx):
print VERSION
@@ -576,7 +582,10 @@ def dist():
def rpmonly(ctx):
cmd = 'rpmbuild -ta --clean --rmsource ctdb-%s.tar.gz' % VERSION
- samba_utils.RUN_COMMAND(cmd)
+ ret = samba_utils.RUN_COMMAND(cmd)
+ if ret != 0:
+ print('rpmbuild exited with exit status %d' % ret)
+ sys.exit(ret)
def rpm(ctx):
import Scripting