waf: fixed exit status of test suites
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Oct 2010 01:25:42 +0000 (12:25 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 7 Oct 2010 03:29:21 +0000 (14:29 +1100)
use RUN_COMMAND() to handle signal errors and exit status

lib/talloc/wscript
lib/tdb/wscript
source4/lib/ldb/wscript

index 4f95da722363f9d8e976ec68dbaf1495b5875707..1670ebe48fa3d915b0049804b59534349b273e39 100644 (file)
@@ -87,9 +87,11 @@ def build(bld):
 
 def test(ctx):
     '''run talloc testsuite'''
-    import Utils
+    import Utils, samba_utils
     cmd = os.path.join(Utils.g_module.blddir, 'talloc_testsuite')
-    os.system(cmd)
+    ret = samba_utils.RUN_COMMAND(cmd)
+    print("testsuite returned %d" % ret)
+    sys.exit(ret)
 
 def dist():
     '''makes a tarball for distribution'''
index 53f81fe49b97c13a7c718792d87afe9e867d7922..6e00f3c917c1e811657865989dab4bd9d9841e89 100644 (file)
@@ -110,9 +110,11 @@ def build(bld):
 
 def test(ctx):
     '''run tdb testsuite'''
-    import Utils
+    import Utils, samba_utils
     cmd = os.path.join(Utils.g_module.blddir, 'tdbtorture')
-    os.system(cmd)
+    ret = samba_utils.RUN_COMMAND(cmd)
+    print("testsuite returned %d" % ret)
+    sys.exit(ret)
 
 def dist():
     '''makes a tarball for distribution'''
index ddf12835aa976334e9b552c81ed763891d38f30b..cf013ce1f2dac106dfd951eca19c68115bef028c 100644 (file)
@@ -214,9 +214,11 @@ def build(bld):
 
 def test(ctx):
     '''run ldb testsuite'''
-    import Utils
+    import Utils, samba_utils
     cmd = 'tests/test-tdb.sh'
-    os.system(cmd)
+    ret = samba_utils.RUN_COMMAND(cmd)
+    print("testsuite returned %d" % ret)
+    sys.exit(ret)
 
 def dist():
     '''makes a tarball for distribution'''