From 311058e447522c96a320b81bc8beaca41112c006 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Wed, 18 Jun 2003 18:35:59 +0000 Subject: Change the double quotes around an up-to-date target to be like Make. --- etc/TestSCons.py | 2 +- runtest.py | 17 +++++++++++------ src/CHANGES.txt | 3 +++ src/engine/SCons/Script/__init__.py | 2 +- test/BuildDir.py | 8 ++++---- test/Configure.py | 4 ++-- test/FindFile.py | 2 +- test/ParseConfig.py | 2 +- test/Platform.py | 2 +- test/Repository/option-n.py | 2 +- test/SConscript.py | 2 +- test/SConstruct.py | 6 +++--- test/Scanner.py | 5 ++--- test/SetBuildSignatureType.py | 4 ++-- test/SetContentSignatureType.py | 27 +++++++++++++-------------- test/SourceSignatures.py | 23 ++++++++--------------- test/Split.py | 2 +- test/TargetSignatures.py | 5 ++--- test/WhereIs.py | 4 ++-- test/chained-build.py | 12 ++++-------- test/errors.py | 2 +- test/exitfns.py | 2 +- test/option--C.py | 10 +++++----- test/option--I.py | 4 ++-- test/option--debug.py | 2 +- test/option--max-drift.py | 16 ++++------------ test/option-f.py | 20 ++++++++++---------- test/option-n.py | 2 +- test/timestamp-fallback.py | 8 ++++---- test/up-to-date.py | 5 +++-- 30 files changed, 96 insertions(+), 109 deletions(-) diff --git a/etc/TestSCons.py b/etc/TestSCons.py index f23c5da..786b394 100644 --- a/etc/TestSCons.py +++ b/etc/TestSCons.py @@ -258,7 +258,7 @@ class TestSCons(TestCmd.TestCmd): def up_to_date(self, options = None, arguments = None, **kw): s = "" for arg in string.split(arguments): - s = s + 'scons: "%s" is up to date.\n' % arg + s = s + "scons: `%s' is up to date.\n" % arg if options: arguments = options + " " + arguments kw['arguments'] = arguments diff --git a/runtest.py b/runtest.py index 049643a..aa8db9d 100644 --- a/runtest.py +++ b/runtest.py @@ -157,8 +157,11 @@ def whereis(file): aegis = whereis('aegis') -spe = None +sp = [] +spe = [] if aegis: + sp = os.popen("aesub '$sp' 2>/dev/null", "r").read()[:-1] + sp = string.split(sp, os.pathsep) spe = os.popen("aesub '$spe' 2>/dev/null", "r").read()[:-1] spe = string.split(spe, os.pathsep) @@ -315,11 +318,13 @@ os.environ['SCONS_CWD'] = cwd os.environ['SCONS_VERSION'] = version old_pythonpath = os.environ.get('PYTHONPATH') -os.environ['PYTHONPATH'] = pythonpath_dir + \ - os.pathsep + \ - os.path.join(cwd, 'build', 'etc') + \ - os.pathsep + \ - os.path.join(cwd, 'etc') + +pythonpaths = [ pythonpath_dir ] +for p in sp: + pythonpaths.append(os.path.join(p, 'build', 'etc')) + pythonpaths.append(os.path.join(p, 'etc')) +os.environ['PYTHONPATH'] = string.join(pythonpaths, os.pathsep) + if old_pythonpath: os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + \ os.pathsep + \ diff --git a/src/CHANGES.txt b/src/CHANGES.txt index c37f3ab..aadcc93 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -57,6 +57,9 @@ RELEASE 0.15 - XXX - Make the Script.Options() subclass match the underlying base class implementation. + - When reporting a target is up to date, quote the target like make + (backquote-quote) instead of with double quotes. + From Steve Leblanc: - Don't update the .sconsign files when run with -n. diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 139d296..9ae5229 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -80,7 +80,7 @@ class BuildTask(SCons.Taskmaster.Task): target = self.targets[0] if target.get_state() == SCons.Node.up_to_date: if self.top and target.has_builder(): - display('scons: "%s" is up to date.' % str(target)) + display("scons: `%s' is up to date." % str(target)) elif target.has_builder() and not hasattr(target.builder, 'status'): if print_time: start_time = time.time() diff --git a/test/BuildDir.py b/test/BuildDir.py index f38505e..63ecf6e 100644 --- a/test/BuildDir.py +++ b/test/BuildDir.py @@ -239,8 +239,8 @@ if f77: test.run(program = bar52, stdout = " b2.for\n") test.run(chdir='work1', arguments='. ../build', stdout=test.wrap_stdout("""\ -scons: "." is up to date. -scons: "%s" is up to date. +scons: `.' is up to date. +scons: `%s' is up to date. """ % test.workpath('build'))) import os @@ -298,7 +298,7 @@ test.run(program = test.workpath('build', 'var5', 'foo4' + _exe), stdout = "f4.c 2\n") test.run(chdir='work1', arguments='../build/var5', stdout=test.wrap_stdout("""\ -scons: "%s" is up to date. +scons: `%s' is up to date. """ % test.workpath('build', 'var5'))) # @@ -358,7 +358,7 @@ test.write( ['work3', 'existing.h'], """\ """) test.run(chdir='work3', - stdout=test.wrap_stdout('scons: "." is up to date.\n'), + stdout=test.wrap_stdout("scons: `.' is up to date.\n"), stderr="""\ existing.h:/* a header file */ non_existing.h: diff --git a/test/Configure.py b/test/Configure.py index eeb040d..78558fc 100644 --- a/test/Configure.py +++ b/test/Configure.py @@ -91,7 +91,7 @@ if not (r1 and r2 and r3 and r4 and r5 and r6): Exit(1) """ % (lib,lib)) - required_stdout = test.wrap_stdout(build_str='scons: "." is up to date.\n', + required_stdout = test.wrap_stdout(build_str="scons: `.' is up to date.\n", read_str= """Checking for main(); in library %s (header math.h) ... ok Checking for main(); in library None (header math.h) ... ok @@ -125,7 +125,7 @@ if not (not r1 and not r2): Exit(1) """) - required_stdout = test.wrap_stdout(build_str='scons: "." is up to date.\n', + required_stdout = test.wrap_stdout(build_str="scons: `.' is up to date.\n", read_str= """Checking for C header no_std_c_header.h ... failed Checking for main in library no_c_library_SAFFDG ... failed diff --git a/test/FindFile.py b/test/FindFile.py index 1c1a4fe..9c837b5 100644 --- a/test/FindFile.py +++ b/test/FindFile.py @@ -56,7 +56,7 @@ test 2 test 4 -""", build_str = 'scons: "." is up to date.\n') +""", build_str = "scons: `.' is up to date.\n") test.run(arguments = ".", stdout = expect) diff --git a/test/ParseConfig.py b/test/ParseConfig.py index b045baa..da9bad1 100644 --- a/test/ParseConfig.py +++ b/test/ParseConfig.py @@ -64,7 +64,7 @@ good_stdout = test.wrap_stdout(read_str = """\ ['xxx'] ['-X'] ['abc'] -""", build_str = 'scons: "." is up to date.\n') +""", build_str = "scons: `.' is up to date.\n") test.run(arguments = ".", stdout = good_stdout) diff --git a/test/Platform.py b/test/Platform.py index b89ed2f..94961fb 100644 --- a/test/Platform.py +++ b/test/Platform.py @@ -62,7 +62,7 @@ expect = test.wrap_stdout(read_str = """'.exe' '.lib' '.a' '.lib' -""", build_str = 'scons: "." is up to date.\n') +""", build_str = "scons: `.' is up to date.\n") test.run(arguments = ".", stdout = expect) diff --git a/test/Repository/option-n.py b/test/Repository/option-n.py index b55a1da..10016a0 100644 --- a/test/Repository/option-n.py +++ b/test/Repository/option-n.py @@ -73,7 +73,7 @@ test.writable('repository', 0) # expect = test.wrap_stdout("""\ Local copy of aaa.out from %s -scons: "aaa.out" is up to date. +scons: `aaa.out' is up to date. """ % repository_aaa_out) test.run(chdir = 'work', diff --git a/test/SConscript.py b/test/SConscript.py index 34aaa05..810017d 100644 --- a/test/SConscript.py +++ b/test/SConscript.py @@ -210,7 +210,7 @@ wpath = test.workpath() test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'SConstruct %s\nSConscript %s\n' % (wpath, wpath), - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) # Test exporting all global variables as a list of keys: test.write("SConstruct", """ diff --git a/test/SConstruct.py b/test/SConstruct.py index 091984d..cd201d2 100644 --- a/test/SConstruct.py +++ b/test/SConstruct.py @@ -48,7 +48,7 @@ print "sconstruct", os.getcwd() test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'sconstruct %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.write('Sconstruct', """ @@ -58,7 +58,7 @@ print "Sconstruct", os.getcwd() test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'Sconstruct %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.write('SConstruct', """ import os @@ -67,6 +67,6 @@ print "SConstruct", os.getcwd() test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'SConstruct %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/Scanner.py b/test/Scanner.py index 6016795..42ef18d 100644 --- a/test/Scanner.py +++ b/test/Scanner.py @@ -50,7 +50,7 @@ sys.exit(0) """) # Execute a subsidiary SConscript just to make sure we can -# get at the SCanners keyword from there. +# get at the Scanner keyword from there. test.write('SConstruct', """ SConscript('SConscript') @@ -132,7 +132,6 @@ test.fail_test(test.read('foo') != "foo.k 1 line 1\nxxx 2\nyyy 2\nfoo.k 1 line 4 test.fail_test(test.read('bar') != "yyy 2\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 2\n") -test.run(arguments = 'foo', - stdout=test.wrap_stdout('scons: "foo" is up to date.\n')) +test.up_to_date(arguments = 'foo') test.pass_test() diff --git a/test/SetBuildSignatureType.py b/test/SetBuildSignatureType.py index 0d625a8..54f967f 100644 --- a/test/SetBuildSignatureType.py +++ b/test/SetBuildSignatureType.py @@ -63,7 +63,7 @@ copy1("foo.out.out", "foo.out") stderr=warning%16) test.run(arguments='foo.out.out', - stdout=test.wrap_stdout('scons: "foo.out.out" is up to date.\n'), + stdout=test.wrap_stdout("scons: `foo.out.out' is up to date.\n"), stderr=warning%16) test.write('SConstruct', """ @@ -88,7 +88,7 @@ SetBuildSignatureType('content') test.run(arguments='foo.out.out', stdout=test.wrap_stdout("""\ copy2("foo.out", "foo.in") -scons: "foo.out.out" is up to date. +scons: `foo.out.out' is up to date. """), stderr=warning%17) diff --git a/test/SetContentSignatureType.py b/test/SetContentSignatureType.py index 7f161fe..586d55b 100644 --- a/test/SetContentSignatureType.py +++ b/test/SetContentSignatureType.py @@ -62,9 +62,9 @@ test.run(arguments = 'f1.out f3.out', test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. +scons: `f1.out' is up to date. build("f2.out", "f2.in") -scons: "f3.out" is up to date. +scons: `f3.out' is up to date. build("f4.out", "f4.in") """), stderr = warning%11) @@ -79,9 +79,9 @@ os.utime(test.workpath('f3.in'), test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ build("f1.out", "f1.in") -scons: "f2.out" is up to date. +scons: `f2.out' is up to date. build("f3.out", "f3.in") -scons: "f4.out" is up to date. +scons: `f4.out' is up to date. """), stderr = warning%11) @@ -108,9 +108,9 @@ test.run(arguments = 'f1.out f3.out', test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. +scons: `f1.out' is up to date. build("f2.out", "f2.in") -scons: "f3.out" is up to date. +scons: `f3.out' is up to date. build("f4.out", "f4.in") """), stderr = warning%11) @@ -123,7 +123,12 @@ os.utime(test.workpath('f3.in'), os.path.getmtime(test.workpath('f3.in'))+10)) test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = test.wrap_stdout('scons: "f1.out" is up to date.\nscons: "f2.out" is up to date.\nscons: "f3.out" is up to date.\nscons: "f4.out" is up to date.\n'), + stdout = test.wrap_stdout("""\ +scons: `f1.out' is up to date. +scons: `f2.out' is up to date. +scons: `f3.out' is up to date. +scons: `f4.out' is up to date. +"""), stderr = warning%11) test.write('SConstruct', """ @@ -137,13 +142,7 @@ env.B(target = 'f3.out', source = 'f3.in') env.B(target = 'f4.out', source = 'f4.in') """) -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. -scons: "f2.out" is up to date. -scons: "f3.out" is up to date. -scons: "f4.out" is up to date. -""")) +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out') test.pass_test() diff --git a/test/SourceSignatures.py b/test/SourceSignatures.py index 979003a..26a389e 100644 --- a/test/SourceSignatures.py +++ b/test/SourceSignatures.py @@ -54,9 +54,9 @@ test.run(arguments = 'f1.out f3.out') test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. +scons: `f1.out' is up to date. build("f2.out", "f2.in") -scons: "f3.out" is up to date. +scons: `f3.out' is up to date. build("f4.out", "f4.in") """)) @@ -70,9 +70,9 @@ os.utime(test.workpath('f3.in'), test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ build("f1.out", "f1.in") -scons: "f2.out" is up to date. +scons: `f2.out' is up to date. build("f3.out", "f3.in") -scons: "f4.out" is up to date. +scons: `f4.out' is up to date. """)) test.write('SConstruct', """ @@ -97,9 +97,9 @@ test.run(arguments = 'f1.out f3.out') test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. +scons: `f1.out' is up to date. build("f2.out", "f2.in") -scons: "f3.out" is up to date. +scons: `f3.out' is up to date. build("f4.out", "f4.in") """)) @@ -110,8 +110,7 @@ os.utime(test.workpath('f3.in'), (os.path.getatime(test.workpath('f3.in')), os.path.getmtime(test.workpath('f3.in'))+10)) -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = test.wrap_stdout('scons: "f1.out" is up to date.\nscons: "f2.out" is up to date.\nscons: "f3.out" is up to date.\nscons: "f4.out" is up to date.\n')) +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out') test.write('SConstruct', """ def build(env, target, source): @@ -124,13 +123,7 @@ env.B(target = 'f3.out', source = 'f3.in') env.B(target = 'f4.out', source = 'f4.in') """) -test.run(arguments = 'f1.out f2.out f3.out f4.out', - stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. -scons: "f2.out" is up to date. -scons: "f3.out" is up to date. -scons: "f4.out" is up to date. -""")) +test.up_to_date(arguments = 'f1.out f2.out f3.out f4.out') test.pass_test() diff --git a/test/Split.py b/test/Split.py index 5b698bc..46a19e5 100644 --- a/test/Split.py +++ b/test/Split.py @@ -51,6 +51,6 @@ expect = """['aaa'] test.run(arguments = ".", stdout = test.wrap_stdout(read_str = expect, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/TargetSignatures.py b/test/TargetSignatures.py index 036427e..3c7ed0f 100644 --- a/test/TargetSignatures.py +++ b/test/TargetSignatures.py @@ -54,8 +54,7 @@ copy2("foo.out", "foo.in") copy1("foo.out.out", "foo.out") """)) -test.run(arguments='foo.out.out', - stdout=test.wrap_stdout('scons: "foo.out.out" is up to date.\n')) +test.up_to_date(arguments='foo.out.out') test.write('SConstruct', """ env = Environment() @@ -79,7 +78,7 @@ TargetSignatures('content') test.run(arguments='foo.out.out', stdout=test.wrap_stdout("""\ copy2("foo.out", "foo.in") -scons: "foo.out.out" is up to date. +scons: `foo.out.out' is up to date. """)) test.write('SConstruct', """ diff --git a/test/WhereIs.py b/test/WhereIs.py index 07d3b08..9da3739 100644 --- a/test/WhereIs.py +++ b/test/WhereIs.py @@ -107,7 +107,7 @@ expect = [ test.workpath(sub3_xxx_exe), test.run(arguments = ".", stdout = test.wrap_stdout(read_str = string.join(expect, "\n") + "\n", - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) os.environ['PATH'] = string.join(pathdirs_1243, os.pathsep) @@ -125,6 +125,6 @@ expect = [ test.workpath(sub4_xxx_exe), test.run(arguments = ".", stdout = test.wrap_stdout(read_str = string.join(expect, "\n") + "\n", - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/chained-build.py b/test/chained-build.py index a2443c8..e4463e5 100644 --- a/test/chained-build.py +++ b/test/chained-build.py @@ -51,10 +51,8 @@ test.run(arguments="--max-drift=0 -f SConstruct1 foo.mid", test.run(arguments="--max-drift=0 -f SConstruct2 foo.out", stdout = test.wrap_stdout('build("foo.out", "foo.mid")\n')) -test.run(arguments="--max-drift=0 -f SConstruct1 foo.mid", - stdout = test.wrap_stdout('scons: "foo.mid" is up to date.\n')) -test.run(arguments="--max-drift=0 -f SConstruct2 foo.out", - stdout = test.wrap_stdout('scons: "foo.out" is up to date.\n')) +test.up_to_date(options="--max-drift=0 -f SConstruct1", arguments="foo.mid") +test.up_to_date(options="--max-drift=0 -f SConstruct2", arguments="foo.out") test.write('foo.in', "foo.in 2") @@ -63,9 +61,7 @@ test.run(arguments="--max-drift=0 -f SConstruct1 foo.mid", test.run(arguments="--max-drift=0 -f SConstruct2 foo.out", stdout = test.wrap_stdout('build("foo.out", "foo.mid")\n')) -test.run(arguments="--max-drift=0 -f SConstruct1 foo.mid", - stdout = test.wrap_stdout('scons: "foo.mid" is up to date.\n')) -test.run(arguments="--max-drift=0 -f SConstruct2 foo.out", - stdout = test.wrap_stdout('scons: "foo.out" is up to date.\n')) +test.up_to_date(options="--max-drift=0 -f SConstruct1", arguments="foo.mid") +test.up_to_date(options="--max-drift=0 -f SConstruct2", arguments="foo.out") test.pass_test() diff --git a/test/errors.py b/test/errors.py index 72e34d3..46a80ed 100644 --- a/test/errors.py +++ b/test/errors.py @@ -66,7 +66,7 @@ Traceback \((most recent call|innermost) last\): test.run(arguments='foo.out exit.out', stderr=stderr, status=2) test.run(arguments='foo.out exit.out', stderr=stderr, status=2) -assert string.find(test.stdout(), 'scons: "foo.out" is up to date.') != -1, test.stdout() +assert string.find(test.stdout(), "scons: `foo.out' is up to date.") != -1, test.stdout() diff --git a/test/exitfns.py b/test/exitfns.py index a0ac6e2..742ac9f 100644 --- a/test/exitfns.py +++ b/test/exitfns.py @@ -46,7 +46,7 @@ register(x3, "no kwd args") """ -expected_output = test.wrap_stdout('scons: "." is up to date.\n') + \ +expected_output = test.wrap_stdout("scons: `.' is up to date.\n") + \ """running x3('no kwd args', kwd=None) running x3(5, kwd='bar') running x2(12) diff --git a/test/option--C.py b/test/option--C.py index 8c9a07b..c889602 100644 --- a/test/option--C.py +++ b/test/option--C.py @@ -67,23 +67,23 @@ print GetBuildPath('..') test.run(arguments = '-C sub .', stdout = test.wrap_stdout(read_str = '%s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-C sub -C dir .', stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = ".", stdout = test.wrap_stdout(read_str = 'SConstruct %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--directory=sub/dir .', stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-C %s -C %s .' % (wpath_sub_dir, wpath_sub), stdout = test.wrap_stdout(read_str = '%s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/option--I.py b/test/option--I.py index b0e9254..05da4c0 100644 --- a/test/option--I.py +++ b/test/option--I.py @@ -53,11 +53,11 @@ print bar.variable test.run(arguments = '-I sub1 -I sub2 .', stdout = test.wrap_stdout(read_str = 'sub1/foo\nsub2/bar\n', - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--include-dir=sub2 --include-dir=sub1 .', stdout = test.wrap_stdout(read_str = 'sub2/foo\nsub2/bar\n', - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.pass_test() diff --git a/test/option--debug.py b/test/option--debug.py index 4894983..0583912 100644 --- a/test/option--debug.py +++ b/test/option--debug.py @@ -107,7 +107,7 @@ test.fail_test(string.find(test.stdout(), tree) == -1) test.run(arguments = "--debug=includes .") test.run(arguments = "--debug=includes foo.c") -tree = """scons: \".\" is up to date. +tree = """scons: `.' is up to date. +-. +-SConstruct diff --git a/test/option--max-drift.py b/test/option--max-drift.py index 3b90b68..255b3b1 100644 --- a/test/option--max-drift.py +++ b/test/option--max-drift.py @@ -60,32 +60,24 @@ test.run(arguments = 'f1.out') test.run(arguments = 'f1.out f2.out', stdout = test.wrap_stdout( -"""scons: "f1.out" is up to date. +"""scons: `f1.out' is up to date. %s build.py f2.out f2.in """ % python)) atime = os.path.getatime(test.workpath('f1.in')) mtime = os.path.getmtime(test.workpath('f1.in')) -test.run(arguments = '--max-drift=0 f1.out f2.out', - stdout = test.wrap_stdout( -"""scons: "f1.out" is up to date. -scons: "f2.out" is up to date. -""")) +test.up_to_date(options='--max-drift=0', arguments='f1.out f2.out') test.write('f1.in', "f1.in delta\n") os.utime(test.workpath('f1.in'), (atime,mtime)) -test.run(arguments = '--max-drift=0 f1.out f2.out', - stdout = test.wrap_stdout( -"""scons: "f1.out" is up to date. -scons: "f2.out" is up to date. -""")) +test.up_to_date(options='--max-drift=0', arguments='f1.out f2.out') test.run(arguments = '--max-drift=-1 f1.out f2.out', stdout = test.wrap_stdout( """%s build.py f1.out f1.in -scons: "f2.out" is up to date. +scons: `f2.out' is up to date. """ % python)) # Test that Set/GetOption('max_drift') works: diff --git a/test/option-f.py b/test/option-f.py index ee1c18c..2001a06 100644 --- a/test/option-f.py +++ b/test/option-f.py @@ -47,45 +47,45 @@ wpath = test.workpath() test.run(arguments = '-f SConscript .', stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-f %s .' % subdir_BuildThis, stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--file=SConscript .', stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--file=%s .' % subdir_BuildThis, stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--makefile=SConscript .', stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--makefile=%s .' % subdir_BuildThis, stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--sconstruct=SConscript .', stdout = test.wrap_stdout(read_str = 'SConscript %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '--sconstruct=%s .' % subdir_BuildThis, stdout = test.wrap_stdout(read_str = 'subdir/BuildThis %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-f - .', stdin = """ import os print "STDIN " + os.getcwd() """, stdout = test.wrap_stdout(read_str = 'STDIN %s\n' % wpath, - build_str = 'scons: "." is up to date.\n')) + build_str = "scons: `.' is up to date.\n")) test.run(arguments = '-f no_such_file .', - stdout = test.wrap_stdout('scons: "." is up to date.\n'), + stdout = test.wrap_stdout("scons: `.' is up to date.\n"), stderr = "Ignoring missing SConscript 'no_such_file'\n") test.pass_test() diff --git a/test/option-n.py b/test/option-n.py index 86f4c3a..7a324b5 100644 --- a/test/option-n.py +++ b/test/option-n.py @@ -216,7 +216,7 @@ test.fail_test(os.path.exists(test.workpath("configure", "config.log"))) # test that no error is raised, if all targets are up-to-date. In this # case .cache and config.log shouldn't be created -stdout=test.wrap_stdout(build_str='scons: "." is up to date.\n', +stdout=test.wrap_stdout(build_str="scons: `.' is up to date.\n", read_str="""\ Executing Custom Test ... ok """) diff --git a/test/timestamp-fallback.py b/test/timestamp-fallback.py index 9ea515c..ba70d0c 100644 --- a/test/timestamp-fallback.py +++ b/test/timestamp-fallback.py @@ -68,9 +68,9 @@ test.run(arguments = 'f1.out f3.out') test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ -scons: "f1.out" is up to date. +scons: `f1.out' is up to date. build("f2.out", "f2.in") -scons: "f3.out" is up to date. +scons: `f3.out' is up to date. build("f4.out", "f4.in") """)) @@ -84,9 +84,9 @@ os.utime(test.workpath('f3.in'), test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = test.wrap_stdout("""\ build("f1.out", "f1.in") -scons: "f2.out" is up to date. +scons: `f2.out' is up to date. build("f3.out", "f3.in") -scons: "f4.out" is up to date. +scons: `f4.out' is up to date. """)) diff --git a/test/up-to-date.py b/test/up-to-date.py index 8311444..460401a 100644 --- a/test/up-to-date.py +++ b/test/up-to-date.py @@ -58,9 +58,10 @@ test.write('f4.in', "f4.in\n") test.run(arguments = 'f1.out f3.out') test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = -test.wrap_stdout("""scons: "f1.out" is up to date. +test.wrap_stdout("""\ +scons: `f1.out' is up to date. %s build.py f2.out f2.in -scons: "f3.out" is up to date. +scons: `f3.out' is up to date. %s build.py f4.out f4.in """ % (python, python))) -- cgit v0.12