From 3ff3a11c33a8a3d9fbacf76fcf59c8c4d929e4a5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Mar 2010 14:25:50 +1100 Subject: build: use RUN_COMMAND() to wrap os.system() --- source4/selftest/wscript | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source4/selftest/wscript') diff --git a/source4/selftest/wscript b/source4/selftest/wscript index e1a59aceed..4fea799ecf 100644 --- a/source4/selftest/wscript +++ b/source4/selftest/wscript @@ -1,6 +1,7 @@ # selftest main code. import Scripting, os, Options, Utils, Environment, optparse, sys +from samba_utils import RUN_COMMAND def set_options(opt): opt.ADD_COMMAND('test', cmd_test) @@ -70,14 +71,10 @@ def cmd_testonly(opt): if os.path.exists(st_done): os.unlink(st_done) - cmd = '(PYTHON=/usr/bin/python perl -W ../selftest/selftest.pl --prefix=./st --builddir=. --srcdir=. --exclude=./selftest/skip --testlist="./selftest/tests.sh|" ${OPTIONS} --socket-wrapper ${TESTS} && touch st/st_done) | ${FILTER_OPTIONS}' - - # recursively expand variables - while cmd.find('${') != -1: - cmd = Utils.subst_vars(cmd, env) + cmd = '(PYTHON=/usr/bin/python perl -W ../selftest/selftest.pl --prefix=./st --builddir=. --srcdir=. --exclude=./selftest/skip --testlist="./selftest/tests.sh|" ${OPTIONS} --socket-wrapper ${TESTS} && touch st/st_done) | tee st/test.out | ${FILTER_OPTIONS}' print "test: running %s" % cmd - ret = os.system(cmd) + ret = RUN_COMMAND(cmd, env=env) if ret != 0: print("ERROR: test failed with exit code %d" % ret) sys.exit(ret) -- cgit