Anonymous avatar Anonymous committed 4957f31

Add a TestSCons module for common initialization of SCons tests.

Comments (0)

Files changed (49)

 
 Import qw( env test_dir );
 
-$env->Install("#$test_dir", qw(TestCmd.py unittest.py));
+@modules = qw(TestCmd.py TestSCons.py unittest.py);
+
+$env->Install("#$test_dir", @modules);
+"""
+TestSCmd.py:  a testing framework for commands and scripts.
+
+The TestCmd module provides a framework for portable automated testing
+of executable commands and scripts (in any language, not just Python),
+especially commands and scripts that require file system interaction.
+
+In addition to running tests and evaluating conditions, the TestCmd module
+manages and cleans up one or more temporary workspace directories, and
+provides methods for creating files and directories in those workspace
+directories from in-line data, here-documents), allowing tests to be
+completely self-contained.
+
+A TestCmd environment object is created via the usual invocation:
+
+    test = TestCmd()
+
+The TestCmd module provides pass_test(), fail_test(), and no_result()
+unbound methods that report test results for use with the Aegis change
+management system.  These methods terminate the test immediately,
+reporting PASSED, FAILED, or NO RESULT respectively, and exiting with
+status 0 (success), 1 or 2 respectively.  This allows for a distinction
+between an actual failed test and a test that could not be properly
+evaluated because of an external condition (such as a full file system
+or incorrect permissions).
+"""
+
+# Copyright 2001 Steven Knight
+
+__revision__ = "TestSCons.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import os
+import TestCmd
+
+class TestSCons(TestCmd.TestCmd):
+    """Class for testing SCons
+    """
+
+    def __init__(self, **kw):
+	if not kw.has_key('program'):
+	    kw['program'] = 'scons.py'
+	if not kw.has_key('interpreter'):
+	    kw['interpreter'] = 'python'
+	if not kw.has_key('workdir'):
+	    kw['workdir'] = ''
+	apply(TestCmd.TestCmd.__init__, [self], kw)
+	os.chdir(self.workdir)
+
+#    def __del__(self):
+#	self.cleanup()
+#
+#    def __repr__(self):
+#	return "%x" % id(self)
+#
+#    def cleanup(self, condition = None):
+#	"""Removes any temporary working directories for the specified
+#	TestCmd environment.  If the environment variable PRESERVE was
+#	set when the TestCmd environment was created, temporary working
+#	directories are not removed.  If any of the environment variables
+#	PRESERVE_PASS, PRESERVE_FAIL, or PRESERVE_NO_RESULT were set
+#	when the TestCmd environment was created, then temporary working
+#	directories are not removed if the test passed, failed, or had
+#	no result, respectively.  Temporary working directories are also
+#	preserved for conditions specified via the preserve method.
+#
+#	Typically, this method is not called directly, but is used when
+#	the script exits to clean up temporary working directories as
+#	appropriate for the exit status.
+#	"""
+#	if not self._dirlist:
+#	    return
+#	if condition is None:
+#	    condition = self.condition
+#	#print "cleanup(" + condition + "):  ", self._preserve
+#	if self._preserve[condition]:
+#	    return
+#	os.chdir(self._cwd)
+#	self.workdir = None
+#	list = self._dirlist[:]
+#	self._dirlist = []
+#	list.reverse()
+#	for dir in list:
+#	    self.writable(dir, 1)
+#	    shutil.rmtree(dir, ignore_errors = 1)
+#	try:
+#	    global _Cleanup
+#	    _Cleanup.remove(self)
+#	except (AttributeError, ValueError):
+#	    pass
+#
+#    def description_set(self, description):
+#	"""Set the description of the functionality being tested.
+#	"""
+#	self.description = description
+#
+##    def diff(self):
+##	"""Diff two arrays.
+##	"""
+#
+#    def fail_test(self, condition = 1, function = None, skip = 0):
+#	"""Cause the test to fail.
+#	"""
+#	if not condition:
+#	    return
+#	self.condition = 'fail_test'
+#	fail_test(self = self,
+#		  condition = condition,
+#		  function = function,
+#		  skip = skip)
+#
+#    def interpreter_set(self, interpreter):
+#	"""Set the program to be used to interpret the program
+#	under test as a script.
+#	"""
+#	self.interpreter = interpreter
+#
+#    def match(self, lines, matches):
+#	"""Compare actual and expected file contents.
+#	"""
+#	return self.match_func(lines, matches)
+#
+#    def match_exact(self, lines, matches):
+#	"""Compare actual and expected file contents.
+#	"""
+#	return match_exact(lines, matches)
+#
+#    def match_re(self, lines, res):
+#	"""Compare actual and expected file contents.
+#	"""
+#	return match_re(lines, res)
+#
+#    def no_result(self, condition = 1, function = None, skip = 0):
+#	"""Report that the test could not be run.
+#	"""
+#	if not condition:
+#	    return
+#	self.condition = 'no_result'
+#	no_result(self = self,
+#		  condition = condition,
+#		  function = function,
+#		  skip = skip)
+#
+#    def pass_test(self, condition = 1, function = None):
+#	"""Cause the test to pass.
+#	"""
+#	if not condition:
+#	    return
+#	self.condition = 'pass_test'
+#	pass_test(self = self, condition = condition, function = function)
+#
+#    def preserve(self, *conditions):
+#	"""Arrange for the temporary working directories for the
+#	specified TestCmd environment to be preserved for one or more
+#	conditions.  If no conditions are specified, arranges for
+#	the temporary working directories to be preserved for all
+#	conditions.
+#	"""
+#	if conditions is ():
+#	    conditions = ('pass_test', 'fail_test', 'no_result')
+#	for cond in conditions:
+#	    self._preserve[cond] = 1
+#
+#    def program_set(self, program):
+#	"""Set the executable program or script to be tested.
+#	"""
+#	if program and not os.path.isabs(program):
+#	    program = os.path.join(self._cwd, program)
+#	self.program = program
+#
+#    def read(self, file, mode = 'rb'):
+#	"""Reads and returns the contents of the specified file name.
+#	The file name may be a list, in which case the elements are
+#	concatenated with the os.path.join() method.  The file is
+#	assumed to be under the temporary working directory unless it
+#	is an absolute path name.  The I/O mode for the file may
+#	be specified; it must begin with an 'r'.  The default is
+#	'rb' (binary read).
+#	"""
+#	if type(file) is ListType:
+#	    file = apply(os.path.join, tuple(file))
+#	if not os.path.isabs(file):
+#	    file = os.path.join(self.workdir, file)
+#	if mode[0] != 'r':
+#	    raise ValueError, "mode must begin with 'r'"
+#	return open(file, mode).read()
+#
+#    def run(self, program = None,
+#		  interpreter = None,
+#		  arguments = None,
+#		  chdir = None,
+#		  stdin = None):
+#	"""Runs a test of the program or script for the test
+#	environment.  Standard output and error output are saved for
+#	future retrieval via the stdout() and stderr() methods.
+#	"""
+#	if chdir:
+#	    oldcwd = os.getcwd()
+#	    if not os.path.isabs(chdir):
+#		chdir = os.path.join(self.workpath(chdir))
+#	    if self.verbose:
+#		sys.stderr.write("chdir(" + chdir + ")\n")
+#	    os.chdir(chdir)
+#	cmd = None
+#	if program:
+#	    if not os.path.isabs(program):
+#		program = os.path.join(self._cwd, program)
+#	    cmd = program
+#	    if interpreter:
+#		cmd = interpreter + " " + cmd
+#	else:
+#	    cmd = self.program
+#	    if self.interpreter:
+#		cmd =  self.interpreter + " " + cmd
+#	if arguments:
+#	    cmd = cmd + " " + arguments
+#	if self.verbose:
+#	    sys.stderr.write(cmd + "\n")
+#	try:
+#	    p = popen2.Popen3(cmd, 1)
+#	except AttributeError:
+#	    (tochild, fromchild, childerr) = os.popen3(cmd)
+#	    if stdin:
+#		if type(stdin) is ListType:
+#		    for line in stdin:
+#			tochild.write(line)
+#		else:
+#		    tochild.write(stdin)
+#	    tochild.close()
+#	    self._stdout.append(fromchild.read())
+#	    self._stderr.append(childerr.read())
+#	    fromchild.close()
+#	    self._status = childerr.close()
+#	except:
+#	    raise
+#	else:
+#	    if stdin:
+#		if type(stdin) is ListType:
+#		    for line in stdin:
+#			p.tochild.write(line)
+#		else:
+#		    p.tochild.write(stdin)
+#	    p.tochild.close()
+#	    self._stdout.append(p.fromchild.read())
+#	    self._stderr.append(p.childerr.read())
+#	    self.status = p.wait()
+#	if chdir:
+#	    os.chdir(oldcwd)
+#
+#    def stderr(self, run = None):
+#	"""Returns the error output from the specified run number.
+#	If there is no specified run number, then returns the error
+#	output of the last run.  If the run number is less than zero,
+#	then returns the error output from that many runs back from the
+#	current run.
+#	"""
+#	if not run:
+#	    run = len(self._stderr)
+#	elif run < 0:
+#	    run = len(self._stderr) + run
+#	run = run - 1
+#	return self._stderr[run]
+#
+#    def stdout(self, run = None):
+#	"""Returns the standard output from the specified run number.
+#	If there is no specified run number, then returns the standard
+#	output of the last run.  If the run number is less than zero,
+#	then returns the standard output from that many runs back from
+#	the current run.
+#	"""
+#	if not run:
+#	    run = len(self._stdout)
+#	elif run < 0:
+#	    run = len(self._stdout) + run
+#	run = run - 1
+#	return self._stdout[run]
+#
+#    def subdir(self, *subdirs):
+#	"""Create new subdirectories under the temporary working
+#	directory, one for each argument.  An argument may be a list,
+#	in which case the list elements are concatenated using the
+#	os.path.join() method.  Subdirectories multiple levels deep
+#	must be created using a separate argument for each level:
+#
+#		test.subdir('sub', ['sub', 'dir'], ['sub', 'dir', 'ectory'])
+#
+#	Returns the number of subdirectories actually created.
+#	"""
+#	count = 0
+#	for sub in subdirs:
+#	    if sub is None:
+#		continue
+#	    if type(sub) is ListType:
+#		sub = apply(os.path.join, tuple(sub))
+#	    new = os.path.join(self.workdir, sub)
+#	    try:
+#		os.mkdir(new)
+#	    except:
+#		pass
+#	    else:
+#		count = count + 1
+#	return count
+#
+#    def verbose_set(self, verbose):
+#	"""Set the verbose level.
+#	"""
+#	self.verbose = verbose
+#
+#    def workdir_set(self, path):
+#	"""Creates a temporary working directory with the specified
+#	path name.  If the path is a null string (''), a unique
+#	directory name is created.
+#	"""
+#	if (path != None):
+#	    if path == '':
+#		path = tempfile.mktemp()
+#	    if path != None:
+#		os.mkdir(path)
+#	    self._dirlist.append(path)
+#	    global _Cleanup
+#	    try:
+#		_Cleanup.index(self)
+#	    except ValueError:
+#		_Cleanup.append(self)
+#	    # We'd like to set self.workdir like this:
+#	    #	self.workdir = path
+#	    # But symlinks in the path will report things
+#	    # differently from os.getcwd(), so chdir there
+#	    # and back to fetch the canonical path.
+#	    cwd = os.getcwd()
+#	    os.chdir(path)
+#	    self.workdir = os.getcwd()
+#	    os.chdir(cwd)
+#	else:
+#	    self.workdir = None
+#
+#    def workpath(self, *args):
+#	"""Returns the absolute path name to a subdirectory or file
+#	within the current temporary working directory.  Concatenates
+#	the temporary working directory name with the specified
+#	arguments using the os.path.join() method.
+#	"""
+#	return apply(os.path.join, (self.workdir,) + tuple(args))
+#
+#    def writable(self, top, write):
+#	"""Make the specified directory tree writable (write == 1)
+#	or not (write == None).
+#	"""
+#
+#	def _walk_chmod(arg, dirname, names):
+#	    st = os.stat(dirname)
+#	    os.chmod(dirname, arg(st[stat.ST_MODE]))
+#	    for name in names:
+#		n = os.path.join(dirname, name)
+#		st = os.stat(n)
+#		os.chmod(n, arg(st[stat.ST_MODE]))
+#
+#	def _mode_writable(mode):
+#	    return stat.S_IMODE(mode|0200)
+#
+#	def _mode_non_writable(mode):
+#	    return stat.S_IMODE(mode&~0200)
+#
+#	if write:
+#	    f = _mode_writable
+#	else:
+#	    f = _mode_non_writable
+#	os.path.walk(top, _walk_chmod, f)
+#
+#    def write(self, file, content, mode = 'wb'):
+#	"""Writes the specified content text (second argument) to the
+#	specified file name (first argument).  The file name may be
+#	a list, in which case the elements are concatenated with the
+#	os.path.join() method.	The file is created under the temporary
+#	working directory.  Any subdirectories in the path must already
+#	exist.  The I/O mode for the file may be specified; it must
+#	begin with a 'w'.  The default is 'wb' (binary write).
+#	"""
+#	if type(file) is ListType:
+#	    file = apply(os.path.join, tuple(file))
+#	if not os.path.isabs(file):
+#	    file = os.path.join(self.workdir, file)
+#	if mode[0] != 'w':
+#	    raise ValueError, "mode must begin with 'w'"
+#	open(file, mode).write(content)
 #!/usr/bin/env python
 
-__revision__ = "test/SConstruct.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "test/Help.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 wpath = test.workpath()
 
 Help("Help text\ngoes here.\n")
 """)
 
-test.run(chdir = '.', arguments = '-h')
+test.run(arguments = '-h')
 
 test.fail_test(test.stdout() != "Help text\ngoes here.\n\nUse scons -H for help about command-line options.\n")
 test.fail_test(test.stderr() != "")

test/Program-j.py

 
 __revision__ = "test/Program-j.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', """
 env = Environment()
 """)
 
 
-test.run(chdir = '.', arguments = '-j 3 f1 f2 f3 f4')
+test.run(arguments = '-j 3 f1 f2 f3 f4')
 
 test.run(program = test.workpath('f1'))
 test.fail_test(test.stdout() != "f1.c\n")
 
 __revision__ = "test/Program.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', """
 env = Environment()
 }
 """)
 
-test.run(chdir = '.', arguments = 'foo')
+test.run(arguments = 'foo')
 
 test.run(program = test.workpath('foo'))
 

test/SConscript.py

 
 __revision__ = "test/SConscript.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', """
 import os

test/SConstruct.py

 
 __revision__ = "test/SConstruct.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 wpath = test.workpath()
 
 #!/usr/bin/env python
 
-__revision__ = "test/t0003.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "test/errors.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 
-test = TestCmd.TestCmd(program = 'scons.py',
-			workdir = '',
-			interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct1', """
 a ! int(2.0)
 """)
-test.run(chdir = '.', arguments='-f SConstruct1')
+test.run(arguments='-f SConstruct1')
 test.fail_test(test.stderr() != """  File "SConstruct1", line 2
 
     a ! int(2.0)
 test.write('SConstruct2', """
 raise UserError, 'Depends() require both sources and targets.'
 """)
-test.run(chdir = '.', arguments='-f SConstruct2')
+test.run(arguments='-f SConstruct2')
 test.fail_test(test.stderr() != """
 SCons error: Depends() require both sources and targets.
 File "SConstruct2", line 2, in ?
 """)
 
 
-import os
-import string
-sconspath = os.path.join(os.getcwd(), 'scons.py')
-
-# Since we're using regular expression matches below, escape any
-# backslashes that ended up in the path name.  (Hello, Windows!)
-sconspath = string.replace(sconspath, '\\', '\\\\')
-
 test.write('SConstruct3', """
 raise InternalError, 'error inside'
 """)
-test.run(chdir = '.', arguments='-f SConstruct3')
+test.run(arguments='-f SConstruct3')
 expect = r"""Traceback \((most recent call|innermost) last\):
-  File "%s", line \d+, in \?
+  File ".*scons\.py", line \d+, in \?
     main\(\)
-  File "%s", line \d+, in main
+  File ".*scons\.py", line \d+, in main
     exec f in globals\(\)
   File "SConstruct3", line \d+, in \?
     raise InternalError, 'error inside'
 InternalError: error inside
-""" % (sconspath, sconspath)
+"""
 test.fail_test(not test.match_re(test.stderr(), expect))
 
 test.pass_test()
 
 __revision__ = "test/exitfns.py __REVISION__ __DATE__ __DEVELOPER__"
 
-from TestCmd import TestCmd
+import TestSCons
 
-test = TestCmd(program = 'scons.py',
-               workdir = '',
-               interpreter = 'python')
+test = TestSCons.TestSCons()
 
 sconstruct = """
 from scons.exitfuncs import *
 
 test.write('SConstruct', sconstruct)
 
-test.run(chdir = '.', arguments='-f SConstruct')
+test.run(arguments='-f SConstruct')
 
 test.fail_test(test.stdout() != expected_output)
 
 sys.exitfunc = f
 """ + sconstruct)
 
-test.run(chdir = '.', arguments='-f SConstruct')
+test.run(arguments='-f SConstruct')
 
 test.fail_test(test.stdout() != expected_output)
 
 #!/usr/bin/env python
 
-__revision__ = "test/option-n.py __REVISION__ __DATE__ __DEVELOPER__"
+__revision__ = "test/option--.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import os.path
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('build.py', r"""
 import sys
 
 expect = "python build.py -f1.out\npython build.py -f2.out\n"
 
-test.run(chdir = '.', arguments = '-- -f1.out -f2.out')
+test.run(arguments = '-- -f1.out -f2.out')
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")

test/option--C.py

 
 __revision__ = "test/option--C.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 wpath = test.workpath()
 wpath_sub = test.workpath('sub')
 print "sub/dir/SConstruct", os.getcwd()
 """)
 
-test.run(chdir = '.', arguments = '-C sub')
+test.run(arguments = '-C sub')
 
 test.fail_test(test.stdout() != "sub/SConstruct %s\n" % wpath_sub)
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '-C sub -C dir')
+test.run(arguments = '-C sub -C dir')
 
 test.fail_test(test.stdout() != "sub/dir/SConstruct %s\n" % wpath_sub_dir)
 test.fail_test(test.stderr() != "")
 test.fail_test(test.stdout() != "SConstruct %s\n" % wpath)
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--directory=sub/dir')
+test.run(arguments = '--directory=sub/dir')
 
 test.fail_test(test.stdout() != "sub/dir/SConstruct %s\n" % wpath_sub_dir)
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '-C %s -C %s' % (wpath_sub_dir, wpath_sub))
+test.run(arguments = '-C %s -C %s' % (wpath_sub_dir, wpath_sub))
 
 test.fail_test(test.stdout() != "sub/SConstruct %s\n" % wpath_sub)
 test.fail_test(test.stderr() != "")

test/option--H.py

 
 __revision__ = "test/option--H.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-H')
+test.run(arguments = '-H')
 
 test.fail_test(string.find(test.stdout(), '-H, --help-options') == -1)
 

test/option--I.py

 
 __revision__ = "test/option--I.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.subdir('sub1', 'sub2')
 
 print bar.variable
 """)
 
-test.run(chdir = '.', arguments = '-I sub1 -I sub2')
+test.run(arguments = '-I sub1 -I sub2')
 
 test.fail_test(test.stdout() != "sub1/foo\nsub2/bar\n")
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--include-dir=sub2 --include-dir=sub1')
+test.run(arguments = '--include-dir=sub2 --include-dir=sub1')
 
 test.fail_test(test.stdout() != "sub2/foo\nsub2/bar\n")
 test.fail_test(test.stderr() != "")

test/option--R.py

 
 __revision__ = "test/option--R.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-R')
+test.run(arguments = '-R')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -R option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--no-builtin-variables')
+test.run(arguments = '--no-builtin-variables')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --no-builtin-variables option is not yet implemented\n")

test/option--S.py

 
 __revision__ = "test/option--S.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-S')
+test.run(arguments = '-S')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring -S option\n")
 
-test.run(chdir = '.', arguments = '--no-keep-going')
+test.run(arguments = '--no-keep-going')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring --no-keep-going option\n")
 
-test.run(chdir = '.', arguments = '--stop')
+test.run(arguments = '--stop')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring --stop option\n")

test/option--W.py

 
 __revision__ = "test/option--W.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-W foo')
+test.run(arguments = '-W foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -W option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--what-if=foo')
+test.run(arguments = '--what-if=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --what-if option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--new-file=foo')
+test.run(arguments = '--new-file=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --new-file option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--assume-new=foo')
+test.run(arguments = '--assume-new=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --assume-new option is not yet implemented\n")

test/option--Y.py

 
 __revision__ = "test/option--Y.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-Y foo')
+test.run(arguments = '-Y foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -Y option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--repository=foo')
+test.run(arguments = '--repository=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --repository option is not yet implemented\n")

test/option--cd.py

 
 __revision__ = "test/option--cd.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--cache-disable')
+test.run(arguments = '--cache-disable')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --cache-disable option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--no-cache')
+test.run(arguments = '--no-cache')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --no-cache option is not yet implemented\n")

test/option--cf.py

 
 __revision__ = "test/option--cf.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--cache-force')
+test.run(arguments = '--cache-force')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --cache-force option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--cache-populate')
+test.run(arguments = '--cache-populate')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --cache-populate option is not yet implemented\n")

test/option--cs.py

 
 __revision__ = "test/option--cs.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--cache-show')
+test.run(arguments = '--cache-show')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --cache-show option is not yet implemented\n")

test/option--la.py

 
 __revision__ = "test/option--la.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--list-actions')
+test.run(arguments = '--list-actions')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --list-actions option is not yet implemented\n")

test/option--ld.py

 
 __revision__ = "test/option--ld.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--list-derived')
+test.run(arguments = '--list-derived')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --list-derived option is not yet implemented\n")

test/option--lw.py

 
 __revision__ = "test/option--lw.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--list-where')
+test.run(arguments = '--list-where')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --list-where option is not yet implemented\n")

test/option--npd.py

 
 __revision__ = "test/option--npd.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--no-print-directory')
+test.run(arguments = '--no-print-directory')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --no-print-directory option is not yet implemented\n")

test/option--override.py

 
 __revision__ = "test/option--override.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--override=foo')
+test.run(arguments = '--override=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --override option is not yet implemented\n")

test/option--random.py

 
 __revision__ = "test/option--random.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--random')
+test.run(arguments = '--random')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --random option is not yet implemented\n")

test/option--wf.py

 
 __revision__ = "test/option--wf.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--write-filenames=FILE')
+test.run(arguments = '--write-filenames=FILE')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --write-filenames option is not yet implemented\n")

test/option--wuv.py

 
 __revision__ = "test/option--wuv.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '--warn-undefined-variables')
+test.run(arguments = '--warn-undefined-variables')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --warn-undefined-variables option is not yet implemented\n")
 
 __revision__ = "test/option-b.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-b')
+test.run(arguments = '-b')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring -b option\n")
 
 __revision__ = "test/option-c.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-c')
+test.run(arguments = '-c')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -c option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--clean')
+test.run(arguments = '--clean')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --clean option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--remove')
+test.run(arguments = '--remove')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --remove option is not yet implemented\n")
 
 __revision__ = "test/option-d.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-d')
+test.run(arguments = '-d')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -d option is not yet implemented\n")
 
 __revision__ = "test/option-e.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-e')
+test.run(arguments = '-e')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -e option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--environment-overrides')
+test.run(arguments = '--environment-overrides')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --environment-overrides option is not yet implemented\n")
 
 __revision__ = "test/option-f.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import os.path
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.subdir('subdir')
 
 
 wpath = test.workpath()
 
-test.run(chdir = '.', arguments = '-f SConscript')
+test.run(arguments = '-f SConscript')
 test.fail_test(test.stdout() != ("SConscript %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '-f ' + subdir_BuildThis)
+test.run(arguments = '-f ' + subdir_BuildThis)
 test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--file=SConscript')
+test.run(arguments = '--file=SConscript')
 test.fail_test(test.stdout() != ("SConscript %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--file=' + subdir_BuildThis)
+test.run(arguments = '--file=' + subdir_BuildThis)
 test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--makefile=SConscript')
+test.run(arguments = '--makefile=SConscript')
 test.fail_test(test.stdout() != ("SConscript %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--makefile=' + subdir_BuildThis)
+test.run(arguments = '--makefile=' + subdir_BuildThis)
 test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--sconstruct=SConscript')
+test.run(arguments = '--sconstruct=SConscript')
 test.fail_test(test.stdout() != ("SConscript %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--sconstruct=' + subdir_BuildThis)
+test.run(arguments = '--sconstruct=' + subdir_BuildThis)
 test.fail_test(test.stdout() != ("subdir/BuildThis %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '-f -', stdin = """
+test.run(arguments = '-f -', stdin = """
 import os
 print "STDIN " + os.getcwd()
 """)
 test.fail_test(test.stdout() != ("STDIN %s\n" % wpath))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '-f no_such_file')
+test.run(arguments = '-f no_such_file')
 test.fail_test(test.stdout() != "")
 test.fail_test(test.stderr() != "Ignoring missing script 'no_such_file'\n")
 
 
 __revision__ = "test/option-h.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
-test.run(chdir = '.', arguments = '-h')
+test.run(arguments = '-h')
 
 test.fail_test(string.find(test.stdout(), '-h, --help') == -1)
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-h')
+test.run(arguments = '-h')
 
 test.fail_test(string.find(test.stdout(), '-h, --help') == -1)
 
 
 __revision__ = "test/option-i.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-i')
+test.run(arguments = '-i')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -i option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--ignore-errors')
+test.run(arguments = '--ignore-errors')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --ignore-errors option is not yet implemented\n")
 
 __revision__ = "test/option-j.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
     sys.exit()
 
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('build.py', r"""
 import time
     test.write('f1.in', 'f1.in')
     test.write('f2.in', 'f2.in')
 
-    test.run(chdir = '.', arguments = args)
+    test.run(arguments = args)
 
     str = test.read("f1")
     start1,finish1 = map(float, string.split(str, "\n"))
 
 __revision__ = "test/option-k.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-k')
+test.run(arguments = '-k')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -k option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--keep-going')
+test.run(arguments = '--keep-going')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --keep-going option is not yet implemented\n")
 
 __revision__ = "test/option-l.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-l 1')
+test.run(arguments = '-l 1')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -l option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--load-average=1')
+test.run(arguments = '--load-average=1')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --load-average option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--max-load=1')
+test.run(arguments = '--max-load=1')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --max-load option is not yet implemented\n")
 
 __revision__ = "test/option-m.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-m')
+test.run(arguments = '-m')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring -m option\n")
 
 __revision__ = "test/option-n.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import os.path
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('build.py', r"""
 import sys
 args = 'f1.out f2.out'
 expect = "python build.py f1.out\npython build.py f2.out\n"
 
-test.run(chdir = '.', arguments = args)
+test.run(arguments = args)
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")
 os.unlink(test.workpath('f1.out'))
 os.unlink(test.workpath('f2.out'))
 
-test.run(chdir = '.', arguments = '-n ' + args)
+test.run(arguments = '-n ' + args)
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")
 test.fail_test(os.path.exists(test.workpath('f1.out')))
 test.fail_test(os.path.exists(test.workpath('f2.out')))
 
-test.run(chdir = '.', arguments = '--no-exec ' + args)
+test.run(arguments = '--no-exec ' + args)
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")
 test.fail_test(os.path.exists(test.workpath('f1.out')))
 test.fail_test(os.path.exists(test.workpath('f2.out')))
 
-test.run(chdir = '.', arguments = '--just-print ' + args)
+test.run(arguments = '--just-print ' + args)
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")
 test.fail_test(os.path.exists(test.workpath('f1.out')))
 test.fail_test(os.path.exists(test.workpath('f2.out')))
 
-test.run(chdir = '.', arguments = '--dry-run ' + args)
+test.run(arguments = '--dry-run ' + args)
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")
 test.fail_test(os.path.exists(test.workpath('f1.out')))
 test.fail_test(os.path.exists(test.workpath('f2.out')))
 
-test.run(chdir = '.', arguments = '--recon ' + args)
+test.run(arguments = '--recon ' + args)
 
 test.fail_test(test.stdout() != expect)
 test.fail_test(test.stderr() != "")
 
 __revision__ = "test/option-o.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-o foo')
+test.run(arguments = '-o foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -o option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--old-file=foo')
+test.run(arguments = '--old-file=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --old-file option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--assume-old=foo')
+test.run(arguments = '--assume-old=foo')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --assume-old option is not yet implemented\n")
 
 __revision__ = "test/option-p.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-p')
+test.run(arguments = '-p')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -p option is not yet implemented\n")
 
 __revision__ = "test/option-q.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-q')
+test.run(arguments = '-q')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -q option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--question')
+test.run(arguments = '--question')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --question option is not yet implemented\n")
 
 __revision__ = "test/option-r.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-r')
+test.run(arguments = '-r')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -r option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--no-builtin-rules')
+test.run(arguments = '--no-builtin-rules')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --no-builtin-rules option is not yet implemented\n")
 
 __revision__ = "test/option-s.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import os.path
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('build.py', r"""
 import sys
 env.MyBuild(target = 'f2.out', source = 'f2.in')
 """)
 
-test.run(chdir = '.', arguments = '-s f1.out f2.out')
+test.run(arguments = '-s f1.out f2.out')
 
 test.fail_test(test.stdout() != "")
 test.fail_test(test.stderr() != "")
 os.unlink(test.workpath('f1.out'))
 os.unlink(test.workpath('f2.out'))
 
-test.run(chdir = '.', arguments = '--silent f1.out f2.out')
+test.run(arguments = '--silent f1.out f2.out')
 
 test.fail_test(test.stdout() != "")
 test.fail_test(test.stderr() != "")
 os.unlink(test.workpath('f1.out'))
 os.unlink(test.workpath('f2.out'))
 
-test.run(chdir = '.', arguments = '--quiet f1.out f2.out')
+test.run(arguments = '--quiet f1.out f2.out')
 
 test.fail_test(test.stdout() != "")
 test.fail_test(test.stderr() != "")
 
 __revision__ = "test/option-t.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-t')
+test.run(arguments = '-t')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring -t option\n")
 
-test.run(chdir = '.', arguments = '--touch')
+test.run(arguments = '--touch')
 
 test.fail_test(test.stderr() !=
 		"Warning:  ignoring --touch option\n")
 
 __revision__ = "test/option-u.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-u')
+test.run(arguments = '-u')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -u option is not yet implemented\n")
 
 __revision__ = "test/option-v.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-v')
+test.run(arguments = '-v')
 
 expect = r"""SCons version \S+, by Steven Knight et al.
 Copyright 2001 Steven Knight
 test.fail_test(not test.match_re(test.stdout(), expect))
 test.fail_test(test.stderr() != "")
 
-test.run(chdir = '.', arguments = '--version')
+test.run(arguments = '--version')
 
 test.fail_test(not test.match_re(test.stdout(), expect))
 test.fail_test(test.stderr() != "")
 
 __revision__ = "test/option-w.py __REVISION__ __DATE__ __DEVELOPER__"
 
-import TestCmd
+import TestSCons
 import string
 import sys
 
-test = TestCmd.TestCmd(program = 'scons.py',
-                       workdir = '',
-                       interpreter = 'python')
+test = TestSCons.TestSCons()
 
 test.write('SConstruct', "")
 
-test.run(chdir = '.', arguments = '-w')
+test.run(arguments = '-w')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the -w option is not yet implemented\n")
 
-test.run(chdir = '.', arguments = '--print-directory')
+test.run(arguments = '--print-directory')
 
 test.fail_test(test.stderr() !=
 		"Warning:  the --print-directory option is not yet implemented\n")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.