diff options
author | Jacob Bachmeyer <jcb@gnu.org> | 2021-04-15 23:36:45 -0500 |
---|---|---|
committer | Jacob Bachmeyer <jcb@gnu.org> | 2021-04-15 23:36:45 -0500 |
commit | 9539a1e2ffe8506b92bfcb4363c767e4bc6a0700 (patch) | |
tree | cfc9e290ee5b34f19c54bf4c2ad5c5aa1008ebb5 | |
parent | c95e2e9b567a1c3ca22b2de4fdcdfe4b99ba2a03 (diff) |
Avoid dependency on exit code from false(1) in dejagnu auxiliary launcher
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | dejagnu | 14 |
2 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,11 @@ +2021-04-15 Jacob Bachmeyer <jcb@gnu.org> + + PR47382 + + * dejagnu: Avoid using $? for an exit code; it is convenient until + the tests fail because the script is run on Solaris where false + returns 255 instead of 1 and the test harness expects exit code 1. + 2021-04-14 Jacob Bachmeyer <jcb@gnu.org> PR47382 @@ -426,13 +426,13 @@ fi if test -z "$command" ; then if test -n "$override_ext" ; then case $selected_ext in - awk) $have_awk; exit $? ;; - bash) $have_bash; exit $? ;; - exp) $have_expect; exit $? ;; - gawk) $have_gawk; exit $? ;; - tcl) $have_tcl; exit $? ;; - sh) $have_sh; exit $? ;; - *) exit 2 ;; + awk) if $have_awk; then exit 0; else exit 1; fi ;; + bash) if $have_bash; then exit 0; else exit 1; fi ;; + exp) if $have_expect; then exit 0; else exit 1; fi ;; + gawk) if $have_gawk; then exit 0; else exit 1; fi ;; + tcl) if $have_tcl; then exit 0; else exit 1; fi ;; + sh) if $have_sh; then exit 0; else exit 1; fi ;; + *) exit 2 ;; esac else echo ERROR: no command given |