1# Copyright (C) 2018 Free Software Foundation, Inc. 2# 3# This file is part of DejaGnu. 4# 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. 9# 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. 14# 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. 18 19# This file was written by Jacob Bachmeyer. 20 21# each element: { name args envars exit_code output_re... } 22set tests { 23 { "empty command" {} {} 2 "ERROR: no command given" } 24 { "empty; verbose 1" {-v} {} 2 25 "Verbose level is 1\nRunning launcher [^\n]*\n" 26 "Looking for commands [^\n]*\nRunning nothing.\n" 27 "ERROR: no command given" } 28 { "empty; verbose 2" {-v -v} {} 2 29 "Verbose level is 2\nRunning launcher [^\n]*\n" 30 "Running from source directory\n" 31 "Looking for commands [^\n]*\nRunning nothing.\n" 32 "ERROR: no command given" } 33 { "empty; verbose 3" {-v -v -v} {} 2 34 "Verbose level is 3\nRunning launcher [^\n]*\n" 35 "Running from source directory\n" 36 "Looking for commands [^\n]*\nRunning nothing.\n" 37 "Awk interpreter [^\n]*\nGNU Awk interpreter [^\n]*\n" 38 "Bash interpreter [^\n]*\n" 39 "Expect interpreter [^\n]*\nTcl interpreter [^\n]*\n" 40 "ERROR: no command given" } 41} 42 43lappend tests [list "check version" {--version} {} 0 \ 44 [format "dejagnu auxiliary launcher \\(DejaGnu\\) %s" \ 45 $frame_version]] 46 47if { ![file isdirectory [file join [file dirname $LAUNCHER] commands]] } { 48 skip_dejagnu_launcher_tests \ 49 "The 'commands' directory is not present in the source tree." \ 50 unsupported $tests 51} else { 52 run_dejagnu_launcher_tests $LAUNCHER $tests 53} 54 55#EOF 56