diff options
Diffstat (limited to 'test/YACC')
-rw-r--r-- | test/YACC/YACC.py | 10 | ||||
-rw-r--r-- | test/YACC/YACCCOM.py | 6 | ||||
-rw-r--r-- | test/YACC/YACCCOMSTR.py | 6 | ||||
-rw-r--r-- | test/YACC/YACCFLAGS.py | 8 | ||||
-rw-r--r-- | test/YACC/YACCHFILESUFFIX.py | 6 | ||||
-rw-r--r-- | test/YACC/YACCHXXFILESUFFIX.py | 6 |
6 files changed, 22 insertions, 20 deletions
diff --git a/test/YACC/YACC.py b/test/YACC/YACC.py index 9be1934..d3bc679 100644 --- a/test/YACC/YACC.py +++ b/test/YACC/YACC.py @@ -30,7 +30,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ _exe = TestSCons._exe if sys.platform == 'win32': @@ -64,10 +64,10 @@ sys.exit(0) test.write('SConstruct', """ -env = Environment(YACC = r'%s myyacc.py', tools=['default', 'yacc']) +env = Environment(YACC = r'%(_python_)s myyacc.py', tools=['default', 'yacc']) env.Program(target = 'aaa', source = 'aaa.y') env.Program(target = 'bbb', source = 'bbb.yacc') -""" % python) +""" % locals()) test.write('aaa.y', r""" int @@ -113,13 +113,13 @@ os.system(string.join(sys.argv[1:], " ")) test.write('SConstruct', """ foo = Environment(YACCFLAGS='-d') yacc = foo.Dictionary('YACC') -bar = Environment(YACC = r'%s wrapper.py ' + yacc) +bar = Environment(YACC = r'%(_python_)s wrapper.py ' + yacc) foo.Program(target = 'foo', source = 'foo.y') bar.Program(target = 'bar', source = 'bar.y') foo.Program(target = 'hello', source = ['hello.cpp']) foo.CXXFile(target = 'file.cpp', source = ['file.yy'], YACCFLAGS='-d') foo.CFile(target = 'not_foo', source = 'foo.y') -""" % python) +""" % locals()) yacc = r""" %%{ diff --git a/test/YACC/YACCCOM.py b/test/YACC/YACCCOM.py index 5f7cd38..1425eb8 100644 --- a/test/YACC/YACCCOM.py +++ b/test/YACC/YACCCOM.py @@ -30,7 +30,7 @@ Test the ability to configure the $YACCCOM construction variable. import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -48,10 +48,10 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['default', 'yacc'], - YACCCOM = r'%s myyacc.py $TARGET $SOURCES') + YACCCOM = r'%(_python_)s myyacc.py $TARGET $SOURCES') env.CFile(target = 'aaa', source = 'aaa.y') env.CFile(target = 'bbb', source = 'bbb.yacc') -""" % python) +""" % locals()) test.write('aaa.y', "aaa.y\n/*yacc*/\n") test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n") diff --git a/test/YACC/YACCCOMSTR.py b/test/YACC/YACCCOMSTR.py index cfb48b7..b2c128d 100644 --- a/test/YACC/YACCCOMSTR.py +++ b/test/YACC/YACCCOMSTR.py @@ -31,7 +31,7 @@ the displayed string when yacc is called. import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -49,11 +49,11 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['default', 'yacc'], - YACCCOM = r'%s myyacc.py $TARGET $SOURCES', + YACCCOM = r'%(_python_)s myyacc.py $TARGET $SOURCES', YACCCOMSTR = 'Yaccing $TARGET from $SOURCE') env.CFile(target = 'aaa', source = 'aaa.y') env.CFile(target = 'bbb', source = 'bbb.yacc') -""" % python) +""" % locals()) test.write('aaa.y', "aaa.y\n/*yacc*/\n") test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n") diff --git a/test/YACC/YACCFLAGS.py b/test/YACC/YACCFLAGS.py index 2779597..a94bc8f 100644 --- a/test/YACC/YACCFLAGS.py +++ b/test/YACC/YACCFLAGS.py @@ -30,7 +30,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ _exe = TestSCons._exe if sys.platform == 'win32': @@ -62,9 +62,11 @@ sys.exit(0) """) test.write('SConstruct', """ -env = Environment(YACC = r'%s myyacc.py', YACCFLAGS = '-x', tools=['yacc', '%s', '%s']) +env = Environment(YACC = r'%(_python_)s myyacc.py', + YACCFLAGS = '-x', + tools=['yacc', '%(linker)s', '%(compiler)s']) env.Program(target = 'aaa', source = 'aaa.y') -""" % (python, linker, compiler)) +""" % locals()) test.write('aaa.y', r""" int diff --git a/test/YACC/YACCHFILESUFFIX.py b/test/YACC/YACCHFILESUFFIX.py index 389018f..231472d 100644 --- a/test/YACC/YACCHFILESUFFIX.py +++ b/test/YACC/YACCHFILESUFFIX.py @@ -31,7 +31,7 @@ utility that writes to an odd import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -58,12 +58,12 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['default', 'yacc'], - YACC = r'%s myyacc.py', + YACC = r'%(_python_)s myyacc.py', YACCFLAGS = '-d', YACCHFILESUFFIX = '.hsuffix') env.CFile(target = 'aaa', source = 'aaa.y') env.CFile(target = 'bbb', source = 'bbb.yacc') -""" % python) +""" % locals()) test.write('aaa.y', "aaa.y\n/*yacc*/\n") test.write('bbb.yacc', "bbb.yacc\n/*yacc*/\n") diff --git a/test/YACC/YACCHXXFILESUFFIX.py b/test/YACC/YACCHXXFILESUFFIX.py index b564d5e..182f08b 100644 --- a/test/YACC/YACCHXXFILESUFFIX.py +++ b/test/YACC/YACCHXXFILESUFFIX.py @@ -31,7 +31,7 @@ utility that writes to an odd import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -58,11 +58,11 @@ sys.exit(0) test.write('SConstruct', """ env = Environment(tools=['default', 'yacc'], - YACC = r'%s myyacc.py', + YACC = r'%(_python_)s myyacc.py', YACCFLAGS = '-d', YACCHXXFILESUFFIX = '.hxxsuffix') env.CXXFile(target = 'aaa', source = 'aaa.yy') -""" % python) +""" % locals()) test.write('aaa.yy', "aaa.yy\n/*yacc*/\n") |