summaryrefslogtreecommitdiffstats
path: root/test/YACC.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/YACC.py')
-rw-r--r--test/YACC.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/YACC.py b/test/YACC.py
index f497c69..a405985 100644
--- a/test/YACC.py
+++ b/test/YACC.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 = ''
+yacc = None
+for dir in string.split(os.environ['PATH'], os.pathsep):
+ y = os.path.join(dir, 'yacc' + _exe)
+ if os.path.exists(y):
+ yacc = y
+ break
+
test = TestSCons.TestSCons()
+test.no_result(not yacc)
+
test.write("wrapper.py",
"""import os
import string