Change test for [which make] to [which sh]
[dejagnu.git] / testsuite / launcher.all / interp.exp
blob02e763e98b6de6e7acd6164fd781bdf81f7849b0
1 # Copyright (C) 2018 Free Software Foundation, Inc.
3 # This file is part of DejaGnu.
5 # DejaGnu is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # DejaGnu is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with DejaGnu; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 # This file was written by Jacob Bachmeyer.
21 # each element: { name args envars exit_code output_re... }
22 set tests {
23     { "have shell, always" {--DGTimpl sh} {} 0 "" }
24     { "report error probing 'echo'" {--DGTimpl echo} {} 2 "" }
26     { "have no Awk"     {--DGTimpl awk}  {AWK=bogus GAWK=bogus} 1 "" }
27     { "have Awk"        {--DGTimpl awk}  {AWK=true  GAWK=bogus} 0 "" }
29     { "have no GNU Awk" {--DGTimpl gawk} {GAWK=bogus} 1 "" }
30     { "have GNU Awk"    {--DGTimpl gawk} {GAWK=true }  0 "" }
32     { "GNU Awk substitutes for Awk"
33                         {--DGTimpl awk}  {AWK=bogus GAWK=true} 0 "" }
35     { "have no Tcl"     {--DGTimpl tcl}  {TCLSH=bogus EXPECT=bogus} 1 "" }
36     { "have Tcl"        {--DGTimpl tcl}  {TCLSH=true  EXPECT=bogus} 0 "" }
38     { "have no Expect"  {--DGTimpl exp}  {EXPECT=bogus} 1 "" }
39     { "have Expect"     {--DGTimpl exp}  {EXPECT=true }  0 "" }
41     { "Expect substitutes for Tcl"
42                         {--DGTimpl tcl}  {TCLSH=bogus EXPECT=true} 0 "" }
45 if { [which true] == 0 || [which bogus] != 0 } {
46     skip_dejagnu_launcher_tests \
47         "Either 'true' is not on PATH or 'bogus' is." \
48         unresolved $tests
49 } elseif { ![file isdirectory [file join [file dirname $LAUNCHER] commands]] } {
50     skip_dejagnu_launcher_tests \
51         "The 'commands' directory is not present in the source tree." \
52         unsupported $tests
53 } else {
54     run_dejagnu_launcher_tests $LAUNCHER $tests
57 #EOF