diff options
author | Daniel <dmoody256@gmail.com> | 2019-02-16 17:10:29 (GMT) |
---|---|---|
committer | Daniel <dmoody256@gmail.com> | 2019-02-16 17:10:29 (GMT) |
commit | 9eb21f94e0490e8e7811f1033ea146acac0b7c34 (patch) | |
tree | 6079fea4ffb2bc0040d13c152107dc04ff1a06b1 /test | |
parent | f296600dd858fa07ef144fbcbf4ee36bc308abf3 (diff) | |
download | SCons-9eb21f94e0490e8e7811f1033ea146acac0b7c34.zip SCons-9eb21f94e0490e8e7811f1033ea146acac0b7c34.tar.gz SCons-9eb21f94e0490e8e7811f1033ea146acac0b7c34.tar.bz2 |
update lex tool to find paths on windows
Diffstat (limited to 'test')
-rw-r--r-- | test/LEX/live.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/test/LEX/live.py b/test/LEX/live.py index 3d697d5..853e97c 100644 --- a/test/LEX/live.py +++ b/test/LEX/live.py @@ -28,6 +28,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" Test LEX and LEXFLAGS with a live lex. """ +import sys + import TestSCons _exe = TestSCons._exe @@ -40,15 +42,24 @@ lex = test.where_is('lex') or test.where_is('flex') if not lex: test.skip_test('No lex or flex found; skipping test.\n') +tools = "'default'" +if sys.platform == 'win32': + # make sure mingw is installed on win32 + if not test.where_is('gcc'): + test.skip_test('No mingw on windows; skipping test.\n') + # lex on win32 has a dependencies on mingw for unix headers + # so add it as a tool to the environment. + tools += ", 'mingw'" test.file_fixture('wrapper.py') test.write('SConstruct', """ -foo = Environment() +foo = Environment(tools=[%(tools)s]) lex = foo.Dictionary('LEX') bar = Environment(LEX = r'%(_python_)s wrapper.py ' + lex, - LEXFLAGS = '-b') + LEXFLAGS = '-b', + tools=[%(tools)s]) foo.Program(target = 'foo', source = 'foo.l') bar.Program(target = 'bar', source = 'bar.l') """ % locals()) @@ -82,9 +93,6 @@ test.must_not_exist(test.workpath('lex.backup')) test.run(program = test.workpath('foo'), stdin = "a\n", stdout = "Afoo.lA\n") - - - test.run(arguments = 'bar' + _exe) test.must_match(test.workpath('wrapper.out'), "wrapper.py\n") |