2011-06-01 Stefano Lattarini <stefano.lattarini@gmail.com>
+ lex tests: do not force the use of flex unconditionally
+ * tests/defs (lex): Act more similarly to what the `yacc'
+ requirement does, i.e., only force the use of flex if the
+ $LEX variable is left unset by the user.
+ (flex): Use `skip_' to skip the test if flex is not found.
+
+2011-06-01 Stefano Lattarini <stefano.lattarini@gmail.com>
+
lex tests: avoid possible hang; fix and extend
* tests/lex3.test (foo.l:yywrap): Return 1, not 0, to avoid hangs.
Bug introduced in commit 'v1.11-871-geb147a1'.
&& test "${#_am_dummy}" -eq 5' ) \
|| skip_ "the shell lacks some required XSI features"
;;
- flex|lex)
+ flex)
# Since flex is required, we pick LEX for ./configure.
LEX=flex
export LEX
echo "$me: running flex --version"
- flex --version || exit 77
+ flex --version || skip_ "required program \`flex' not available"
+ ;;
+ lex)
+ test "$LEX" = false && skip_ "no Lex program available"
+ if test -z "$LEX"; then
+ # The user hasn't explicitly specified any lex program in the
+ # environment, so we try to use flex, skipping the test if it's
+ # not found.
+ LEX=flex
+ export LEX
+ echo "$me: running flex --version"
+ flex --version || skip_ "required program \`flex' not available"
+ fi
;;
yacc)
test "$YACC" = false && skip_ "no Yacc program available"