summaryrefslogtreecommitdiffstats
path: root/test/LEXFLAGS.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-01-11 03:17:45 (GMT)
committerSteven Knight <knight@baldmt.com>2002-01-11 03:17:45 (GMT)
commit73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a (patch)
treea8312b6ab6dc5cdd45c711c757dd59150223efdc /test/LEXFLAGS.py
parent74c6fdcbeadb1b42f134f7f9b864763d29bb8338 (diff)
downloadSCons-73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a.zip
SCons-73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a.tar.gz
SCons-73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a.tar.bz2
Check for the existence of lex and yacc in those tests and bail with NO RESULT if they're not present..
Diffstat (limited to 'test/LEXFLAGS.py')
-rw-r--r--test/LEXFLAGS.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/LEXFLAGS.py b/test/LEXFLAGS.py
index 06facb8..2625c29 100644
--- a/test/LEXFLAGS.py
+++ b/test/LEXFLAGS.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import os.path
import string
import sys
import TestSCons
@@ -36,8 +37,17 @@ if sys.platform == 'win32':
else:
_exe = ''
+lex = None
+for dir in string.split(os.environ['PATH'], os.pathsep):
+ l = os.path.join(dir, 'lex' + _exe)
+ if os.path.exists(l):
+ lex = l
+ break
+
test = TestSCons.TestSCons()
+test.no_result(not lex)
+
test.write('SConstruct', """
foo = Environment()
bar = Environment(LEXFLAGS = '-b')