summaryrefslogtreecommitdiffstats
path: root/test/Dir/source.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Dir/source.py')
-rw-r--r--test/Dir/source.py172
1 files changed, 86 insertions, 86 deletions
diff --git a/test/Dir/source.py b/test/Dir/source.py
index 9852660..68165f3 100644
--- a/test/Dir/source.py
+++ b/test/Dir/source.py
@@ -37,10 +37,10 @@ import TestSCons
test = TestSCons.TestSCons()
-test.subdir('bsig', [ 'bsig', 'subdir' ],
- 'csig', [ 'csig', 'subdir' ],
- 'cmd-bsig', [ 'cmd-bsig', 'subdir' ],
- 'cmd-csig', [ 'cmd-csig', 'subdir' ])
+test.subdir('tstamp', [ 'tstamp', 'subdir' ],
+ 'content', [ 'content', 'subdir' ],
+ 'cmd-tstamp', [ 'cmd-tstamp', 'subdir' ],
+ 'cmd-content', [ 'cmd-content', 'subdir' ])
test.write('SConstruct', """\
def writeTarget(target, source, env):
@@ -57,114 +57,114 @@ env = Environment()
env['BUILDERS']['TestDir'] = test_bld_dir
env['BUILDERS']['TestFile'] = test_bld_file
-env_bsig = env.Clone()
-env_bsig.TargetSignatures('build')
-env_bsig.TestFile(source='junk.txt', target='bsig/junk.out')
-env_bsig.TestDir(source='bsig', target='bsig.out')
-env_bsig.Command('cmd-bsig-noscan.out', 'cmd-bsig', writeTarget)
-env_bsig.Command('cmd-bsig.out', 'cmd-bsig', writeTarget,
+env_tstamp = env.Clone()
+env_tstamp.Decider('timestamp-newer')
+env_tstamp.TestFile(source='junk.txt', target='tstamp/junk.out')
+env_tstamp.TestDir(source='tstamp', target='tstamp.out')
+env_tstamp.Command('cmd-tstamp-noscan.out', 'cmd-tstamp', writeTarget)
+env_tstamp.Command('cmd-tstamp.out', 'cmd-tstamp', writeTarget,
source_scanner=DirScanner)
-env_csig = env.Clone()
-env_csig.TargetSignatures('content')
-env_csig.TestFile(source='junk.txt', target='csig/junk.out')
-env_csig.TestDir(source='csig', target='csig.out')
-env_csig.Command('cmd-csig-noscan.out', 'cmd-csig', writeTarget)
-env_csig.Command('cmd-csig.out', 'cmd-csig', writeTarget,
+env_content = env.Clone()
+env_content.Decider('content')
+env_content.TestFile(source='junk.txt', target='content/junk.out')
+env_content.TestDir(source='content', target='content.out')
+env_content.Command('cmd-content-noscan.out', 'cmd-content', writeTarget)
+env_content.Command('cmd-content.out', 'cmd-content', writeTarget,
source_scanner=DirScanner)
""")
-test.write([ 'bsig', 'foo.txt' ], 'foo.txt 1\n')
-test.write([ 'bsig', '#hash.txt' ], 'hash.txt 1\n')
-test.write([ 'bsig', 'subdir', 'bar.txt'], 'bar.txt 1\n')
-test.write([ 'bsig', 'subdir', '#hash.txt'], 'hash.txt 1\n')
-test.write([ 'csig', 'foo.txt' ], 'foo.txt 1\n')
-test.write([ 'csig', '#hash.txt' ], 'hash.txt 1\n')
-test.write([ 'csig', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
-test.write([ 'csig', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
-test.write([ 'cmd-bsig', 'foo.txt' ], 'foo.txt 1\n')
-test.write([ 'cmd-bsig', '#hash.txt' ], 'hash.txt 1\n')
-test.write([ 'cmd-bsig', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
-test.write([ 'cmd-bsig', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
-test.write([ 'cmd-csig', 'foo.txt' ], 'foo.txt 1\n')
-test.write([ 'cmd-csig', '#hash.txt' ], '#hash.txt 1\n')
-test.write([ 'cmd-csig', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
-test.write([ 'cmd-csig', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
+test.write([ 'tstamp', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'tstamp', '#hash.txt' ], 'hash.txt 1\n')
+test.write([ 'tstamp', 'subdir', 'bar.txt'], 'bar.txt 1\n')
+test.write([ 'tstamp', 'subdir', '#hash.txt'], 'hash.txt 1\n')
+test.write([ 'content', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'content', '#hash.txt' ], 'hash.txt 1\n')
+test.write([ 'content', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
+test.write([ 'content', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
+test.write([ 'cmd-tstamp', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'cmd-tstamp', '#hash.txt' ], 'hash.txt 1\n')
+test.write([ 'cmd-tstamp', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
+test.write([ 'cmd-tstamp', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
+test.write([ 'cmd-content', 'foo.txt' ], 'foo.txt 1\n')
+test.write([ 'cmd-content', '#hash.txt' ], '#hash.txt 1\n')
+test.write([ 'cmd-content', 'subdir', 'bar.txt' ], 'bar.txt 1\n')
+test.write([ 'cmd-content', 'subdir', '#hash.txt' ], 'hash.txt 1\n')
test.write('junk.txt', 'junk.txt\n')
test.run(arguments=".", stderr=None)
-test.must_match('bsig.out', 'stuff\n')
-test.must_match('csig.out', 'stuff\n')
-test.must_match('cmd-bsig.out', 'stuff\n')
-test.must_match('cmd-csig.out', 'stuff\n')
-test.must_match('cmd-bsig-noscan.out', 'stuff\n')
-test.must_match('cmd-csig-noscan.out', 'stuff\n')
+test.must_match('tstamp.out', 'stuff\n')
+test.must_match('content.out', 'stuff\n')
+test.must_match('cmd-tstamp.out', 'stuff\n')
+test.must_match('cmd-content.out', 'stuff\n')
+test.must_match('cmd-tstamp-noscan.out', 'stuff\n')
+test.must_match('cmd-content-noscan.out', 'stuff\n')
-test.up_to_date(arguments='bsig.out')
-test.up_to_date(arguments='csig.out')
-test.up_to_date(arguments='cmd-bsig.out')
-test.up_to_date(arguments='cmd-csig.out')
-test.up_to_date(arguments='cmd-bsig-noscan.out')
-test.up_to_date(arguments='cmd-csig-noscan.out')
+test.up_to_date(arguments='tstamp.out')
+test.up_to_date(arguments='content.out')
+test.up_to_date(arguments='cmd-tstamp.out')
+test.up_to_date(arguments='cmd-content.out')
+test.up_to_date(arguments='cmd-tstamp-noscan.out')
+test.up_to_date(arguments='cmd-content-noscan.out')
-test.write([ 'bsig', 'foo.txt' ], 'foo.txt 2\n')
-test.not_up_to_date(arguments='bsig.out')
+test.write([ 'tstamp', 'foo.txt' ], 'foo.txt 2\n')
+test.not_up_to_date(arguments='tstamp.out')
-test.write([ 'bsig', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='bsig.out')
+test.write([ 'tstamp', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='tstamp.out')
-test.write([ 'csig', 'foo.txt' ], 'foo.txt 2\n')
-test.not_up_to_date(arguments='csig.out')
+test.write([ 'content', 'foo.txt' ], 'foo.txt 2\n')
+test.not_up_to_date(arguments='content.out')
-test.write([ 'csig', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='csig.out')
+test.write([ 'content', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='content.out')
-test.write([ 'cmd-bsig', 'foo.txt' ], 'foo.txt 2\n')
-test.not_up_to_date(arguments='cmd-bsig.out')
-test.up_to_date(arguments='cmd-bsig-noscan.out')
+test.write([ 'cmd-tstamp', 'foo.txt' ], 'foo.txt 2\n')
+test.not_up_to_date(arguments='cmd-tstamp.out')
+test.up_to_date(arguments='cmd-tstamp-noscan.out')
-test.write([ 'cmd-bsig', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='cmd-bsig.out')
-test.up_to_date(arguments='cmd-bsig-noscan.out')
+test.write([ 'cmd-tstamp', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='cmd-tstamp.out')
+test.up_to_date(arguments='cmd-tstamp-noscan.out')
-test.write([ 'cmd-csig', 'foo.txt' ], 'foo.txt 2\n')
-test.not_up_to_date(arguments='cmd-csig.out')
-test.up_to_date(arguments='cmd-csig-noscan.out')
+test.write([ 'cmd-content', 'foo.txt' ], 'foo.txt 2\n')
+test.not_up_to_date(arguments='cmd-content.out')
+test.up_to_date(arguments='cmd-content-noscan.out')
-test.write([ 'cmd-csig', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='cmd-csig.out')
-test.up_to_date(arguments='cmd-csig-noscan.out')
+test.write([ 'cmd-content', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='cmd-content.out')
+test.up_to_date(arguments='cmd-content-noscan.out')
-test.write([ 'bsig', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
-test.not_up_to_date(arguments='bsig.out')
+test.write([ 'tstamp', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
+test.not_up_to_date(arguments='tstamp.out')
-test.write([ 'bsig', 'subdir', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='bsig.out')
+test.write([ 'tstamp', 'subdir', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='tstamp.out')
-test.write([ 'csig', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
-test.not_up_to_date(arguments='csig.out')
+test.write([ 'content', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
+test.not_up_to_date(arguments='content.out')
-test.write([ 'csig', 'subdir', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='csig.out')
+test.write([ 'content', 'subdir', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='content.out')
-test.write([ 'cmd-bsig', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
-test.not_up_to_date(arguments='cmd-bsig.out')
-test.up_to_date(arguments='cmd-bsig-noscan.out')
+test.write([ 'cmd-tstamp', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
+test.not_up_to_date(arguments='cmd-tstamp.out')
+test.up_to_date(arguments='cmd-tstamp-noscan.out')
-test.write([ 'cmd-bsig', 'subdir', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='cmd-bsig.out')
-test.up_to_date(arguments='cmd-bsig-noscan.out')
+test.write([ 'cmd-tstamp', 'subdir', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='cmd-tstamp.out')
+test.up_to_date(arguments='cmd-tstamp-noscan.out')
-test.write([ 'cmd-csig', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
-test.not_up_to_date(arguments='cmd-csig.out')
-test.up_to_date(arguments='cmd-csig-noscan.out')
+test.write([ 'cmd-content', 'subdir', 'bar.txt' ], 'bar.txt 2\n')
+test.not_up_to_date(arguments='cmd-content.out')
+test.up_to_date(arguments='cmd-content-noscan.out')
-test.write([ 'cmd-csig', 'subdir', 'new.txt' ], 'new.txt\n')
-test.not_up_to_date(arguments='cmd-csig.out')
-test.up_to_date(arguments='cmd-csig-noscan.out')
+test.write([ 'cmd-content', 'subdir', 'new.txt' ], 'new.txt\n')
+test.not_up_to_date(arguments='cmd-content.out')
+test.up_to_date(arguments='cmd-content-noscan.out')
test.write('junk.txt', 'junk.txt 2\n')
-test.not_up_to_date(arguments='bsig.out')
-test.not_up_to_date(arguments='csig.out')
+test.not_up_to_date(arguments='tstamp.out')
+test.not_up_to_date(arguments='content.out')
test.pass_test()