diff options
Diffstat (limited to 'test/TAR')
-rw-r--r-- | test/TAR/TAR.py | 10 | ||||
-rw-r--r-- | test/TAR/TARCOM.py | 4 | ||||
-rw-r--r-- | test/TAR/TARCOMSTR.py | 6 | ||||
-rw-r--r-- | test/TAR/TARFLAGS.py | 12 |
4 files changed, 17 insertions, 15 deletions
diff --git a/test/TAR/TAR.py b/test/TAR/TAR.py index 9d5a617..c82e227 100644 --- a/test/TAR/TAR.py +++ b/test/TAR/TAR.py @@ -30,7 +30,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -60,12 +60,12 @@ sys.exit(0) """) test.write('SConstruct', """ -env = Environment(tools = ['tar'], TAR = r'%s mytar.py') +env = Environment(tools = ['tar'], TAR = r'%(_python_)s mytar.py') env.Tar(target = 'aaa.tar', source = ['file1', 'file2']) env.Tar(target = 'aaa.tar', source = 'file3') env.Tar(target = 'bbb', source = 'sub1') env.Tar(target = 'bbb', source = 'file4') -""" % python) +""" % locals()) test.write('file1', "file1\n") test.write('file2', "file2\n") @@ -98,7 +98,7 @@ os.system(string.join(sys.argv[1:], " ")) test.write('SConstruct', """ foo = Environment() tar = foo.Dictionary('TAR') -bar = Environment(TAR = r'%s wrapper.py ' + tar) +bar = Environment(TAR = r'%(_python_)s wrapper.py ' + tar) f3 = Environment(TARFLAGS = '-c -z', TARSUFFIX = '.tar.gz') f4 = Environment(TARFLAGS = '-c -z', TARSUFFIX = '.tgz') f5 = Environment(TARFLAGS = '-c -z') @@ -112,7 +112,7 @@ f4.Tar(target = 'f4', source = 'file19') f4.Tar(target = 'f4', source = ['file20', 'file21']) f5.Tar(target = 'f5.tgz', source = 'file22') f5.Tar(target = 'f5.tgz', source = ['file23', 'file24']) -""" % python) +""" % locals()) for f in ['file10', 'file11', 'file12', 'file13', 'file14', 'file15', diff --git a/test/TAR/TARCOM.py b/test/TAR/TARCOM.py index f6e36e7..a39dd22 100644 --- a/test/TAR/TARCOM.py +++ b/test/TAR/TARCOM.py @@ -33,7 +33,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -50,7 +50,7 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(TOOLS = ['tar'], - TARCOM = r'%(python)s mytar.py $TARGET $SOURCE') + TARCOM = r'%(_python_)s mytar.py $TARGET $SOURCE') env.Tar('test1.tar', 'test1.in') """ % locals()) diff --git a/test/TAR/TARCOMSTR.py b/test/TAR/TARCOMSTR.py index 2bd3813..eee9b16 100644 --- a/test/TAR/TARCOMSTR.py +++ b/test/TAR/TARCOMSTR.py @@ -31,7 +31,7 @@ the displayed string when tar is called. import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -49,10 +49,10 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['tar'], - TARCOM = r'%s mytar.py $TARGET $SOURCES', + TARCOM = r'%(_python_)s mytar.py $TARGET $SOURCES', TARCOMSTR = 'Taring $TARGET from $SOURCE') env.Tar('aaa.tar', 'aaa.in') -""" % python) +""" % locals()) test.write('aaa.in', "aaa.in\n/*tar*/\n") diff --git a/test/TAR/TARFLAGS.py b/test/TAR/TARFLAGS.py index 2cda502..c592fe0 100644 --- a/test/TAR/TARFLAGS.py +++ b/test/TAR/TARFLAGS.py @@ -30,7 +30,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -64,12 +64,14 @@ sys.exit(0) """) test.write('SConstruct', """ -env = Environment(tools = ['tar'], TAR = r'%s mytar.py', TARFLAGS = '-x') +env = Environment(tools = ['tar'], + TAR = r'%(_python_)s mytar.py', + TARFLAGS = '-x') env.Tar(target = 'aaa.tar', source = ['file1', 'file2']) env.Tar(target = 'aaa.tar', source = 'file3') env.Tar(target = 'bbb', source = 'sub1') env.Tar(target = 'bbb', source = 'file4') -""" % python) +""" % locals()) test.write('file1', "file1\n") test.write('file2', "file2\n") @@ -104,12 +106,12 @@ os.system(string.join(sys.argv[1:], " ")) foo = Environment() tar = foo['TAR'] bar = Environment(TAR = '', - TARFLAGS = r'%s wrapper.py ' + tar + ' -c -b 1') + TARFLAGS = r'%(_python_)s wrapper.py ' + tar + ' -c -b 1') foo.Tar(target = 'foo.tar', source = ['file10', 'file11']) foo.Tar(target = 'foo.tar', source = 'file12') bar.Tar(target = 'bar.tar', source = ['file13', 'file14']) bar.Tar(target = 'bar.tar', source = 'file15') -""" % python) +""" % locals()) test.write('file10', "file10\n") test.write('file11', "file11\n") |