[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Wed Oct 6 22:12:01 MDT 2010


The branch, master has been updated
       via  321bb40 script: improvements to bisect-test.py
       via  bb00176 waf: fixed exit status of test suites
      from  fdad032     s3: Adding TCP_KEEPALIVE_THRESHOLD and TCP_KEEPALIVE_ABORT_THRESHOLD to the list of accepted socket settings.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 321bb40a2e597e46101949737d0bec0561a877ea
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Oct 7 14:20:15 2010 +1100

    script: improvements to bisect-test.py
    
    - allow control of all the commands (eg. specify configure command)
    
    - do a bisect reset at the end
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Thu Oct  7 04:11:21 UTC 2010 on sn-devel-104

commit bb0017615d44b66828c98a408ca15b50956f3e91
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Oct 7 12:25:42 2010 +1100

    waf: fixed exit status of test suites
    
    use RUN_COMMAND() to handle signal errors and exit status

-----------------------------------------------------------------------

Summary of changes:
 lib/talloc/wscript      |    6 ++++--
 lib/tdb/wscript         |    6 ++++--
 script/bisect-test.py   |   29 +++++++++++++++++------------
 source4/lib/ldb/wscript |    6 ++++--
 4 files changed, 29 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 4f95da7..1670ebe 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -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'''
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 53f81fe..6e00f3c 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -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'''
diff --git a/script/bisect-test.py b/script/bisect-test.py
index e5f91b0..accee7a 100755
--- a/script/bisect-test.py
+++ b/script/bisect-test.py
@@ -10,17 +10,24 @@ from optparse import OptionParser
 
 parser = OptionParser()
 parser.add_option("", "--tests", help="list of tests to run", default='*')
-parser.add_option("", "--quick", help="use make quicktest", default='')
 parser.add_option("", "--good", help="known good revision (default HEAD~100)", default='HEAD~100')
 parser.add_option("", "--bad", help="known bad revision (default HEAD)", default='HEAD')
 parser.add_option("", "--skip-build-errors", help="skip revision where make fails",
                   action='store_true', default=False)
 parser.add_option("", "--autogen", help="run autogen before each build",action="store_true", default=False)
+parser.add_option("", "--autogen-command", help="command to use for autogen (default ./autogen.sh)",
+                  type='str', default="./autogen.sh")
 parser.add_option("", "--configure", help="run configure.developer before each build",
     action="store_true", default=False)
+parser.add_option("", "--configure-command", help="the command for configure (default ./configure.developer)",
+                  type='str', default="./configure.developer")
+parser.add_option("", "--build-command", help="the command to build the tree (default 'make -j')",
+                  type='str', default="make -j")
+parser.add_option("", "--test-command", help="the command to test the tree (default 'make test')",
+                  type='str', default="make test")
 parser.add_option("", "--clean", help="run make clean before each build",
-    action="store_true", default=False)
-parser.add_option("-j", "", help="use make -j N", dest='N', type='int', action="store", default=1)
+                  action="store_true", default=False)
+
 
 (opts, args) = parser.parse_args()
 
@@ -52,20 +59,17 @@ f = tempfile.NamedTemporaryFile(delete=False)
 f.write("set -x\n")
 f.write("cd %s || exit 125\n" % cwd)
 if opts.autogen:
-    f.write("./autogen.sh || exit 125\n")
+    f.write("%s || exit 125\n" % opts.autogen_command)
 if opts.configure:
-    f.write("./configure.developer || exit 125\n")
+    f.write("%s || exit 125\n" % opts.configure_command)
 if opts.clean:
     f.write("make clean || exit 125\n")
 if opts.skip_build_errors:
-    f.write("make -j %u || exit 125\n" % opts.N)
-else:
-    f.write("make -j %u || exit 1\n" % opts.N)
-if opts.quick:
-    target="quicktest"
+    build_err = 125
 else:
-    target="test"
-f.write("make -j %u %s TESTS='%s' FAIL_IMMEDIATELY=1 || exit 1\n" % (opts.N, target, opts.tests))
+    build_err = 1
+f.write("%s || exit %u\n" % (opts.build_command, build_err))
+f.write("%s || exit 1\n" % opts.test_command)
 f.write("exit 0\n")
 f.close()
 
@@ -87,5 +91,6 @@ except Exception, reason:
     print("Failed bisect: %s" % reason)
     cleanup()
 
+run_cmd("git bisect reset", dir=gitroot)
 os.unlink(f.name)
 sys.exit(ret)
diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript
index ddf1283..cf013ce 100644
--- a/source4/lib/ldb/wscript
+++ b/source4/lib/ldb/wscript
@@ -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'''


-- 
Samba Shared Repository


More information about the samba-cvs mailing list