[PATCH 4/8] selftest: Actually honor --with-selftest-prefix.
Stefan (metze) Metzmacher
metze at samba.org
Fri Oct 24 09:05:49 MDT 2014
Hi Jelmer,
>>
>> + env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX
>> +
This breaks the common usage of the --with-selftest-prefix option
where it's used at configure time.
The attached patch fixes the problem for me again.
metze
-------------- next part --------------
From 4cbd48ad4028c7a7d645df226cc592bc97740d2d Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Wed, 22 Oct 2014 10:08:17 +0200
Subject: [PATCH] selftest: only use Options.options.SELFTEST_PREFIX if it's
not the default
The --with-selftest-prefix option is typically specified as argument
to './configure' ! Overwriting it for 'waf testonly' should only
happen with an explicit 'waf testonly --with-selftest-prefix=/some/path'.
This fixes a regression introduced by
commit edc1cedf932de2bc068da9a5db844ac4c48f4324
(selftest: Actually honor --with-selftest-prefix).
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
selftest/wscript | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/selftest/wscript b/selftest/wscript
index e5df412..3e6dffc 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -8,6 +8,8 @@ from samba_utils import *
from samba_autoconf import *
import types
+DEFAULT_SELFTEST_PREFIX="./st"
+
def set_options(opt):
opt.add_option('--enable-selftest',
@@ -19,8 +21,8 @@ def set_options(opt):
action="store_true", dest='enable_coverage', default=False)
opt.add_option('--with-selftest-prefix',
help=("specify location of selftest directory "
- "(default=./st)"),
- action="store", dest='SELFTEST_PREFIX', default='./st')
+ "(default=%s)" % DEFAULT_SELFTEST_PREFIX),
+ action="store", dest='SELFTEST_PREFIX', default=DEFAULT_SELFTEST_PREFIX)
opt.ADD_COMMAND('test', cmd_test)
opt.ADD_COMMAND('testonly', cmd_testonly)
@@ -94,7 +96,8 @@ def cmd_testonly(opt):
env = LOAD_ENVIRONMENT()
opt.env = env
- env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX
+ if Options.options.SELFTEST_PREFIX != DEFAULT_SELFTEST_PREFIX:
+ env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX
if (not CONFIG_SET(opt, 'NSS_WRAPPER') or
not CONFIG_SET(opt, 'UID_WRAPPER') or
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141024/4d3277bd/attachment.pgp>
More information about the samba-technical
mailing list