1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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>
This commit is contained in:
Amitay Isaacs 2014-07-08 11:40:52 +10:00 committed by Amitay Isaacs
parent e118a36c4c
commit dd1f23dc68

View File

@ -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