diff options
author | Andrew Bartlett <abartlet@samba.org> | 2016-02-23 11:04:51 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2016-03-08 01:58:26 +0100 |
commit | cd8d9300213dcdeb5bdfbbb7a71ae4b82e042470 (patch) | |
tree | 1d6ffcf8cf152ddb491f11599018e56d625893ed /lib/talloc | |
parent | 623bf4230c3458a266de7759d0ead07d986d6951 (diff) | |
download | samba-cd8d9300213dcdeb5bdfbbb7a71ae4b82e042470.tar.gz |
talloc: Improve testsuite by avoiding path issues
We now rely on waf to tell us where the helper binary is.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'lib/talloc')
-rwxr-xr-x | lib/talloc/test_magic_differs.sh | 10 | ||||
-rw-r--r-- | lib/talloc/wscript | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/talloc/test_magic_differs.sh b/lib/talloc/test_magic_differs.sh index 0f765f0e032..1b6ba2e4d45 100755 --- a/lib/talloc/test_magic_differs.sh +++ b/lib/talloc/test_magic_differs.sh @@ -4,10 +4,12 @@ echo "test: magic differs" -if [ - "`./talloc_test_magic_differs_helper`" != "`./talloc_test_magic_differs_helper`" -]; then - echo "failure: magic remained the same between executions" +helper=$1 +m1=$($helper) +m2=$($helper) + +if [ $m1 -eq $m2 ]; then + echo "failure: magic remained the same between executions ($m1 vs $m2)" exit 1 fi diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 1616791324d..bcce4c5d9ff 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -158,10 +158,11 @@ def test(ctx): cmd = os.path.join(Utils.g_module.blddir, 'talloc_testsuite') ret = samba_utils.RUN_COMMAND(cmd) print("testsuite returned %d" % ret) + magic_helper_cmd = os.path.join(Utils.g_module.blddir, 'talloc_test_magic_differs_helper') magic_cmd = os.path.join(srcdir, 'lib', 'talloc', 'test_magic_differs.sh') - magic_ret = samba_utils.RUN_COMMAND(magic_cmd) + magic_ret = samba_utils.RUN_COMMAND(magic_cmd + " " + magic_helper_cmd) print("magic differs test returned %d" % magic_ret) pyret = samba_utils.RUN_PYTHON_TESTS(['test_pytalloc.py']) print("python testsuite returned %d" % pyret) |