1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

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@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-10-22 10:08:17 +02:00 committed by Michael Adam
parent 3535649976
commit 331f9805ea

View File

@ -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