talloc: Follow pattern of ldb and tdb to ensure "make test" depends on a build
authorAndrew Bartlett <abartlet@samba.org>
Sun, 5 May 2019 23:09:16 +0000 (11:09 +1200)
committerGary Lockyer <gary@samba.org>
Mon, 6 May 2019 05:46:11 +0000 (05:46 +0000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/talloc/wscript

index e4020692d6071d2e55d920a781ed1a399db16680..eda62d190867ea9791ea1007b7918791ec96f740 100644 (file)
@@ -154,7 +154,7 @@ def build(bld):
                          install=False)
 
 
-def test(ctx):
+def testonly(ctx):
     '''run talloc testsuite'''
     import samba_utils
 
@@ -176,6 +176,12 @@ def test(ctx):
     print("python testsuite returned %d" % pyret)
     sys.exit(ret or magic_ret or pyret)
 
+# WAF doesn't build the unit tests for this, maybe because they don't link with talloc?
+# This forces it
+def test(ctx):
+    Options.commands.append('build')
+    Options.commands.append('testonly')
+
 def dist():
     '''makes a tarball for distribution'''
     samba_dist.dist()