set_board_info gdb,nosignals 1
set_board_info gdb,noresults 1
-# More time is needed
+# More time is needed
set_board_info gcc,timeout 800
set_board_info gdb,timeout 60
}
# The idt interface can't return exit statuses, so gcc (ctorture et
-# al) needs to do what it can to get them.
+# al) needs to do what it can to get them.
set_board_info needs_status_wrapper 1
# GDB needs to use "target mips" to talk to the board.
# This is a list of toolchains that are supported on this board.
-set_board_info target_install {mips64vr4300-elf
+set_board_info target_install {mips64vr4300-elf
mips64-elf}
# Load the generic configuration for this board. This will define a basic
# It isn't visible in the target triple, so we set it explicitly. The
# *linked* format is currently mmo, but those cases where this matters we
# can deal with separately.
-set_board_info obj_format "elf"
+set_board_info obj_format "elf"
# The compiler used to build for this board. This has *nothing* to do
# with what compiler is tested if we're testing gcc.
# simulator does not allow code to be executed in the "normal" documented
# data and stack segments. Use a somewhat magic number, so stack addresses
# are easily recognized when debugging.
-set_board_info ldflags "[newlib_link_flags] -Wl,--defsym,__Stack_start=0x1680a00000000000"
+set_board_info ldflags "[newlib_link_flags] -Wl,--defsym,__Stack_start=0x1680a00000000000"
# No linker script needed - the simulator is the main environment for this
# target.
# Jumping to start is how we get the program started in GDB.
set_board_info gdb_run_command "jump start"
# The remote target uses a GDB stub.
-set_board_info use_gdb_stub 1
+set_board_info use_gdb_stub 1
# We can't do I/O.
set_board_info gdb,noinferiorio 1
# Or signals.
#set_board_info host_library_path "[file dirname [file dirname [file dirname [file dirname [file dirname [exec [find_gcc] --print-prog-name=cc1]]]]]]/lib"
# Do not use -lm on Cygwin
-if { [istarget "*-*-cygwin*"] } {
+if { [istarget "*-*-cygwin*"] } {
set_board_info mathlib ""
}
if { $usparc_init_count == 3 } {
return -1
}
-
+
}
remote_close $dest
set shell_id [remote_open $dest]
# basic-sim.exp is a basic description for the standard Cygnus simulator.
load_base_board_description "basic-sim"
# Command to invoke the simulator
-set_board_info sim xt-run
+set_board_info sim xt-run
setup_sim xtensa
# No multilib flags needed by default.
process_multilib_options ""
# The simulator doesn't return exit statuses and we need to indicate this.
set_board_info needs_status_wrapper 1
# No support for signals on this target.
-set_board_info gdb,nosignals 1
\ No newline at end of file
+set_board_info gdb,nosignals 1
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if [board_info $dest exists download_response] {
remote_expect $dest 5 {
[board_info $dest download_response] { }
- timeout {
+ timeout {
perror "Download command never responded."
return "unresolved"
}
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
remote_send $dest "set prompt \"NEC010> \"\n"
exp_continue
}
- -re "NEC010> $" {
+ -re "NEC010> $" {
set i 10
}
timeout { }
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@prep.ai.mit.edu
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
return $result
}
-#
+#
# Run CMDLINE on DESTHOST. We handle two cases; one is where we're at
# a DOS prompt, and the other is where we're in GDB.
# We run CMDLINE by creating a batchfile, downloading it, and then
# executing it; this handles the case where the commandline is too
# long for command.com to deal with.
-#
+#
proc dos_exec { dest program pargs inp outp } {
set cmdline "$program $pargs"
return [list -1 "program execution failed"]
}
-#
+#
# Start CMDLINE executing on DEST.
# There are two cases that we handle, one where we're at a DOS prompt
# and the other is when the remote machine is running GDB.
set prefix "shell "
set ok 1
}
- -re "$shell_prompt" {
+ -re "$shell_prompt" {
set ok 1
}
default { }
}
}
-#
+#
# Spawn PROGRAM on DEST, and return the spawn_id associated with the
# connection; we can only spawn one command at a time.
#
remote_exec $dest "del" "$x"
}
return
-
+
}
default {
return [eval standard_file \{$dest\} \{$op\} $args]
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
remote_send host "y\n"
exp_continue
}
- -re "No exec.* file now.*$gdb_prompt $" {
+ -re "No exec.* file now.*$gdb_prompt $" {
return 0
}
default {
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
remote_binary $dest
remote_send $dest "\n"
remote_expect $dest 5 {
- -re $shell_prompt { }
+ -re $shell_prompt { }
}
remote_send $dest "do\n"
remote_expect $dest 5 {
set result 1
remote_send $dest "\n"
remote_expect $dest 1 {
- -re "$shell_prompt" {
+ -re "$shell_prompt" {
set result 0
exp_continue
}
set status $expect_out(3,string)
exp_continue
}
- -re "(.*)$shell_prompt" {
+ -re "(.*)$shell_prompt" {
append output $expect_out(1,string)
set bstatus [check_for_board_status output]
if { $bstatus >= 0 } {
set status $bstatus
}
}
- -re "\[\r\n\]+" {
+ -re "\[\r\n\]+" {
# Sometimes the board goes wacky in the head, and we have
# to shoot it.
append output $expect_out(buffer)
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
exp_continue
}
-re "\[\r\n\]+" {
- if { ! $noappend } {
+ if { ! $noappend } {
append output $expect_out(buffer)
if { [string length $output] < 512000 } {
exp_continue
warning "Resetting $dest."
remote_send $dest "r\n"
remote_expect $dest 5 {
- -re "r.*$shell_prompt.*" {
+ -re "r.*$shell_prompt.*" {
verbose "Target reset." 2
}
timeout {
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# now for some extra dependencies that the automatic rules will not
# catch:
-html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml
+html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml
-html/book1.html: overview.sgml ref.sgml user.sgml
+html/book1.html: overview.sgml ref.sgml user.sgml
clean realclean distclean:
rm -fr $(TARGETS) DBHTOHTML* html dejagnu.info* overview.junk overview overview.{aux,dvi,log,ps,pdf,tex}
# now for some extra dependencies that the automatic rules will not
# catch:
-html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml
+html/book1.html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml
-html/book1.html: overview.sgml ref.sgml user.sgml
+html/book1.html: overview.sgml ref.sgml user.sgml
clean realclean distclean:
rm -fr $(TARGETS) DBHTOHTML* html dejagnu.info* overview.junk overview overview.{aux,dvi,log,ps,pdf,tex}
@c FIXME---MAIN TODO LIST!
@c
@c * Revisit organization.
-@c
+@c
@c * discuss Tcl/expect basics---enough to get started (see seminar notes).
@c Maybe this would permit abbreviating appendices.
procedures (see below), and you must be careful to return
@code{UNRESOLVED} where appropriate, as described in the
@code{UNRESOLVED} section above.
-
+
Besides the @sc{posix} messages, DejaGnu provides for variations of the
PASS and FAIL messages that can be helpful for the tool maintainers.
It must be noted, however, that this feature is not @sc{posix} 1003.3
@item KFAIL
A test is known to fail in some environment(s) due to a known bug
-in the tool being tested (identified by a bug id string). This
+in the tool being tested (identified by a bug id string). This
exists so that, after a bug is identified and properly registered
-in a bug tracking database (Gnats, for instance), the count of
+in a bug tracking database (Gnats, for instance), the count of
failures can be kept as zero. Having zero as a baseline in all
platforms allow the tool developers to immediately detect regressions
caused by changes (which may affect some platforms and not others).
returned for test cases which were expected to fail and did not,
if @sc{posix} 1003.3 compliance is required.
This means that @code{PASS} is in some sense more ambiguous than if
-@code{XPASS} and @code{KPASS} are also used.
+@code{XPASS} and @code{KPASS} are also used.
@end ftable
Usenix conference, @cite{Tcl: An Embeddable Command Language}. That
paper is included in PostScript form in the @file{doc} subdirectory of
the Tcl distribution. The version of Tcl included in DejaGnu at this time is
-Tcl 7.4p3.
+Tcl 7.4p3.
@cindex @code{expect} scripting language
@cindex Libes, Don
@code{runtest} is the executable test driver for DejaGnu. You can
specify two kinds of things on the @code{runtest} command line: command
line options, and Tcl variables for the test scripts. The options are
-listed alphabetically below.
+listed alphabetically below.
@cindex exit code from @code{runtest}
@cindex @code{runtest} exit code
machine. In the case of a canadian cross, this means host information as
well as target information. The named array is called
@code{target_info}, and it has two indices. The following fields are
-part of the array.
+part of the array.
@table @code
@item name
can find them dynamically. This should be the same as the argument used
for @code{push_target@{@}}.
-@item ldflags
+@item ldflags
This is the linker flags required to produce a fully linked
executable. For @code{libgloss} supported targets this is usually just
-the name of the linker script.
+the name of the linker script.
@item config
The target canonical for this target. This is used by some init files to
@item target
This is the hostname of the target. This is for TCP/IP based connections,
-and is also used for version of tip that use /etc/remote.
+and is also used for version of tip that use /etc/remote.
@item serial
This is the serial port. This is typically /dev/tty? or com?:.
boards that are connected to a terminal server. In that case the IP port
specifies the which serial port to use.
-@item baud
+@item baud
This is the baud rate for a serial port connection.
@item x10
This is the parameters for an x10 controller. These are simple devices
-that let us power cycle or reset a target board remotely.
+that let us power cycle or reset a target board remotely.
@item fileid
This is the fileid or spawn id of of the connection.
target board. For an example, here's the settings I use for my
@code{Motorola's} @code{IDP} board and my @code{Motorola} 6U VME
@code{MVME135-1} board. (both m68k targets)
-
+
@cartouche
@smallexample
# IDP board
@ifinfo
@display
-runtest Tcl
+runtest Tcl
option variable description
__________ ________ ___________________________________________
--baud baud set the default baud rate to something other
than 9600.
---connect connectmode @samp{rlogin}, @samp{telnet}, @samp{rsh},
+--connect connectmode @samp{rlogin}, @samp{telnet}, @samp{rsh},
@samp{kermit}, @samp{tip}, or @samp{mondfe}
--outdir outdir directory for @file{@var{tool}.sum} and @file{@var{tool}.log}
The master config file is where all the target specific config variables
get set for a whole site get set. The idea is that for a centralized
testing lab where people have to share a target between multiple
-developers. There are settings for both remote targets and remote hosts.
+developers. There are settings for both remote targets and remote hosts.
Here's an example of a Master Config File (also called the Global config
file) for a @emph{canadian cross}. A canadian cross is when you build
and test a cross compiler on a machine other than the one it's to be
@end cartouche
In the second section, you can override any default values (locally to
-DejaGnu) for all the variables. The
+DejaGnu) for all the variables. The
second section can also contain your preferred defaults for all the
command line options to @code{runtest}. This allows you to easily
customize @code{runtest} for your preferences in each configured
with the ones that FAIL. I also set @var{RLOGIN} and @code{RSH} to the
BSD version. I have @code{kerberos} installed, and when I rlogin to a
target board, it usually isn't supported. So I use the non secure
-versions of these programs rather than the default that's in my path.
+versions of these programs rather than the default that's in my path.
@node Internals
@chapter The DejaGnu Implementation
@}
@end smallexample
@end cartouche
-
+
It is always a good idea to first check the variable, and only set it if
it has not yet been defined. Often the proper value of @code{AR} is set
on the command line that invokes @file{runtest}.
@item pass "@var{string}"
@cindex test case, declaring success
-Declares a test to have passed. @code{pass} writes in the
+Declares a test to have passed. @code{pass} writes in the
log files a message beginning with @samp{PASS}
(or @code{XPASS}/@code{KPASS}, if failure was expected),
appending the argument @var{string}.
@item fail "@var{string}"
@cindex test case, declaring failure
-Declares a test to have failed. @code{fail} writes in the
+Declares a test to have failed. @code{fail} writes in the
log files a message beginning with @samp{FAIL} (or @code{XFAIL}, if
failure was expected), appending the argument @var{string}.
otherwise the result is @code{0}. @var{host} must be a full three-part
@code{configure} host name; in particular, you may not use the shorter
nicknames supported by @code{configure} (but you can use wildcard
-characters, using shell syntax, to specify sets of names).
+characters, using shell syntax, to specify sets of names).
@item istarget "@var{target}"
@cindex target configuration test
either case, it then looks in the current directory for a directory
called @code{lib}. If there are duplicate definitions, the last one
loaded takes precedence over the earlier ones.
-
+
@item setup_xfail "@var{config} @r{[}@var{bugid}@r{]}"
@c two spaces above to make it absolutely clear there's whitespace---a
@c crude sort of italic correction!
(@pxref{Overview,, Overview, gnats.info, Tracking Bugs With GNATS}).
See notes under setup_kfail (below).
-
+
@item setup_kfail "@var{config} @r{[}@var{bugid}@r{]}"
@c two spaces above to make it absolutely clear there's whitespace---a
@c crude sort of italic correction!
overlooked.
@emph{Warning:} you must clear the expected/known failure after using
-@code{setup_xfail} or @code{setup_kfail} in a test case. Any call to
+@code{setup_xfail} or @code{setup_kfail} in a test case. Any call to
@code{pass} or @code{fail} clears the expectedknown failure implicitly;
if the test has some other outcome, e.g. an error, you can call
@code{clear_xfail} to clear the expected failure or @code{clear_kfail}
"sparc*-sun*-* *-pc-*-*" \
@{@"-Wall -v" "-O3"@}@ \
@{@"-O1" "-Map" @}@ \
- @}@
+ @}@
@end smallexample
@end cartouche
- What this does is it matches only for these two targets if "-Wall -v" or
+ What this does is it matches only for these two targets if "-Wall -v" or
"-O3" is set, but neither "-O1" or "-Map" is set.
For a set to match, the options specified are searched for independantly of
Search @var{runtests} for @var{testcase} and return 1 if found, 0 if not.
@var{runtests} is a list of two elements. The first is a copy of what was
on the right side of the @code{=} if @samp{foo.exp="@dots{}"} was specified,
-or an empty string if no such argument is present. The second is the
+or an empty string if no such argument is present. The second is the
pathname of the current testcase under consideration.
This is used by tools like compilers where each testcase is a file.
@c FIXME: finish these when the code is fixed.
@c @item watcharray @emph{element} @emph{type}
@c @cindex Set a watchpoint on an array
-@c This sets an watchpoint of the @emph{element-type} on the
+@c This sets an watchpoint of the @emph{element-type} on the
@c @item watchvar v null type
@c @cindex Set a watchpoint on a variable
Running ./gdb.t10/crossload.exp ...
PASS: m68k-elf (elf-big) explicit format; loaded
XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed
-C types
+C types
=== gdb Summary ===
# of expected passes 5
# of expected failures 1
For every unsuccessful match, @code{expect} issues a @samp{no} after
this message; if other patterns are specified for the same
@code{expect} command, they are reflected also, but without the first
-part of the message (@samp{expect@dots{}match pattern}).
+part of the message (@samp{expect@dots{}match pattern}).
When @code{expect} finds a match, the log for the successful match ends
with @samp{yes}, followed by a record of the @code{expect} variables set
@{command@}? no
break gdbme.c:34
Breakpoint 8 at 0x23d8: file gdbme.c, line 34.
-(gdb) expect: does @{break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
+(gdb) expect: does @{break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
file gdbme.c, line 34.\r\n(gdb) @} (spawn_id 6) match pattern
@{Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $@}? yes
expect: set expect_out(0,start) @{18@}
Interspersed tool output. The beginning of the log entry for the second
attempted match may be hard to spot: this is because the prompt
@samp{(gdb) } appears on the same line, just before the @samp{expect:}
-that marks the beginning of the log entry.
+that marks the beginning of the log entry.
@item
Fail-safe patterns. Many of the patterns tested are fail-safe patterns
Writing the complete suite of C tests, then, consisted of these steps:
@enumerate
-@item
+@item
@cindex Granlund, Torbjorn
@cindex C torture test
Copying all the C code into the test directory. These tests were based on
@code{make} and @code{configure} next run, they include the new directory.
@item
-Add the new test case to the directory, as above.
+Add the new test case to the directory, as above.
@item
To add support in the new directory for configure and make, you must
If you have trouble understanding why a pattern does not match the
program output, try using the @samp{--debug} option to @code{runtest},
-and examine the debug log carefully. @xref{Debug,,Debug Log}.
+and examine the debug log carefully. @xref{Debug,,Debug Log}.
Be careful not to neglect output generated by setup rather than by the
interesting parts of a test case. For example, while testing @sc{gdb},
@item expect_out(buffer)
@cindex last command output
The output from the last command. This is an internal variable set by
-@code{expect}.
+@code{expect}.
@item exec_output
This is the output from a @code{@var{tool}_load} command. This only
@end ftable
@node Extending
-@chapter New Tools, Targets, or Hosts
+@chapter New Tools, Targets, or Hosts
The most common ways to extend the DejaGnu framework are: adding a suite
of tests for a new tool to be tested; adding support for testing on a
@smallexample
check: site.exp all
$(RUNTEST) $(RUNTESTFLAGS) $(FLAGS_TO_PASS) \
- --tool @var{example} --srcdir $(srcdir)
+ --tool @var{example} --srcdir $(srcdir)
@end smallexample
@end cartouche
@item
Make an init file in this directory; its name must start with the
-@code{target_abbrev} value, so call it @file{config/unix.exp}.
+@code{target_abbrev} value, so call it @file{config/unix.exp}.
This is the file that contains the target-dependent procedures;
fortunately, most of them do not have to do very much in order for
@code{runtest} to run.
Most of the work is in getting the communications right. Communications
code (for several situations involving IP networks or serial lines) is
available in a DejaGnu library file, @file{lib/remote.exp}.
-@xref{DejaGnu Builtins,,DejaGnu Builtins}.
+@xref{DejaGnu Builtins,,DejaGnu Builtins}.
@c FIXME! Say something about Tcl debugger here.
If you suspect a communication problem, try running the connection
URL="mailto:deja@welcomehome.org">Deja Snow Savoye</ulink>
(now 13 years old as of September 2003), who was a toddler
during DejaGnu's beginnings.</para>
-
+
<para>DejaGnu offers several advantages for testing:</para>
<itemizedlist mark="bullet" spacing="compact">
<sect1 id=new xreflabel="Release Notes">
<title>What's New In This Release</title>
-
+
<para>This release has a number of substantial changes over version
1.3. The most visible change is that the version of Expect and Tcl
included in the release are up-to-date with the current stable net
<sect2 id=cygwin xreflabel="Windows Support">
<title>Windows Support</title>
-
+
<para>To use DejaGnu on Windows, you need to first install the
<ulink URL="http://www.cygwin.com/">Cygwin</ulink>
release. This works as of the B20.1 release. Cygwin is a POSIX
These definitions specify the output of a test
case:</para>
- <variablelist>
+ <variablelist>
<varlistentry>
<term>PASS</term>
<listitem><para>A test has succeeded. That is, it demonstrated that
the assertion is true.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>XFAIL</term>
<listitem><para>POSIX 1003.3 does not incorporate the notion of
<emphasis>PASS</emphasis> is in some sense more ambiguous than if
<emphasis>XPASS</emphasis> is also used.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>FAIL</term>
<listitem><para>A test has produced the bug it was intended to
<emphasis>FAIL</emphasis> rather than <emphasis>XFAIL</emphasis> even
if a failure was expected.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>UNRESOLVED</term>
<listitem><para>A test produced indeterminate results. Usually, this
</itemizedlist>
<variablelist>
- <varlistentry>
+ <varlistentry>
<term>UNTESTED</term>
<listitem><para>A test was not run. This is a place-holder, used
when there is no real test case yet.</para></listitem>
conditional:</para>
<variablelist>
- <varlistentry>
+ <varlistentry>
<term>UNSUPPORTED</term>
<listitem><para>There is no support for the tested case. This may
mean that a conditional feature of an operating system, or of a
test for the system subroutine <emphasis>gethostname</emphasis>
would never work on a target board running only a boot
monitor.</para></listitem>
- </varlistentry>
+ </varlistentry>
</variablelist>
-
+
<para>DejaGnu uses the same output procedures to produce these messages
for all testsuites and these procedures are already known to conform
to POSIX 1003.3. For a DejaGnu testsuite to conform to POSIX 1003.3,
</sect1>
</chapter>
-
+
<!-- include the user manual -->
&user;
# The flags to pass to runtest
RUNTESTFLAGS =
- # Execute the tests
+ # Execute the tests
check: site.exp all
$(RUNTEST) $(RUNTESTFLAGS) \
--tool <SPAN
CLASS="SYMBOL"
>${example}</SPAN
-> --srcdir $(srcdir)
+> --srcdir $(srcdir)
# Make the local config file
site.exp: ./config.status Makefile
><TD
><PRE
CLASS="PROGRAMLISTING"
->
+>
proc foo_exit {} {}
proc foo_version {} {}
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
failed. <TT
CLASS="FUNCTION"
>xfail</TT
->
+>
writes in the log files a message beginning with
<I
CLASS="EMPHASIS"
>Compile Procedure</A
></H3
><P
->This invokes the compiler as set by CC to compile the
+>This invokes the compiler as set by CC to compile the
file <TT
CLASS="FILENAME"
>file</TT
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
>, and <TT
CLASS="OPTION"
>--version</TT
->, each
+>, each
command line option has an associated Tcl variable. Use the
Tcl <B
CLASS="COMMAND"
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
>site.exp</TT
> file.</P
><P
->You can usually generate or update the testsuite's local
+>You can usually generate or update the testsuite's local
<TT
CLASS="FILENAME"
>site.exp</TT
><TD
><PRE
CLASS="PROGRAMLISTING"
->
+>
## these variables are automatically generated by make ##
# Do not edit here. If you wish to override these values
# add them to the last section
set tmpdir /build/devo-builds/i586-pc-linux-gnulibc1/gcc/testsuite
set srcdir "${srcdir}/testsuite"
## All variables above are generated by configure. Do Not Edit ##
-
+
</PRE
></TD
></TR
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
>, <B
CLASS="COMMAND"
>tip</B
->,
+>,
<B
CLASS="COMMAND"
>kermit</B
>, and <B
CLASS="COMMAND"
>mondfe</B
-> for remote
+> for remote
communications.</P
></DIV
><DIV
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt:~/dejagnu.test$ runtest
-WARNING: Couldn't find the global config file.
-WARNING: No tool specified Test
+>dgt:~/dejagnu.test$ runtest
+WARNING: Couldn't find the global config file.
+WARNING: No tool specified Test
Run By dgt on Sun Nov 25 17:07:03 2001 Native configuration is i586-pc-linux-gnu
=== tests ===
Schedule of variations: unix
-Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
-Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
+Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
+Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
ERROR: Couldn't find tool config file for unix.
=== Summary ===</PRE
></TD
>Getting the source code for the calc example</A
></H2
><P
->If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples.
-These examples seem to be missing in RedHat's RPM.
+>If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples.
+These examples seem to be missing in RedHat's RPM.
In this case download the sources of DejaGnu and adjust the pathes to the DejaGnu examples accordingly.</P
></DIV
></DIV
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
FAIL: help run "r" abbreviation
Running ./gdb.t10/crossload.exp ...
PASS: m68k-elf (elf-big) explicit format; loaded
- XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types
+ XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types
=== gdb Summary ===
# of expected passes 5
# of expected failures 1
{command}? no
break gdbme.c:34
Breakpoint 8 at 0x23d8: file gdbme.c, line 34.
- (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
+ (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
file gdbme.c, line 34.\r\n(gdb) } (spawn_id 6) match pattern
{Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $}? yes
expect: set expect_out(0,start) {18}
output. <SPAN
CLASS="PRODUCTNAME"
>Expect</SPAN
-> begins
+> begins
attempting to match the patterns supplied immediately; often,
the first pass is against incomplete output (or completely
before all output, as in this case).</P
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
>You can use the option <I
CLASS="EMPHASIS"
>--srcdir</I
-> to point to
+> to point to
some other directory containing a collection of tests:</P
><TABLE
BORDER="0"
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
>Create a minimal project, e.g. calc</A
></H1
><P
->In this section you will to start a small project,
+>In this section you will to start a small project,
using the sample application calc, which is part of your DejaGnu distribution</P
><DIV
CLASS="SECT2"
><TD
><PRE
CLASS="PROGRAMLISTING"
->set tool calc
-set srcdir .
+>set tool calc
+set srcdir .
set objdir /home/dgt/dejagnu.test</PRE
></TD
></TR
></TR
></TABLE
><P
->autoconf is another part of the auto-tools.
+>autoconf is another part of the auto-tools.
Run it to generate configure based on information contained in configure.in.</P
><TABLE
BORDER="0"
></TR
></TABLE
><P
->autoheader is another part of the auto-tools.
+>autoheader is another part of the auto-tools.
Run it to generate calc.h.in. </P
><TABLE
BORDER="0"
></TR
></TABLE
><P
->The Makefile.am of this example was developed as port of the DejaGnu
-distribution.
-Adapt Makefile.am for this test. Replace the line
-“#noinst_PROGRAMS = calc” to
-“bin_PROGRAMS = calc”.
+>The Makefile.am of this example was developed as port of the DejaGnu
+distribution.
+Adapt Makefile.am for this test. Replace the line
+“#noinst_PROGRAMS = calc” to
+“bin_PROGRAMS = calc”.
Change the RUNTESTDEFAULTFLAGS from
-“$$srcdir/testsuite” to
+“$$srcdir/testsuite” to
“./testsuite”.</P
><P
>Running automake at this point contains a series of warning in its output as shown in the following example:</P
><PRE
CLASS="PROGRAMLISTING"
>dgt:~/dejagnu.test$ automake --add-missing
-automake: configure.in: installing `./install-sh'
-automake: configure.in: installing `./mkinstalldirs'
-automake: configure.in: installing `./missing'
-automake: Makefile.am: installing `./INSTALL'
-automake: Makefile.am: required file `./NEWS' not found
-automake: Makefile.am: required file `./README' not found
-automake: Makefile.am: installing `./COPYING'
-automake: Makefile.am: required file `./AUTHORS' not found
-automake: Makefile.am: required file `./ChangeLog' not found
-configure.in: 4: required file `./calc.h.in' not found
+automake: configure.in: installing `./install-sh'
+automake: configure.in: installing `./mkinstalldirs'
+automake: configure.in: installing `./missing'
+automake: Makefile.am: installing `./INSTALL'
+automake: Makefile.am: required file `./NEWS' not found
+automake: Makefile.am: required file `./README' not found
+automake: Makefile.am: installing `./COPYING'
+automake: Makefile.am: required file `./AUTHORS' not found
+automake: Makefile.am: required file `./ChangeLog' not found
+configure.in: 4: required file `./calc.h.in' not found
Makefile.am:6: required directory ./doc does not exist</PRE
></TD
></TR
></TABLE
></DIV
><P
->Create a empty directory doc and empty files
-INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING.
+>Create a empty directory doc and empty files
+INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING.
The default COPYING will point to the GNU Public License (GPL).
In a real project it would be time to add some meaningfull text in each file.</P
><P
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt:~/dejagnu.test$ ./configure
-creating cache ./config.cache
-checking whether to enable maintainer-specific portions of Makefiles... no
-checking for a BSD compatible install... /usr/bin/install -c
-checking whether build environment is sane... yes
-checking whether make sets ${MAKE}... yes
-checking for working aclocal... found
-checking for working autoconf... found
-checking for working automake... found
-checking for working autoheader... found
-checking for working makeinfo... found
-checking for gcc... gcc checking whether the C compiler (gcc ) works... yes
-checking whether the C compiler (gcc ) is a cross-compiler... no
+>dgt:~/dejagnu.test$ ./configure
+creating cache ./config.cache
+checking whether to enable maintainer-specific portions of Makefiles... no
+checking for a BSD compatible install... /usr/bin/install -c
+checking whether build environment is sane... yes
+checking whether make sets ${MAKE}... yes
+checking for working aclocal... found
+checking for working autoconf... found
+checking for working automake... found
+checking for working autoheader... found
+checking for working makeinfo... found
+checking for gcc... gcc checking whether the C compiler (gcc ) works... yes
+checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
-checking whether gcc accepts -g... yes
-checking for a BSD compatible install... /usr/bin/install -c
-checking how to run the C preprocessor... gcc -E
-checking for stdlib.h... yes
-checking for strcmp... yes
-updating cache ./config.cache
-creating ./config.status
+checking whether gcc accepts -g... yes
+checking for a BSD compatible install... /usr/bin/install -c
+checking how to run the C preprocessor... gcc -E
+checking for stdlib.h... yes
+checking for strcmp... yes
+updating cache ./config.cache
+creating ./config.status
creating Makefile creating calc.h</PRE
></TD
></TR
></TABLE
></DIV
><P
->If you are familiar with GNU software,
-this output should not contain any surprise to you.
+>If you are familiar with GNU software,
+this output should not contain any surprise to you.
Any errors should be easy to fix for such a simple program.</P
><P
>Build the calc executable:</P
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt:~/dejagnu.test$ make
-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
+>dgt:~/dejagnu.test$ make
+gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
gcc -g -O2 -o calc calc.o</PRE
></TD
></TR
></TABLE
></DIV
><P
->You prepared a few files and then called some commands.
+>You prepared a few files and then called some commands.
Respecting the right order assures a automatic and correctly compiled calc program. The following example resumes the correct order.</P
><DIV
CLASS="EXAMPLE"
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt:~/dejagnu.test$ ./calc
-calc: version
-Version: 1.1
+>dgt:~/dejagnu.test$ ./calc
+calc: version
+Version: 1.1
calc:<I
CLASS="EMPHASIS"
> </I
->add 3 4
-7
+>add 3 4
+7
calc: multiply 3 4<I
CLASS="EMPHASIS"
> </I
>
-12
+12
calc: multiply 2 4<I
CLASS="EMPHASIS"
> </I
>
-12
+12
calc: quit </PRE
></TD
></TR
><P
>Look at the intentional bug that 2 times 4 equals 12.</P
><P
->The tests run by DejaGnu need a file called site.exp,
-which is automatically generated if we call “make site.exp”.
+>The tests run by DejaGnu need a file called site.exp,
+which is automatically generated if we call “make site.exp”.
This was the purpose of the “AUTOMAKE_OPTIONS = dejagnu” in Makefile.am.</P
><DIV
CLASS="EXAMPLE"
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt: make site.exp
-dgt:~/dejagnu.test$ make site.exp
+>dgt: make site.exp
+dgt:~/dejagnu.test$ make site.exp
Making a new site.exp file...</PRE
></TD
></TR
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt:~/dejagnu.test$ make check
-make check-DEJAGNU
-make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \
-EXPECT=expect; export EXPECT; \ runtest=runtest; \
+>dgt:~/dejagnu.test$ make check
+make check-DEJAGNU
+make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \
+EXPECT=expect; export EXPECT; \ runtest=runtest; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
-$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \
-else echo "WARNING: could not find \`runtest'" 1>&2; :;\
-fi
-WARNING: Couldn't find the global config file.
-WARNING: Couldn't find tool init file
-Test Run By dgt on Sun Nov 25 21:42:21 2001
+$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \
+else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+fi
+WARNING: Couldn't find the global config file.
+WARNING: Couldn't find tool init file
+Test Run By dgt on Sun Nov 25 21:42:21 2001
Native configuration is i586-pc-linux-gnu
=== calc tests ===
-Schedule of variations:
+Schedule of variations:
unix
-Running target unix
-Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
-Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
+Running target unix
+Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
+Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./testsuite/config/unix.exp as tool-and-target-specific interface file.
-Running ./testsuite/calc.test/calc.exp ...
+Running ./testsuite/calc.test/calc.exp ...
FAIL: multiply2 (bad match)
=== calc Summary ===
-# of expected passes 5
-# of unexpected failures 1
+# of expected passes 5
+# of unexpected failures 1
/home/Dgt/dejagnu.test/calc version Version: 1.1
-make[1]: *** [check-DEJAGNU] Fehler 1
+make[1]: *** [check-DEJAGNU] Fehler 1
make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler 2</PRE
></TD
></TR
><P
>Did you see the line “FAIL:“? The test cases for calc catch the bug in the calc.c file. Fix the error in calc.c later as the following examples assume a unchanged calc.c.</P
><P
->Examine the output files calc.sum and calc.log.
+>Examine the output files calc.sum and calc.log.
Try to understand the testcases written in ~/dejagnu.test/testsuite/calc.test/calc.exp.
To understand Expect you might take a look at the book "Exploring Expect",
-which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2)
-The book contains hundreds of examples and also includes a tutorial on Tcl.
+which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2)
+The book contains hundreds of examples and also includes a tutorial on Tcl.
Exploring Expect is 602 pages long. </P
></DIV
><DIV
></TR
></TABLE
><P
->Rerun make check. Test whether the output contains "I am ~/.dejagnurc".
+>Rerun make check. Test whether the output contains "I am ~/.dejagnurc".
Create ~/my_dejagnu.exp and insert the following line:</P
><TABLE
BORDER="0"
></TR
></TABLE
><P
->Run “make check” again. The output should not contain
-“WARNING: Couldn't find the global config file.”.
+>Run “make check” again. The output should not contain
+“WARNING: Couldn't find the global config file.”.
Create the sub-directory lib. Create the file “calc.exp” in it and insert the following line:</P
><TABLE
BORDER="0"
></TR
></TABLE
><P
->The last warning “WARNING: Couldn't find tool init file”
-should not be part of the output of make check.
+>The last warning “WARNING: Couldn't find tool init file”
+should not be part of the output of make check.
Create the directory ˜/boards. Create the file ˜/boards/standard.exp and insert the following line:</P
><TABLE
BORDER="0"
><TD
><PRE
CLASS="PROGRAMLISTING"
->dgt:~/dejagnu.test$ make check
+>dgt:~/dejagnu.test$ make check
<...>
-fi
-I am ~/.dejagnurc
-I am ~/my_dejagnu.exp
-I am lib/calc.exp
-Test Run By dgt on Sun Nov 25 22:19:14 2001
+fi
+I am ~/.dejagnurc
+I am ~/my_dejagnu.exp
+I am lib/calc.exp
+Test Run By dgt on Sun Nov 25 22:19:14 2001
Native configuration is i586-pc-linux-gnu
=== calc tests ===
Using /home/Dgt/boards/standard.exp as standard board description\
-file for build.
-I am ~/boards/standard.exp
+file for build.
+I am ~/boards/standard.exp
Using /home/Dgt/boards/standard.exp as standard board description\
- file for host.
-I am ~/boards/standard.exp
+ file for host.
+I am ~/boards/standard.exp
-Schedule of variations:
+Schedule of variations:
unix
-Running target unix
+Running target unix
Using /home/Dgt/boards/standard.exp as standard board description\
- file for target.
-I am ~/boards/standard.exp
+ file for target.
+I am ~/boards/standard.exp
Using /usr/share/dejagnu/baseboards/unix.exp as board description file\
-for target.
+for target.
<...></PRE
></TD
></TR
></DIV
><P
>It is up to you to decide when and where to use any of the above
-mentioned config files for customizing.
-This chapters showed you where and in which order the different config
+mentioned config files for customizing.
+This chapters showed you where and in which order the different config
files are run.</P
></DIV
><DIV
></H2
><P
>This test checks, whether the built-in shell command “echo Hello world”
- will really write “Hello world” on the console.
-Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
+ will really write “Hello world” on the console.
+Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
It should contain the following lines</P
><DIV
CLASS="EXAMPLE"
><TD
><PRE
CLASS="PROGRAMLISTING"
->set test "Local Hello World"
-send "echo Hello World"
-expect {
- -re "Hello World" { pass "$test" }
+>set test "Local Hello World"
+send "echo Hello World"
+expect {
+ -re "Hello World" { pass "$test" }
}</PRE
></TD
></TR
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
><P
>Testing remote targets is a lot trickier especially if you are using an
embedded target
-which has no built in support for things like a compiler, ftp server or a Bash-shell.
+which has no built in support for things like a compiler, ftp server or a Bash-shell.
Before you can test calc on a remote target you have to acquire a few basics skills.</P
><DIV
CLASS="SECT2"
>Setup telnet to your own host</A
></H2
><P
->The easiest remote host is usually the host you are working on.
-In this example we will use telnet to login in your own workstation.
-For security reason you should never have a telnet deamon running on
+>The easiest remote host is usually the host you are working on.
+In this example we will use telnet to login in your own workstation.
+For security reason you should never have a telnet deamon running on
machine connected on the internet, as password and usernames are transmitted
- in clear text.
+ in clear text.
We assume you know how to setup your machine for a telnet daemon.</P
><P
->Next try whether you may login in your own host by issuing the
-command “telnet localhost.1”. In order to be able to
+>Next try whether you may login in your own host by issuing the
+command “telnet localhost.1”. In order to be able to
distinguish between a normal session an a telnet login add the following lines to /home/dgt/.bashrc.</P
><TABLE
BORDER="0"
><PRE
CLASS="PROGRAMLISTING"
>if [ "$REMOTEHOST" ]
-then
- PS1='remote:\w\$ '
+then
+ PS1='remote:\w\$ '
fi</PRE
></TD
></TR
><PRE
CLASS="PROGRAMLISTING"
>dgt:~/dejagnu.test$ telnet localhost
-Trying 127.0.0.1...
-Connected to 127.0.0.1.
-Escape character is '^]'.
-Debian GNU/Linux testing/unstable Linux
+Trying 127.0.0.1...
+Connected to 127.0.0.1.
+Escape character is '^]'.
+Debian GNU/Linux testing/unstable Linux
K6Linux login: dgt
-Password:
-Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4
-Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown
-No mail.
+Password:
+Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4
+Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown
+No mail.
remote:~$ exit
-logout
+logout
Connection closed by foreign host.</PRE
></TD
></TR
>A test case for login via telnet</A
></H2
><P
->In order to define a correct setup we have add a line containing
-“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp.
+>In order to define a correct setup we have add a line containing
+“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp.
In ~/boards/standard.exp add the following four lines to define a few patterns for the DejaGnu telnet login procedure.</P
><DIV
CLASS="EXAMPLE"
><TD
><PRE
CLASS="PROGRAMLISTING"
->set_board_info shell_prompt "remote:"
-set_board_info telnet_username "dgt"
-set_board_info telnet_password "top_secret"
+>set_board_info shell_prompt "remote:"
+set_board_info telnet_username "dgt"
+set_board_info telnet_password "top_secret"
set_board_info hostname "localhost" </PRE
></TD
></TR
></TABLE
></DIV
><P
->As DejaGnu will be parsing the telnet session output for some well
-known pattern the output there are a lot of things that can go wrong.
+>As DejaGnu will be parsing the telnet session output for some well
+known pattern the output there are a lot of things that can go wrong.
If you have any problems verify your setup:</P
><P
></P
></LI
></UL
><P
->To test the login via telnet write a sample test case.
-Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and
+>To test the login via telnet write a sample test case.
+Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and
add the following few lines:</P
><DIV
CLASS="EXAMPLE"
><PRE
CLASS="PROGRAMLISTING"
>puts "this is remote_echo.exp target for $target "
-target_info $target
-#set verbose 9
-set shell_id [remote_open $target]
-set test "Remote login to $target"
+target_info $target
+#set verbose 9
+set shell_id [remote_open $target]
+set test "Remote login to $target"
#set verbose 0
puts "Spawn id for remote shell is $shell_id"
-if { $shell_id > 0 } {
- pass "$test"
-} else {
- fail "Remote open to $target"
+if { $shell_id > 0 } {
+ pass "$test"
+} else {
+ fail "Remote open to $target"
}</PRE
></TD
></TR
><TD
><PRE
CLASS="PROGRAMLISTING"
->Running ./testsuite/calc.test/local_echo.exp ...
-Running ./testsuite/calc.test/remote_echoo.exp ...
-this is remote_echo.exp target is unix
+>Running ./testsuite/calc.test/local_echo.exp ...
+Running ./testsuite/calc.test/remote_echoo.exp ...
+this is remote_echo.exp target is unix
Spawn id for remote shell is exp7</PRE
></TD
></TR
>Remote testing “Hello world”</A
></H2
><P
->Next you will transform the above “hello world” example to
-its remote equivalent.
+>Next you will transform the above “hello world” example to
+its remote equivalent.
This can be done by adding the following lines to our file remote_echo.exp.</P
><DIV
CLASS="EXAMPLE"
><TD
><PRE
CLASS="PROGRAMLISTING"
->set test "Remote_send Hello World"
+>set test "Remote_send Hello World"
set status [remote_send $target "echo \"Hello World\"\n" ]
pass "$test"
-set test "Remote_expect Hello World"
-remote_expect $target 5 {
- -re "Hello World" { pass "$test" }
+set test "Remote_expect Hello World"
+remote_expect $target 5 {
+ -re "Hello World" { pass "$test" }
}</PRE
></TD
></TR
><P
>Have a look at the procedures in /usr/share/dejagnu/remote.exp to have an overview of the offered procedures and their features. </P
><P
->Now setup a real target.
-In the following example we assume as target a PowerBook running Debian.
-As above add a test user "dgt", install telnet and FTP servers.
-In order to distinguish it from the host add the line
+>Now setup a real target.
+In the following example we assume as target a PowerBook running Debian.
+As above add a test user "dgt", install telnet and FTP servers.
+In order to distinguish it from the host add the line
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
></TD
></TR
></TABLE
-> to /home/dgt/.bash_profile.
-Also add a corresponding entry "powerbook" to /etc/hosts and verify that you
+> to /home/dgt/.bash_profile.
+Also add a corresponding entry "powerbook" to /etc/hosts and verify that you
are able to ping, telnet and ftp to the target "powerbook".</P
><P
>In order to let runtest run its test on the "powerbook" target change the following lines in ~/boards/standard.exp:</P
></TABLE
></DIV
><P
->After running runtest again, check whether the file dejagnu2 exists on the target.
+>After running runtest again, check whether the file dejagnu2 exists on the target.
This example will only work if the rcp command works with your target.
-If you have a working FTP-server on the target you can use it by adding the
+If you have a working FTP-server on the target you can use it by adding the
following lines to ~/boards/standard.exp:</P
><DIV
CLASS="EXAMPLE"
></H2
><P
>For crosscompiling you need working binutils, gcc and a base library like
-libc or glib for your target.
-It is beyond the scope of this document to describe how to get it working.
+libc or glib for your target.
+It is beyond the scope of this document to describe how to get it working.
The following examples assume a cross compiler for PowerPC which is called linux-powerpc-gcc.</P
><P
>Add AC_CANONICAL_TARGET in dejagnu.test/configure.in at the following location. Copy config.guess from /usr/share/automake to dejagnu.test.</P
><PRE
CLASS="PROGRAMLISTING"
>AM_CONFIG_HEADER(calc.h)
-AC_CANONICAL_TARGET([])
+AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE(calc, 1.1)</PRE
></TD
></TR
></TABLE
><P
->You need to run automake 2.5 or later.
-Depending on your installation calling autoconf2.5 instead of autoconf is not needed.
+>You need to run automake 2.5 or later.
+Depending on your installation calling autoconf2.5 instead of autoconf is not needed.
The sequence to regenerate all files is:</P
><DIV
CLASS="EXAMPLE"
>$ autoconf2.5
$ autoheader
$ automake
-$ ./configure --host=powerpc-linux --target=powerpc-linux
+$ ./configure --host=powerpc-linux --target=powerpc-linux
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... ./config.guess: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one
$ cp /usr/share/automake/config.guess .
-$ ./configure --host=powerpc-linux --target=powerpc-linux
+$ ./configure --host=powerpc-linux --target=powerpc-linux
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used. \
checking build system type... i586-pc-linux-gnu
><PRE
CLASS="PROGRAMLISTING"
>$ make
-powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
+powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
powerpc-linux-gcc -g -O2 -o calc calc.o </PRE
></TD
></TR
></DIV
></BODY
></HTML
->
\ No newline at end of file
+>
<sect1 id=installation xreflabel="Installation">
<title>Installation</title>
-
+
<para>Once you have the DejaGnu source unpacked and available, you must
first configure the software to specify where it is to run (and the
associated defaults); then you can proceed to installing it.</para>
suites.</para>
</sect2>
-
+
<sect2 id=installing xreflabel="Installing DejaGnu">
<title>Installing DejaGnu</title>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>open_logs</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>close_logs</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
passed a NULL string, then it returns the name of the build canonical
configuration.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>isbuild</function></funcdef>
<paramdef><parameter>pattern</parameter</paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>is_remote</function></funcdef>
<paramdef><parameter>board</parameter</paramdef>
</funcsynopsis>
the result is <emphasis>1</emphasis>; otherwise the result is
<emphasis>0</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>is3way</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
shorter nicknames supported by configure (but you can use wildcard
characters, using shell syntax, to specify sets of names).</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>ishost</function></funcdef>
<paramdef><parameter>pattern</parameter></paramdef>
</funcsynopsis>
<emphasis>NULL</emphasis> string, then it returns the name of the
build canonical configuration.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>istarget</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
a <emphasis>1</emphasis>; otherwise it returns a
<emphasis>0</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>isnative</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unknown</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>clone_output</function></funcdef>
<paramdef><parameter>message</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>reset_vars</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>log_and_exit</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>log_summary</function></funcdef>
<paramdef><parameter>args</parameter</paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>cleanup</function></funcdef>
<paramdef><parameter></parameter</paramdef>
</funcsynopsis>
applies to whatever test runs next, leading to surprising
results.</para></warning>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>setup_xfail</function></funcdef>
<paramdef><parameter>config</parameter>
<parameter>bugid</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>record_test</function></funcdef>
<paramdef><parameter>type</parameter>
<parameter>message</parameter>
was expected), appending the argument
<parameter>string</parameter>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>pass</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
writes in the log files a message beginning with
<emphasis>FAIL</emphasis> (or <emphasis>XFAIL</emphasis>, if failure
was expected), appending the argument
- <parameter>string</parameter>.</para>
+ <parameter>string</parameter>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>fail</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
was expected), appending the argument
<parameter>string</parameter>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>xpass</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
<title>Xfail Procedure</title>
<para>Declares a test to have expectably
- failed. <function>xfail</function>
+ failed. <function>xfail</function>
writes in the log files a message beginning with
<emphasis>XFAIL</emphasis> (or <emphasis>PASS</emphasis>, if success
was expected), appending the argument
<parameter>string</parameter>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>xpass</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
<emphasis>PASS</emphasis> or <emphasis>FAIL</emphasis> into an
<emphasis>UNRESOLVED</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>set_warning_threshold</function></funcdef>
<paramdef><parameter>threshold</parameter></paramdef>
</funcsynopsis>
value controls how many <function>warning</function> procedures can
be called before becoming <emphasis>UNRESOLVED</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>get_warning_threshold</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
is <emphasis>0</emphasis>, then there are no further side effects to
calling this function, and the following test outcome doesn't become
<emphasis>UNRESOLVED</emphasis>. This can be used for errors with no
- known side effects.</para>
+ known side effects.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>warning</function></funcdef>
<paramdef><parameter>string</parameter>
<parameter>number</parameter>
doesn't become <emphasis>UNRESOLVED</emphasis>. This can be used for
errors with no known side effects.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>perror</function></funcdef>
<paramdef><parameter>string</parameter>
<parameter>number</parameter>
such messages, but in cases where a message is needed in the log file
regardless of the verbosity level use <function>note</function>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>note</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
might use this in a dummy test whose only role is to record that a test
does not yet exist for some feature.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>untested</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
not execute as expected, and a human being must go over results to
determine if it passed or failed (and to improve the test case).</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unresolved</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
writes in the log file a message beginning with
<emphasis>UNSUPPORTED</emphasis>, appending the argument string.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unsupported</function></funcdef>
<paramdef><parameter>string</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>init_testcounts</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>incr_count</function></funcdef>
<paramdef><parameter>name</parameter>
<parameter>args</parameter></paramdef>
tools are installed using the same naming conventions: For example,
for a cross compiler supporting the <emphasis>m68k-vxworks</emphasis>
configuration, the result of transform <command>gcc</command> is
- <command>m68k-vxworks-gcc</command>.</para>
+ <command>m68k-vxworks-gcc</command>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>transform</function></funcdef>
<paramdef><parameter>toolname</parameter></paramdef>
</funcsynopsis>
<varlistentry>
<term><parameter>toolname</parameter></term>
<listitem><para>The name of the cross-development program to
- transform.</para></listitem>
+ transform.</para></listitem>
</varlistentry>
</variablelist>
</sect3>
conditional is true, or <emphasis>0</emphasis> if the conditional is
false.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>check_conditional_xfail</function></funcdef>
<paramdef><parameter>message</parameter>
<parameter>targets</parameter>
<listitem><para>This is a list of sets of options to search for in
the compiler options to activate this conditional. If any set of
the options matches, (regardless of whether any of the include sets
- match) then this conditional is de-activated.</para></listitem>
+ match) then this conditional is de-activated.</para></listitem>
</varlistentry>
</variablelist>
of configuration target names. It is only necessary to call
<command>clear_xfail</command> if a test case ends without calling
either <command>pass</command> or <command>fail</command>, after
- calling <command>setup_xfail</command>.</para>
+ calling <command>setup_xfail</command>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>clear_xfail</function></funcdef>
<paramdef><parameter>config</parameter></paramdef>
</funcsynopsis>
to print string without a trailing newline. Use the optional
<option>--</option> argument if string begins with "-".</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>verbose</function></funcdef>
<paramdef><parameter>-log</parameter>
<parameter>-x</parameter>
duplicate definitions, the last one loaded takes precedence over the
earlier ones.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>load_lib</function></funcdef>
<paramdef><parameter>filespec</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>call_remote</function></funcdef>
<paramdef><parameter>type</parameter>
<parameter>proc</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>check_for_board_status</function></funcdef>
<paramdef><parameter>variable</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>file_on_build</function></funcdef>
<paramdef><parameter>op</parameter>
<parameter>file</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>file_on_host</function></funcdef>
<paramdef><parameter>op</parameter>
<parameter>file</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>local_exec</function></funcdef>
<paramdef><parameter>commandline</parameter>
<parameter>inp</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_binary</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_close</function></funcdef>
<paramdef><parameter>shellid</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_download</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_exec</function></funcdef>
<paramdef><parameter>hostname</parameter>
<parameter>program</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_expect</function></funcdef>
<paramdef><parameter>board</parameter>
<parameter>timeout</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_file</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>args</parameter</paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_ld</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>prog</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_load</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>prog</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_open</function></funcdef>
<paramdef><parameter>type</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_pop_conn</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_push_conn</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_binary</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_close</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_file</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_ld</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>prog</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_load</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>prog</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_open</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_send</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>string</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_spawn</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>commandline</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_transmit</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_raw_wait</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>timeout</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_reboot</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_send</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>string</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_spawn</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>commandline</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_swap_conn</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_transmit</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_upload</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>srcfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>remote_wait</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>timeout</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_close</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_download</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_exec</function></funcdef>
<paramdef><parameter>hostname</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_file</function></funcdef>
<paramdef><parameter>dest</parameter
<parameter>op</parameter
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_load</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>prog</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_reboot</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_send</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>string</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_spawn</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>commandline</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_transmit</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_upload</function></funcdef>
<paramdef><parameter>dest srcfile destfile</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>standard_wait</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>timeout</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unix_clean_filename</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>exit_remote_shell</function></funcdef>
<paramdef><parameter>spawnid</parameter></paramdef>
</funcsynopsis>
-->
</sect2>
-
+
<sect2 id=connprocs xreflabel="connprocs">
<title>Procedures For Using Utilities to Connect</title>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>kermit_open</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>kermit_command</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>kermit_send</function></funcdef>
<paramdef><parameter>dest string args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>kermit_transmit</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>telnet_open</function></funcdef>
<paramdef><parameter>hostname</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>telnet_binary</function></funcdef>
<paramdef><parameter>hostname</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>telnet_transmit</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>file</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>tip_open</function></funcdef>
<paramdef><parameter>hostname</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>rlogin_open</function></funcdef>
<paramdef><parameter>arg</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>rlogin_spawn</function></funcdef>
<paramdef><parameter>dest</parameter>
<parameter>cmdline</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>rsh_open</function></funcdef>
<paramdef><parameter>hostname</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>rsh_download</function></funcdef>
<paramdef><parameter>desthost</parameter>
<parameter>srcfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>rsh_upload</function></funcdef>
<paramdef><parameter>desthost</parameter>
<parameter>srcfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>rsh_exec</function></funcdef>
<paramdef><parameter>boardname</parameter>
<parameter>cmd</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>ftp_open</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>ftp_upload</function></funcdef>
<paramdef><parameter>host</parameter>
<parameter>remotefile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>ftp_download</function></funcdef>
<paramdef><parameter>host</parameter>
<parameter>localfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>ftp_close</function></funcdef>
<paramdef><parameter>host</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>tip_download</function></funcdef>
<paramdef><parameter>spawnid</parameter>
<parameter>file</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>default_link</function></funcdef>
<paramdef><parameter>board</parameter>
<parameter>objects</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>default_target_assemble</function></funcdef>
<paramdef><parameter>source</parameter>
<parameter>destfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>default_target_compile</function></funcdef>
<paramdef><parameter>source</parameter>
<parameter>destfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>pop_config</function></funcdef>
<paramdef><parameter>type</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>prune_warnings</function></funcdef>
<paramdef><parameter>text</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>push_build</function></funcdef>
<paramdef><parameter>name</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>push_config</function></funcdef>
<paramdef><parameter>type</parameter>
<parameter>name</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>reboot_target</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>target_assemble</function></funcdef>
<paramdef><parameter>source destfile flags</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>target_compile</function></funcdef>
<paramdef><parameter>source</parameter>
<parameter>destfile</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>board_info</function></funcdef>
<paramdef><parameter>machine</parameter>
<parameter>op</parameter>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>host_info</function></funcdef>
<paramdef><parameter>op</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>set_board_info</function></funcdef>
<paramdef><parameter>entry</parameter>
<parameter>value</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>set_currtarget_info</function></funcdef>
<paramdef><parameter>entry</parameter>
<parameter>value</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>target_info</function></funcdef>
<paramdef><parameter>op</parameter>
<parameter>args</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unset_board_info</function></funcdef>
<paramdef><parameter>entry</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unset_currtarget_info</function></funcdef>
<paramdef><parameter>entry</parameter></paramdef>
</funcsynopsis>
an index into the <symbol>target_info</symbol> array and is set in
the global config file.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>push_target</function></funcdef>
<paramdef><parameter>name</parameter></paramdef>
</funcsynopsis>
<para>This unsets the current target connection.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>pop_target</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para>This lists all the supported targets for this
architecture.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>list_targets</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<symbol>target_info</symbol> array and is set in the global config
file.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>push_host</function></funcdef>
<paramdef><parameter>name</parameter></paramdef>
</funcsynopsis>
<para>This unsets the current host connection.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>pop_host</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<sect3 id=compile xreflabel="compile procedure">
<title>Compile Procedure</title>
- <para>This invokes the compiler as set by CC to compile the
+ <para>This invokes the compiler as set by CC to compile the
file <filename>file</filename>. The default options for many cross
compilation targets are <emphasis>guessed</emphasis> by DejaGnu, and
these options can be added to by passing in more parameters as
then compiler is run on the remote host using
<command>execute_anywhere</command>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>compile</function></funcdef>
<paramdef><parameter>file</parameter></paramdef>
</funcsynopsis>
host is not the same as the build machines, then then archiver is run
on the remote host using <command>execute_anywhere</command>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>archive</function></funcdef>
<paramdef><parameter>file</parameter></paramdef>
</funcsynopsis>
aren't POSIX yet. Any parameters passed to <command>ranlib</command>
are used in for the flags.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>ranlib</function></funcdef>
<paramdef><parameter>file</parameter></paramdef>
</funcsynopsis>
output produced when the command was executed. This is used for
running the tool to be tested, not a test case.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>execute_anywhere</function></funcdef>
<paramdef><parameter>cmdline</parameter></paramdef>
</funcsynopsis>
<function>${tool}_start</function> (or makes other
arrangements to run the tool).</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>${tool}_start</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
downloading. Test scripts call
<function>${tool}_load</function>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>${tool}_load</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
session. You can also use <function>${tool}_exit</function>
to remove any temporary files left over from the
tests. <command>runtest</command> calls
- <function>${tool}_exit</function>.</para>
+ <function>${tool}_exit</function>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>${tool}_exit</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
should consist of the full path name used for the tested
tool, and its version number.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>${tool}_version</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
directory a single directory that match an optional
pattern. </para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>getdirs</function></funcdef>
<paramdef><parameter>rootdir</parameter>
<parameter>pattern</parameter></paramdef>
result include all intervening subdirectory names. If no files match
the pattern, then a NULL string is returned.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find</function></funcdef>
<paramdef><parameter>rootdir</parameter>
<parameter>pattern</parameter></paramdef>
<emphasis>PATH</emphasis>. It returns <emphasis>0</emphasis> if the
binary is not in the path, or if there is no <emphasis>PATH</emphasis>
environment variable. If <command>binary</command> is in the path, it
- returns the full path to <command>binary</command>.</para>
+ returns the full path to <command>binary</command>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>which</function></funcdef>
<paramdef><parameter>file</parameter></paramdef>
</funcsynopsis>
<emphasis>regexp</emphasis>. The result is a list of all the lines that
match. If no lines match, the result is an empty string. Specify
<emphasis>regexp</emphasis> using the standard regular expression style
- used by the Unix utility program grep.</para>
+ used by the Unix utility program grep.</para>
<para>Use the optional third argument <emphasis>line</emphasis> to
start lines in the result with the line number in
<filename>filename</filename>. (This argument is simply an option
flag; type it just as shown <option>--line</option>.)</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>grep</function></funcdef>
<paramdef><parameter>filename</parameter>
<parameter>regexp</parameter>
<term><parameter>regexp</parameter></term>
<listitem><para>The Unix style regular expression (as used by the
<command>grep</command> Unix utility) to search
- for.</para></listitem>
+ for.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>--line</parameter></term>
<listitem><para>Prefix the line number to each line where the
- regexp matches.</para></listitem>
+ regexp matches.</para></listitem>
</varlistentry>
</variablelist>
</sect3>
Elements are fields delimited by spaces. The result is a copy of
list, without any elements that match <emphasis>pattern</emphasis>.
You can use the common shell wildcard characters to specify the
- pattern.</para>
+ pattern.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>prune</function></funcdef>
<paramdef><parameter>list</parameter>
<parameter>pattern</parameter></paramdef>
under Windows if you have Cygwin or another Unix subsystem for Windows
installed.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>slay</function></funcdef>
<paramdef><parameter>name</parameter></paramdef>
</funcsynopsis>
<para>This procedure takes the relative <emphasis>path</emphasis>,
and converts it to an absolute path.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>absolute</function></funcdef>
<paramdef><parameter>path</parameter></paramdef>
</funcsynopsis>
error it returns a <emphasis>1</emphasis>, otherwise it returns a
<emphasis>0</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>psource</function></funcdef>
<paramdef><parameter>file</parameter></paramdef>
</funcsynopsis>
pathname of the current testcase under consideration. This is used
by tools like compilers where each testcase is a file.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>runtest_file_p</function></funcdef>
<paramdef><parameter>runtests</parameter>
<parameter>testcase</parameter></paramdef>
<varlistentry>
<term><parameter>runtests</parameter></term>
<listitem><para>The list of patterns to compare against.
- </para></listitem>
+ </para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>testcase</parameter></term>
<symbol>verbose</symbol> is set, then it'll print the differences to
the screen.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>diff</function></funcdef>
<paramdef><parameter>file_1</parameter>
<parameter>file_2</parameter></paramdef>
<para>Sets the environment variable <emphasis>var</emphasis> to the
value <emphasis>val</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>setenv</function></funcdef>
<paramdef><parameter>var</parameter>
<parameter>val</parameter></paramdef>
<para>Unsets the environment variable
<emphasis>var</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>unsetenv</function></funcdef>
<paramdef><parameter>var</parameter></paramdef>
</funcsynopsis>
<para>Returns the value of <emphasis>var</emphasis> in the
environment if it exists, otherwise it returns NULL.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>getenv</function></funcdef>
<paramdef><parameter>var</parameter></paramdef>
</funcsynopsis>
is the message that is printed if a shared library is out of
date.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>prune_system_crud</function></funcdef>
<paramdef><parameter>system</parameter>
<parameter>test</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>libgloss_link_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>libgloss_include_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>newlib_link_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>newlib_include_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>libio_include_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>libio_link_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>g++_include_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>g++_link_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>libstdc++_include_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>libstdc++_link_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>get_multilibs</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_binutils_prog</function></funcdef>
<paramdef><parameter>name</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_gcc</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_gcj</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_g++</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_g77</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>process_multilib_options</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>add_multilib_option</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_gas</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>find_ld</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>build_wrapper</function></funcdef>
<paramdef><parameter>gluefile</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>winsup_include_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>winsup_link_flags</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
the values of the global variable names that match. It is abbreviated
as <emphasis>dv</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>dumpvars</function></funcdef>
<paramdef><parameter>vars</parameter></paramdef>
</funcsynopsis>
prints the values of the local variable names that match. It is
abbreviated as <emphasis>dl</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>dumplocals</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
prints the body of all procs that match. It is abbreviated as
<emphasis>dp</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>dumprocs</function></funcdef>
<paramdef><parameter>pattern</parameter></paramdef>
</funcsynopsis>
prints all the watchpoints. It is abbreviated as
<emphasis>dw</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>dumpwatch</function></funcdef>
<paramdef><parameter>pattern</parameter></paramdef>
</funcsynopsis>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>watcharray</function></funcdef>
<paramdef><parameter>element</parameter>
<parameter>type</parameter></paramdef>
<para></para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>watchvar</function></funcdef>
<paramdef><parameter>var</parameter>
<parameter>type</parameter></paramdef>
<symbol>var</symbol> is unset. It is abbreviated as
<emphasis>wu</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>watchunset</function></funcdef>
<paramdef><parameter>arg</parameter></paramdef>
</funcsynopsis>
<para>This breaks program execution when the variable
<symbol>var</symbol> is written. It is abbreviated as
- <emphasis>ww</emphasis>.</para>
+ <emphasis>ww</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>watchwrite</function></funcdef>
<paramdef><parameter>var</parameter></paramdef>
</funcsynopsis>
<symbol>var</symbol> is read. It is abbreviated as
<emphasis>wr</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>watchread</function></funcdef>
<paramdef><parameter>var</parameter></paramdef>
</funcsynopsis>
<para>This deletes a the watchpoint from the watch list. It is
abbreviated as <emphasis>wd</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>watchdel</function></funcdef>
<paramdef><parameter>args</parameter></paramdef>
</funcsynopsis>
<parameter>var</parameter>. It is abbreviated as
<emphasis>p</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>print</function></funcdef>
<paramdef><parameter>var</parameter></paramdef>
</funcsynopsis>
<para>This makes runtest exit. It is abbreviated as
<emphasis>q</emphasis>.</para>
- <funcsynopsis role="tcl">
+ <funcsynopsis role="tcl">
<funcdef><function>quit</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<sect1 id=cunit xreflabel="C Unit Testing API">
<title>C Unit Testing API</title>
-
+
<para>All of the functions that take a
<parameter>msg</parameter> parameter use a C char * that is
the message to be dislayed. There currently is no support for
<sect2 id=passfunc xreflabel="pass function">
<title>Pass Function</title>
-
+
<para>This prints a message for a successful test
completion.</para>
- <funcsynopsis role="C">
+ <funcsynopsis role="C">
<funcdef><function>pass</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
<sect2 id=failfunc xreflabel="fail function">
<title>Fail Function</title>
-
+
<para>This prints a message for an unsuccessful test
completion.</para>
- <funcsynopsis role="C">
+ <funcsynopsis role="C">
<funcdef><function>fail</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
<para>This prints a message for an test case that isn't run
for some technical reason.</para>
- <funcsynopsis role="C">
+ <funcsynopsis role="C">
<funcdef><function>untested</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
human to look over the results to determine what happened.
</para>
- <funcsynopsis role="C">
+ <funcsynopsis role="C">
<funcdef><function>unresolved</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
<para>This prints out the total numbers of all the test
state outputs.</para>
- <funcsynopsis role="C">
+ <funcsynopsis role="C">
<funcdef><function>totals</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
<sect1 id=cppunit xreflabel="C++ Unit Testing API">
<title>C++ Unit Testing API</title>
-
+
<para>All of the methods that take a
<parameter>msg</parameter> parameter use a C char *
or STL string, that is the message to be
dislayed. There currently is no support for variable
length arguments.</para>
-
+
<sect2 id=passmeth xreflabel="pass method">
<title>Pass Method</title>
<para>This prints a message for a successful test
completion.</para>
- <funcsynopsis role="C++">
+ <funcsynopsis role="C++">
<funcdef><function>TestState::pass</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
<para>This prints a message for an unsuccessful test
completion.</para>
- <funcsynopsis role="C++">
+ <funcsynopsis role="C++">
<funcdef><function>TestState::fail</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
<para>This prints a message for an test case that isn't run
for some technical reason.</para>
- <funcsynopsis role="C++">
+ <funcsynopsis role="C++">
<funcdef><function>TestState::untested</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
human to look over the results to determine what happened.
</para>
- <funcsynopsis role="C++">
+ <funcsynopsis role="C++">
<funcdef><function>TestState::unresolved</function></funcdef>
<paramdef><parameter>msg</parameter></paramdef>
</funcsynopsis>
<para>This prints out the total numbers of all the test
state outputs.</para>
- <funcsynopsis role="C++">
+ <funcsynopsis role="C++">
<funcdef><function>TestState::totals</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcsynopsis>
.SH DESCRIPTION
.I DejaGnu
is a framework for running test suites on GNU tools. It is written in
-expect, which uses Tcl (Tool command language).
+expect, which uses Tcl (Tool command language).
.B runtest
-is the test driver program; use it to control what tests to run,
+is the test driver program; use it to control what tests to run,
and variations on how to run them.
You can find a comprehensive description of DejaGnu and \fBruntest\fR in
.SH OPTIONS
.TP
.B --all
-Print all test output to screen. By default, only unexpected results are
+Print all test output to screen. By default, only unexpected results are
displayed.
.TP
.BI --baud \ rate
initialization file.
.TP
.BI --connect \ type
-The type of connection to use. The choices are
-.BR rlogin ,
+The type of connection to use. The choices are
+.BR rlogin ,
.BR telnet ,
-.BR rsh ,
-.BR kermit ,
+.BR rsh ,
+.BR kermit ,
.BR tip
and
.BR mondfe .
.TP
.BI --mail \ \'name1\ name2\ ...\'
Electronic mail addresses to receive test results.
-.TP
+.TP
.BI --name \ hostname
The network hostname of the target board.
.TP
Turns on
.B expect
internal tracing to \fIN\fR levels deep.
-.TP
+.TP
.BI --target \ type
The configuration string for the target.
-.TP
+.TP
.BI --tool \ toolname
-Specify the tool to be tested. \fItoolname\fR controls the test suite
+Specify the tool to be tested. \fItoolname\fR controls the test suite
applied, and the associated initialization module.
.TP
.B --verbose,\ -v
-Turns on more debugging output from test cases and DejaGnu utility code.
+Turns on more debugging output from test cases and DejaGnu utility code.
Use more than once to increase output further.
.TP
.B --version,\ -V
<chapter id=gettingup>
<title>Getting DejaGnu up and running</title>
-<para>This chapter was originally written by Niklaus Giger (ngiger@mus.ch) because he lost a week to figure out how DejaGnu works and how to write a first test.</para>
+<para>This chapter was originally written by Niklaus Giger (ngiger@mus.ch) because he lost a week to figure out how DejaGnu works and how to write a first test.</para>
<para>Follow these instructions as closely a possible in order get a good insight into how DejaGnu works, else you might run into a lot of subtle problems. You have been warned.</para>
<para>It should be no big problems installing DejaGnu using your package manager or from the source code. Under a Debian/GNU/Linux systems just type (as root) <programlisting>apt-get dejagnu</programlisting>. These examples were run on a primary machine with a AMD K6 and a Mac Powerbook G3 serving as a remote target.</para>
-<para> The tests for Windows were run under Windows NT using the actual Cygwin version (1.3.x as of October 2001). It's target system was a PPC embedded system running vxWorks.
+<para> The tests for Windows were run under Windows NT using the actual Cygwin version (1.3.x as of October 2001). It's target system was a PPC embedded system running vxWorks.
</para>
<sect1>
</title>
<programlisting>
-dgt:~/dejagnu.test$ runtest
-WARNING: Couldn't find the global config file.
-WARNING: No tool specified Test
+dgt:~/dejagnu.test$ runtest
+WARNING: Couldn't find the global config file.
+WARNING: No tool specified Test
Run By dgt on Sun Nov 25 17:07:03 2001 Native configuration is i586-pc-linux-gnu
=== tests ===
Schedule of variations: unix
-Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
-Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
+Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
+Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
ERROR: Couldn't find tool config file for unix.
=== Summary ===</programlisting>
<para>We will show you later how to get rid of all the WARNING- and ERROR-messages. The files testrun.sum and testrun.log have been created, which do not interest us at this point. Let's remove them.</para>
-<programlisting>:~/dejagnu.test$ rm testrun.sum testrun.log
+<programlisting>:~/dejagnu.test$ rm testrun.sum testrun.log
</programlisting>
</example>
<sect2>
<title>Getting the source code for the calc example</title>
-<para>If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples.
-These examples seem to be missing in Red Hat's RPM.
+<para>If you are running a Debian distribution you can find the examples under /usr/share/doc/dejagnu/examples.
+These examples seem to be missing in Red Hat's RPM.
In this case download the sources of DejaGnu and adjust the pathes to the DejaGnu examples accordingly.</para>
</sect2>
</sect1>
<sect1>
<title>Create a minimal project, e.g. calc</title>
-<para>In this section you will to start a small project,
+<para>In this section you will to start a small project,
using the sample application calc, which is part of your DejaGnu distribution</para>
<sect2><title>A simple project without the GNU autotools</title>
<para>The generated site.exp should like like:</para>
<programlisting>
-set tool calc
-set srcdir .
+set tool calc
+set srcdir .
set objdir /home/dgt/dejagnu.test
</programlisting></sect2>
dgt:~/dejagnu.test$ aclocal
</programlisting>
-<para>autoconf is another part of the auto-tools.
+<para>autoconf is another part of the auto-tools.
Run it to generate configure based on information contained in configure.in.</para>
<programlisting>
dgt:~/dejagnu.test$ autoconf
</programlisting>
-<para>autoheader is another part of the auto-tools.
+<para>autoheader is another part of the auto-tools.
Run it to generate calc.h.in. </para>
<programlisting>
dgt:~/dejagnu.test$ autoheader
</programlisting>
-<para>The Makefile.am of this example was developed as port of the DejaGnu
-distribution.
-Adapt Makefile.am for this test. Replace the line
-“#noinst_PROGRAMS = calc” to
-“bin_PROGRAMS = calc”.
+<para>The Makefile.am of this example was developed as port of the DejaGnu
+distribution.
+Adapt Makefile.am for this test. Replace the line
+“#noinst_PROGRAMS = calc” to
+“bin_PROGRAMS = calc”.
Change the RUNTESTDEFAULTFLAGS from
-“$$srcdir/testsuite” to
+“$$srcdir/testsuite” to
“./testsuite”.</para>
<para>Running automake at this point contains a series of warning in its output as shown in the following example:</para>
<title>Sample output of automake with missing files</title>
<programlisting>
dgt:~/dejagnu.test$ automake --add-missing
-automake: configure.in: installing `./install-sh'
-automake: configure.in: installing `./mkinstalldirs'
-automake: configure.in: installing `./missing'
-automake: Makefile.am: installing `./INSTALL'
-automake: Makefile.am: required file `./NEWS' not found
-automake: Makefile.am: required file `./README' not found
-automake: Makefile.am: installing `./COPYING'
-automake: Makefile.am: required file `./AUTHORS' not found
-automake: Makefile.am: required file `./ChangeLog' not found
-configure.in: 4: required file `./calc.h.in' not found
+automake: configure.in: installing `./install-sh'
+automake: configure.in: installing `./mkinstalldirs'
+automake: configure.in: installing `./missing'
+automake: Makefile.am: installing `./INSTALL'
+automake: Makefile.am: required file `./NEWS' not found
+automake: Makefile.am: required file `./README' not found
+automake: Makefile.am: installing `./COPYING'
+automake: Makefile.am: required file `./AUTHORS' not found
+automake: Makefile.am: required file `./ChangeLog' not found
+configure.in: 4: required file `./calc.h.in' not found
Makefile.am:6: required directory ./doc does not exist
</programlisting>
</example>
-<para>Create a empty directory doc and empty files
-INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING.
+<para>Create a empty directory doc and empty files
+INSTALL, NEWS, README, AUTHORS, ChangeLog and COPYING.
The default COPYING will point to the GNU Public License (GPL).
In a real project it would be time to add some meaningfull text in each file.
</para>
<title>Sample output of configure
</title>
<programlisting>
-dgt:~/dejagnu.test$ ./configure
-creating cache ./config.cache
-checking whether to enable maintainer-specific portions of Makefiles... no
-checking for a BSD compatible install... /usr/bin/install -c
-checking whether build environment is sane... yes
-checking whether make sets ${MAKE}... yes
-checking for working aclocal... found
-checking for working autoconf... found
-checking for working automake... found
-checking for working autoheader... found
-checking for working makeinfo... found
-checking for gcc... gcc checking whether the C compiler (gcc ) works... yes
-checking whether the C compiler (gcc ) is a cross-compiler... no
+dgt:~/dejagnu.test$ ./configure
+creating cache ./config.cache
+checking whether to enable maintainer-specific portions of Makefiles... no
+checking for a BSD compatible install... /usr/bin/install -c
+checking whether build environment is sane... yes
+checking whether make sets ${MAKE}... yes
+checking for working aclocal... found
+checking for working autoconf... found
+checking for working automake... found
+checking for working autoheader... found
+checking for working makeinfo... found
+checking for gcc... gcc checking whether the C compiler (gcc ) works... yes
+checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
-checking whether gcc accepts -g... yes
-checking for a BSD compatible install... /usr/bin/install -c
-checking how to run the C preprocessor... gcc -E
-checking for stdlib.h... yes
-checking for strcmp... yes
-updating cache ./config.cache
-creating ./config.status
+checking whether gcc accepts -g... yes
+checking for a BSD compatible install... /usr/bin/install -c
+checking how to run the C preprocessor... gcc -E
+checking for stdlib.h... yes
+checking for strcmp... yes
+updating cache ./config.cache
+creating ./config.status
creating Makefile creating calc.h
</programlisting>
</example>
-<para>If you are familiar with GNU software,
-this output should not contain any surprise to you.
+<para>If you are familiar with GNU software,
+this output should not contain any surprise to you.
Any errors should be easy to fix for such a simple program.</para>
<para>Build the calc executable:</para>
<title>Sample output building calc
</title>
<programlisting>
-dgt:~/dejagnu.test$ make
-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
+dgt:~/dejagnu.test$ make
+gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
gcc -g -O2 -o calc calc.o
</programlisting>
</example>
-<para>You prepared a few files and then called some commands.
+<para>You prepared a few files and then called some commands.
Respecting the right order assures a automatic and correctly compiled calc program. The following example resumes the correct order.</para>
<example>
A sample session might look like this:</para>
<programlisting>
-dgt:~/dejagnu.test$ ./calc
-calc: version
-Version: 1.1
-calc:<emphasis> </emphasis>add 3 4
-7
+dgt:~/dejagnu.test$ ./calc
+calc: version
+Version: 1.1
+calc:<emphasis> </emphasis>add 3 4
+7
calc: multiply 3 4<emphasis> </emphasis>
-12
+12
calc: multiply 2 4<emphasis> </emphasis>
-12
+12
calc: quit
</programlisting>
<para>Look at the intentional bug that 2 times 4 equals 12.</para>
-<para>The tests run by DejaGnu need a file called site.exp,
-which is automatically generated if we call “make site.exp”.
+<para>The tests run by DejaGnu need a file called site.exp,
+which is automatically generated if we call “make site.exp”.
This was the purpose of the “AUTOMAKE_OPTIONS = dejagnu” in Makefile.am.</para>
<example>
<title>Sample output generating a site.exp</title>
<programlisting>
-dgt: make site.exp
-dgt:~/dejagnu.test$ make site.exp
+dgt: make site.exp
+dgt:~/dejagnu.test$ make site.exp
Making a new site.exp file...
</programlisting>
</example>
<title>Sample output of runtest in a configured directory</title>
<programlisting>
-dgt:~/dejagnu.test$ make check
-make check-DEJAGNU
-make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \
-EXPECT=expect; export EXPECT; \ runtest=runtest; \
+dgt:~/dejagnu.test$ make check
+make check-DEJAGNU
+make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . && pwd`; export srcdir; \
+EXPECT=expect; export EXPECT; \ runtest=runtest; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
-$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \
-else echo "WARNING: could not find \`runtest'" 1>&2; :;\
-fi
-WARNING: Couldn't find the global config file.
-WARNING: Couldn't find tool init file
-Test Run By dgt on Sun Nov 25 21:42:21 2001
+$runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \
+else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+fi
+WARNING: Couldn't find the global config file.
+WARNING: Couldn't find tool init file
+Test Run By dgt on Sun Nov 25 21:42:21 2001
Native configuration is i586-pc-linux-gnu
=== calc tests ===
-Schedule of variations:
+Schedule of variations:
unix
-Running target unix
-Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
-Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
+Running target unix
+Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
+Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./testsuite/config/unix.exp as tool-and-target-specific interface file.
-Running ./testsuite/calc.test/calc.exp ...
+Running ./testsuite/calc.test/calc.exp ...
FAIL: multiply2 (bad match)
=== calc Summary ===
-# of expected passes 5
-# of unexpected failures 1
+# of expected passes 5
+# of unexpected failures 1
/home/Dgt/dejagnu.test/calc version Version: 1.1
-make[1]: *** [check-DEJAGNU] Fehler 1
+make[1]: *** [check-DEJAGNU] Fehler 1
make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler 2
</programlisting>
</example>
<para>Did you see the line “FAIL:“? The test cases for calc catch the bug in the calc.c file. Fix the error in calc.c later as the following examples assume a unchanged calc.c.</para>
-<para>Examine the output files calc.sum and calc.log.
+<para>Examine the output files calc.sum and calc.log.
Try to understand the testcases written in ~/dejagnu.test/testsuite/calc.test/calc.exp.
To understand Expect you might take a look at the book "Exploring Expect",
-which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2)
-The book contains hundreds of examples and also includes a tutorial on Tcl.
+which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2)
+The book contains hundreds of examples and also includes a tutorial on Tcl.
Exploring Expect is 602 pages long. </para>
</sect2>
puts "I am ~/.dejagnurc"
</programlisting>
-<para>Rerun make check. Test whether the output contains "I am ~/.dejagnurc".
+<para>Rerun make check. Test whether the output contains "I am ~/.dejagnurc".
Create ~/my_dejagnu.exp and insert the following line:</para>
<programlisting>
dgt:~/dejagnu.test$ export DEJAGNU=~/my_dejagnu.exp
</programlisting>
-<para>Run “make check” again. The output should not contain
-“WARNING: Couldn't find the global config file.”.
+<para>Run “make check” again. The output should not contain
+“WARNING: Couldn't find the global config file.”.
Create the sub-directory lib. Create the file “calc.exp” in it and insert the following line:</para>
<programlisting>
puts "I am lib/calc.exp"
</programlisting>
-<para>The last warning “WARNING: Couldn't find tool init file”
-should not be part of the output of make check.
+<para>The last warning “WARNING: Couldn't find tool init file”
+should not be part of the output of make check.
Create the directory ˜/boards. Create the file ˜/boards/standard.exp and insert the following line:</para>
<programlisting>
<example>
<title>Sample output of runtest with the usual configuration files</title>
<programlisting>
-dgt:~/dejagnu.test$ make check
+dgt:~/dejagnu.test$ make check
<...>
-fi
-I am ~/.dejagnurc
-I am ~/my_dejagnu.exp
-I am lib/calc.exp
-Test Run By dgt on Sun Nov 25 22:19:14 2001
+fi
+I am ~/.dejagnurc
+I am ~/my_dejagnu.exp
+I am lib/calc.exp
+Test Run By dgt on Sun Nov 25 22:19:14 2001
Native configuration is i586-pc-linux-gnu
=== calc tests ===
Using /home/Dgt/boards/standard.exp as standard board description\
-file for build.
-I am ~/boards/standard.exp
+file for build.
+I am ~/boards/standard.exp
Using /home/Dgt/boards/standard.exp as standard board description\
- file for host.
-I am ~/boards/standard.exp
+ file for host.
+I am ~/boards/standard.exp
-Schedule of variations:
+Schedule of variations:
unix
-Running target unix
+Running target unix
Using /home/Dgt/boards/standard.exp as standard board description\
- file for target.
-I am ~/boards/standard.exp
+ file for target.
+I am ~/boards/standard.exp
Using /usr/share/dejagnu/baseboards/unix.exp as board description file\
-for target.
+for target.
<...>
</programlisting>
</example>
<para>It is up to you to decide when and where to use any of the above
-mentioned config files for customizing.
-This chapters showed you where and in which order the different config
+mentioned config files for customizing.
+This chapters showed you where and in which order the different config
files are run.</para>
</sect2>
<title>Testing “Hello world” locally</title>
<para>This test checks, whether the built-in shell command “echo Hello world”
- will really write “Hello world” on the console.
-Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
+ will really write “Hello world” on the console.
+Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
It should contain the following lines</para>
<example>
<title>A first (local) test case</title>
<programlisting>
-set test "Local Hello World"
-send "echo Hello World"
-expect {
- -re "Hello World" { pass "$test" }
+set test "Local Hello World"
+send "echo Hello World"
+expect {
+ -re "Hello World" { pass "$test" }
}
</programlisting>
</example>
<para>Testing remote targets is a lot trickier especially if you are using an
embedded target
-which has no built in support for things like a compiler, ftp server or a Bash-shell.
+which has no built in support for things like a compiler, ftp server or a Bash-shell.
Before you can test calc on a remote target you have to acquire a few basics skills.</para>
<sect2>
<title>Setup telnet to your own host</title>
-<para>The easiest remote host is usually the host you are working on.
-In this example we will use telnet to login in your own workstation.
-For security reason you should never have a telnet deamon running on
+<para>The easiest remote host is usually the host you are working on.
+In this example we will use telnet to login in your own workstation.
+For security reason you should never have a telnet deamon running on
machine connected on the internet, as password and usernames are transmitted
- in clear text.
+ in clear text.
We assume you know how to setup your machine for a telnet daemon.</para>
-<para>Next try whether you may login in your own host by issuing the
-command “telnet localhost.1”. In order to be able to
+<para>Next try whether you may login in your own host by issuing the
+command “telnet localhost.1”. In order to be able to
distinguish between a normal session an a telnet login add the following lines to /home/dgt/.bashrc.</para>
<programlisting>
if [ "$REMOTEHOST" ]
-then
- PS1='remote:\w\$ '
+then
+ PS1='remote:\w\$ '
fi
</programlisting>
<title>Sample log of a telnet login to localhost</title>
<programlisting>
dgt:~/dejagnu.test$ telnet localhost
-Trying 127.0.0.1...
-Connected to 127.0.0.1.
-Escape character is '^]'.
-Debian GNU/Linux testing/unstable Linux
+Trying 127.0.0.1...
+Connected to 127.0.0.1.
+Escape character is '^]'.
+Debian GNU/Linux testing/unstable Linux
K6Linux login: dgt
-Password:
-Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4
-Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown
-No mail.
+Password:
+Last login: Sun Nov 25 22:46:34 2001 from localhost on pts/4
+Linux K6Linux 2.4.14 #1 Fre Nov 16 19:28:25 CET 2001 i586 unknown
+No mail.
remote:~$ exit
-logout
+logout
Connection closed by foreign host.
</programlisting>
</example>
<sect2>
<title>A test case for login via telnet</title>
-<para>In order to define a correct setup we have add a line containing
-“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp.
+<para>In order to define a correct setup we have add a line containing
+“set target unix” either to ~/.dejagnurc or to ~/my_dejagnu.exp.
In ~/boards/standard.exp add the following four lines to define a few patterns for the DejaGnu telnet login procedure.</para>
<example>
<title>Defining a remote target board</title>
<programlisting>
-set_board_info shell_prompt "remote:"
-set_board_info telnet_username "dgt"
-set_board_info telnet_password "top_secret"
+set_board_info shell_prompt "remote:"
+set_board_info telnet_username "dgt"
+set_board_info telnet_password "top_secret"
set_board_info hostname "localhost"
</programlisting>
</example>
-<para>As DejaGnu will be parsing the telnet session output for some well
-known pattern the output there are a lot of things that can go wrong.
+<para>As DejaGnu will be parsing the telnet session output for some well
+known pattern the output there are a lot of things that can go wrong.
If you have any problems verify your setup:</para>
<itemizedlist>
<para>The LANG environment variable must be either empty or set to “C”. </para></listitem>
</itemizedlist>
-<para>To test the login via telnet write a sample test case.
-Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and
+<para>To test the login via telnet write a sample test case.
+Create the file ~/dejagnu.test/testsuite/calc.test/remote_echo.exp and
add the following few lines:</para>
<example>
<title>DejaGnu script for logging in into a remote target</title>
<programlisting>
puts "this is remote_echo.exp target for $target "
-target_info $target
-#set verbose 9
-set shell_id [remote_open $target]
-set test "Remote login to $target"
+target_info $target
+#set verbose 9
+set shell_id [remote_open $target]
+set test "Remote login to $target"
#set verbose 0
puts "Spawn id for remote shell is $shell_id"
-if { $shell_id > 0 } {
- pass "$test"
-} else {
- fail "Remote open to $target"
+if { $shell_id > 0 } {
+ pass "$test"
+} else {
+ fail "Remote open to $target"
}
</programlisting>
</example>
<para>In the runtest output you should find something like:</para>
<programlisting>
-Running ./testsuite/calc.test/local_echo.exp ...
-Running ./testsuite/calc.test/remote_echoo.exp ...
-this is remote_echo.exp target is unix
+Running ./testsuite/calc.test/local_echo.exp ...
+Running ./testsuite/calc.test/remote_echoo.exp ...
+this is remote_echo.exp target is unix
Spawn id for remote shell is exp7
</programlisting>
<sect2>
<title>Remote testing “Hello world”</title>
-<para>Next you will transform the above “hello world” example to
-its remote equivalent.
+<para>Next you will transform the above “hello world” example to
+its remote equivalent.
This can be done by adding the following lines to our file remote_echo.exp.</para>
<example>
<title>A first (local) remote "Hello world" test</title>
<programlisting>
-set test "Remote_send Hello World"
+set test "Remote_send Hello World"
set status [remote_send $target "echo \"Hello\" \"World\"\n" ]
pass "$test"
-set test "Remote_expect Hello World"
-remote_expect $target 5 {
- -re "Hello World" { pass "$test" }
+set test "Remote_expect Hello World"
+remote_expect $target 5 {
+ -re "Hello World" { pass "$test" }
}
</programlisting>
</example>
<para>Have a look at the procedures in /usr/share/dejagnu/remote.exp to have an overview of the offered procedures and their features. </para>
-<para>Now setup a real target.
-In the following example we assume as target a PowerBook running Debian.
-As above add a test user "dgt", install telnet and FTP servers.
-In order to distinguish it from the host add the line
-<programlisting>PS1='test:>'</programlisting> to /home/dgt/.bash_profile.
-Also add a corresponding entry "powerbook" to /etc/hosts and verify that you
+<para>Now setup a real target.
+In the following example we assume as target a PowerBook running Debian.
+As above add a test user "dgt", install telnet and FTP servers.
+In order to distinguish it from the host add the line
+<programlisting>PS1='test:>'</programlisting> to /home/dgt/.bash_profile.
+Also add a corresponding entry "powerbook" to /etc/hosts and verify that you
are able to ping, telnet and ftp to the target "powerbook".</para>
<para>In order to let runtest run its test on the "powerbook" target change the following lines in ~/boards/standard.exp:</para>
</programlisting>
</example>
-<para>After running runtest again, check whether the file dejagnu2 exists on the target.
+<para>After running runtest again, check whether the file dejagnu2 exists on the target.
This example will only work if the rcp command works with your target.
-If you have a working FTP-server on the target you can use it by adding the
+If you have a working FTP-server on the target you can use it by adding the
following lines to ~/boards/standard.exp:</para>
<example>
<title>Preparing for crosscompilation</title>
<para>For crosscompiling you need working binutils, gcc and a base library like
-libc or glib for your target.
-It is beyond the scope of this document to describe how to get it working.
+libc or glib for your target.
+It is beyond the scope of this document to describe how to get it working.
The following examples assume a cross compiler for PowerPC which is called linux-powerpc-gcc.
</para>
<programlisting>
AM_CONFIG_HEADER(calc.h)
-AC_CANONICAL_TARGET([])
+AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE(calc, 1.1)
</programlisting>
-<para>You need to run automake 2.5 or later.
-Depending on your installation calling autoconf2.5 instead of autoconf is not needed.
+<para>You need to run automake 2.5 or later.
+Depending on your installation calling autoconf2.5 instead of autoconf is not needed.
The sequence to regenerate all files is:</para>
<example>
$ autoconf2.5
$ autoheader
$ automake
-$ ./configure --host=powerpc-linux --target=powerpc-linux
+$ ./configure --host=powerpc-linux --target=powerpc-linux
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... ./config.guess: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one
$ cp /usr/share/automake/config.guess .
-$ ./configure --host=powerpc-linux --target=powerpc-linux
+$ ./configure --host=powerpc-linux --target=powerpc-linux
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used. \
checking build system type... i586-pc-linux-gnu
<para>Everything should be ready to recompile for the target:</para>
<programlisting>$ make
-powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
+powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c calc.c
powerpc-linux-gcc -g -O2 -o calc calc.o
</programlisting>
<filename>Makefile</filename>.</para>
</sect1>
-
+
<sect1 id=runtest xreflabel="Runtest">
<title>Runtest</title>
case to determine whether you should amend it to stop expecting
failure.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>FAIL</term>
<listitem><para>A test failed, although it was expected to succeed.
This may indicate regress; inspect the test case and the failing
software to ocate the bug.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>XFAIL</term>
<listitem><para>A test failed, but it was expected to fail. This
by the test, the outcome is <emphasis>UNSUPPORTED</emphasis>
instead.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>UNRESOLVED</term>
<listitem><para>Output from a test requires manual inspection; the
example, your tests can report this outcome is when a test does not
complete as expected.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>UNTESTED</term>
<listitem><para>A test case is not yet complete, and in particular
``tests'' that note explicitly the absence of a real test case for a
particular property.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term>UNSUPPORTED</term>
<listitem><para>A test depends on a conditionally available feature
test. Executable tool names (and paths) are recorded in
<filename>site.exp</filename> and you can override them by specifying
Tcl variables on the command line.</para>
-
+
<para>For example, including "<option>--tool</option> gcc" on the
<emphasis>runtest</emphasis> command line runs tests from all test
subdirectories whose names match <filename>gcc.*</filename>, and uses
<emphasis>GCC=binname</emphasis> on the <emphasis>runtest</emphasis>
command line.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--tool_exec [name]</option></term>
<listitem><para>The path to the tool executable to
file, but not in the summary (<filename>*.sum</filename>) log
file.</para></listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--version</option> (-V)</term>
<listitem><para>Prints out the version numbers of DejaGnu,
</varlistentry>
<varlistentry>
- <term><filename>testfile</filename>.exp="testfile1 ..."</term>
+ <term><filename>testfile</filename>.exp="testfile1 ..."</term>
<listitem><para>Specify a subset of tests in a suite to run. For
compiler or assembler tests, which often use a single
<emphasis>.exp</emphasis> script covering many different source
/usr/latest/bin/gdb version 4.14.4 -nx
</screen>
- <para>You can use the option <emphasis>--srcdir</emphasis> to point to
+ <para>You can use the option <emphasis>--srcdir</emphasis> to point to
some other directory containing a collection of tests:</para>
<screen>
<filename>gdb.sum</filename> and
<filename>gdb.log</filename>.)</para>
</sect2>
- </sect1>
+ </sect1>
<sect1 id=outputfiles xreflabel="Output Files">
FAIL: help run "r" abbreviation
Running ./gdb.t10/crossload.exp ...
PASS: m68k-elf (elf-big) explicit format; loaded
- XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types
+ XFAIL: mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types
=== gdb Summary ===
# of expected passes 5
# of expected failures 1
{command}? no
break gdbme.c:34
Breakpoint 8 at 0x23d8: file gdbme.c, line 34.
- (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
+ (gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
file gdbme.c, line 34.\r\n(gdb) } (spawn_id 6) match pattern
{Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $}? yes
expect: set expect_out(0,start) {18}
<listitem><para>Empty output for the first attempted match. The
first set of attempted matches shown ran against the output
<emphasis>{}</emphasis> --- that is, no
- output. <productname>Expect</productname> begins
+ output. <productname>Expect</productname> begins
attempting to match the patterns supplied immediately; often,
the first pass is against incomplete output (or completely
before all output, as in this case).</para></listitem>
</sect2>
</sect1>
</chapter>
-
+
<chapter id=Customizing xreflabel="Customizing DejaGnu">
<title>Customizing DejaGnu</title>
-
+
<para>The site configuration file, <filename>site.exp</filename>,
captures configuration-dependent values and propagates them to the
DejaGnu test environment using Tcl variables. This ties the
either rely on and use, or override, any of the global values from
the global <filename>site.exp</filename> file.</para>
- <para>You can usually generate or update the testsuite's local
+ <para>You can usually generate or update the testsuite's local
<filename>site.exp</filename> by typing <command>make
site.exp</command> in the testsuite directory, after the test
suite is configured.</para>
<sect1 id=local xreflabel="Local Config File">
<title>Local Config File</title>
-
+
<para>It is usually more convenient to keep these <emphasis>manual
overrides</emphasis> in the <filename>site.exp</filename>
local to each test directory, rather than in the global
<example>
<title>Local Config File</title>
- <programlisting>
+ <programlisting>
## these variables are automatically generated by make ##
# Do not edit here. If you wish to override these values
# add them to the last section
set tmpdir /build/devo-builds/i586-pc-linux-gnulibc1/gcc/testsuite
set srcdir "${srcdir}/testsuite"
## All variables above are generated by configure. Do Not Edit ##
-
- </programlisting>
+
+ </programlisting>
</example>
<para>This file defines the required fields for a local config
</sect1>
<sect1 id=global xreflabel="Global Config File">
<title>Global Config File</title>
-
+
<para>The master config file is where all the target specific
config variables for a whole site get set. The idea is
that for a centralized testing lab where people have to share a
<sect1 id=boardconfig xreflabel="Board Config File">
<title>Board Config File</title>
-
+
<para>The board config file is where board specfic config data
is stored. A board config file contains all the higher-level
configuration settings. There is a rough inheritance scheme, where it is
<sect1 id=configfile xreflabel="Config File Values">
<title>Config File Values</title>
-
+
<para>DejaGnu uses a named array in Tcl to hold all the info for
each machine. In the case of a canadian cross, this means host
information as well as target information. The named array is
variables captured in the first section, but also specify
default values for all on the <command>runtest</command>
command line options. Save for <option>--debug</option>,
- <option>--help</option>, and <option>--version</option>, each
+ <option>--help</option>, and <option>--version</option>, each
command line option has an associated Tcl variable. Use the
Tcl <command>set</command> command to specify a new default
value (as for the configuration variables). The following
<sect2 id=personal xreflabel="Personal Config File">
<title>Personal Config File</title>
-
+
<para>The personal config file is used to customize
<command>runtest's</command> behaviour for each person. It's
typically used to set the user prefered setting for verbosity,
</sect1>
</chapter>
-
+
<chapter id=Extending xreflabel="Extending DejaGnu">
<title>Extending DejaGnu</title>
-
+
<sect1 id=addsuite xreflabel="Adding a new Testsuite">
<title>Adding A New Testsuite</title>
-
+
<para>The testsuite for a new tool should always be located in that tools
source directory. DejaGnu require the directory be named
<filename>testsuite</filename>. Under this directory, the test cases go
<sect1 id=addtool xreflabel="Adding A New Tool">
<title>Adding A New Tool</title>
-
+
<para>In general, the best way to learn how to write (code or even prose)
is to read something similar. This principle applies to test cases and
to testsuites. Unfortunately, well-established testsuites have a way
steps to begin building a testsuite for a program example.</para>
<itemizedlist mark=bullet>
-
+
<listitem><para>Create or select a directory to contain your new
collection of tests. Change into that directory (shown here as
<filename>testsuite</filename>):</para>
-
+
<para>Create a <filename>configure.in</filename> file in this directory,
to control configuration-dependent choices for your tests. So far as
DejaGnu is concerned, the important thing is to set a value for the
# The flags to pass to runtest
RUNTESTFLAGS =
- # Execute the tests
+ # Execute the tests
check: site.exp all
$(RUNTEST) $(RUNTESTFLAGS) \
- --tool <symbol>${example}</symbol> --srcdir $(srcdir)
+ --tool <symbol>${example}</symbol> --srcdir $(srcdir)
# Make the local config file
site.exp: ./config.status Makefile
</programlisting>
</example>
</listitem>
-
+
<listitem><para>Create a directory (in <filename>testsuite</filename>)
called <filename>config</filename>. Make a <emphasis>Tool Init
File</emphasis> in this directory. Its name must start with the
<example>
<title>Simple Batch Program Tool Init File</title>
-
+
<programlisting>
-
+
proc foo_exit {} {}
proc foo_version {} {}
<sect1 id=addtarget xreflabel="Adding A New Target">
<title>Adding A New Target</title>
-
+
<para>DejaGnu has some additional requirements for target support, beyond
the general-purpose provisions of configure. DejaGnu must actively
communicate with the target, rather than simply generating or managing
<sect1 id=addboard xreflabel="Adding A New Board">
<title>Adding A New Board</title>
-
+
<para>Adding a new board consists of creating a new board config
file. Examples are in
<filename>dejagnu/baseboards</filename>. Usually to make a new
contains other procedures used for a certain class of target. The
board description file is where the board specfic settings go. Commonly
there are similar target environments with just different
- processors.</para>
+ processors.</para>
<example>
<title>Testing a New Board Config File</title>
testing in the build tree, because the executables to be tested
are in the same tree as the new dejagnu files. The helper
procedures are the ones in square braces
- <emphasis>[]</emphasis>, which is the Tcl execution characters.</para>
+ <emphasis>[]</emphasis>, which is the Tcl execution characters.</para>
<example>
<title>Example Board Config File</title>
<sect1 id=writing xreflabel="Writing A Test Case">
<title>Writing A Test Case</title>
-
+
<para>The easiest way to prepare a new test case is to base it
on an existing one for a similar situation. There are two major
categories of tests: batch or interactive. Batch oriented tests
<sect1 id=debugging xreflabel="Debugging A Test Case">
<title>Debugging A Test Case</title>
-
+
<para>These are the kinds of debugging information available
from DejaGnu:</para>
<sect1 id=adding xreflabel="Adding A Test Case To A Testsuite">
<title>Adding A Test Case To A Testsuite.</title>
-
+
<para>There are two slightly different ways to add a test
case. One is to add the test case to an existing directory. The
other is to create a new directory to hold your test. The
<listitem><para>To add support in the new directory for
configure and make, you must also create a
<filename>Makefile.in</filename> and a
- <filename>configure.in</filename>.</para></listitem>
+ <filename>configure.in</filename>.</para></listitem>
</itemizedlist>
</sect1>
<sect1 id=hints xreflabel="Hints On Writing A Test Case">
<title>Hints On Writing A Test Case</title>
-
+
<para>It is safest to write patterns that match all the output
generated by the tested program; this is called closure.
If a pattern does not match the entire output, any output that
<sect1 id=tvariables xreflabel="Test Case Variables">
<title>Special variables used by test cases.</title>
-
+
<para>There are special variables used by test cases. These contain
other information from DejaGnu. Your test cases can use these variables,
with conventional meanings (as well as the variables saved in
<function>${tool}_start</function> command. This is conventionally
used for batch oriented programs, like GCC and GAS, that may
produce interesting output (warnings, errors) without further
- interaction.</para></listitem>
+ interaction.</para></listitem>
</varlistentry>
</variablelist>
</sect1>
-
+
</chapter>
<chapter id=unit xreflabel="Unit Testing">
<title>Unit Testing</title>
-
+
<sect1 id=unittest xreflabel="What Is Unit Testing ?">
<title>What Is Unit Testing ?</title>
-
+
<para>Most regression testing as done by DejaGnu is system
testing. This is the complete application is tested all at
once. Unit testing is for testing single files, or small
<sect1 id=djh xreflabel="The dejagnu.h Header File">
<title>The dejagnu.h Header File</title>
-
+
<para>DejaGnu uses a single header file to assist in unit
testing. As this file also produces it's one test state output,
it can be run standalone, which is very useful for testing on
messages, and then merge them into DejaGnu's.</para>
</sect1>
-
+
</chapter>
<!-- Keep this comment at the end of the file
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
calc.h: stamp-h1
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status calc.h
-$(srcdir)/calc.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/calc.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
touch $(srcdir)/calc.h.in
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-calc$(EXEEXT): $(calc_OBJECTS) $(calc_DEPENDENCIES)
+calc$(EXEEXT): $(calc_OBJECTS) $(calc_DEPENDENCIES)
@rm -f calc$(EXEEXT)
$(LINK) $(calc_LDFLAGS) $(calc_OBJECTS) $(calc_LDADD) $(LIBS)
-.\"
+.\"
.TH SKEL 1 "28th Jan 1993"
.SH NAME
calc \- a very dumb calculator to demonstrate
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-hello$(EXEEXT): $(hello_OBJECTS) $(hello_DEPENDENCIES)
+hello$(EXEEXT): $(hello_OBJECTS) $(hello_DEPENDENCIES)
@rm -f hello$(EXEEXT)
$(LINK) $(hello_LDFLAGS) $(hello_OBJECTS) $(hello_LDADD) $(LIBS)
])
AC_LANG_C
-if test x"${ac_cv_stl}" != x"v2" ; then
+if test x"${ac_cv_stl}" != x"v2" ; then
AC_MSG_RESULT(v3)
AC_DEFINE(HAVE_STL3)
else
tru64)
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
tmpdepfile1="$object.d"
- tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
+ tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
"$@" -Wc,-MD
else
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
# ------------------------------------------------------------------------
AUTOMAKE_OPTIONS = dejagnu
-RUNTESTDEFAULTFLAGS = -v -v
+RUNTESTDEFAULTFLAGS = -v -v
# hello_AUTOMAKE_OPTIONS = dejagnu
# hello_RUNTESTDEFAULTFLAGS = --srcdir $$srcdir/testsuite testsuite.exp
check-demo:
- runtest testsuite.exp
\ No newline at end of file
+ runtest testsuite.exp
tclsh = @tclsh@
AUTOMAKE_OPTIONS = dejagnu
-RUNTESTDEFAULTFLAGS = -v -v
+RUNTESTDEFAULTFLAGS = -v -v
subdir = testsuite
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
set shell_id [remote_spawn $rh "$mondfe -D -TIP $remote_host"]
remote_expect $rh 60 {
- "$shell_prompt" {
+ "$shell_prompt" {
verbose "Got prompt"
set result 0
}
warning "$expect_out(1,string)"
exp_continue
}
- timeout {
+ timeout {
warning "Timed out trying to connect."
set result -1
incr retries
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# start the shell
expect {
- "*Spectra Cross-Development Shell version*$xsh_shell_prompt" {
+ "*Spectra Cross-Development Shell version*$xsh_shell_prompt" {
verbose "Got prompt"
set result 0
}
- timeout {
+ timeout {
warning "Timed out trying to connect."
set result -1
incr retries
}
-re ".* reset on target.*$" {
send_user "Spectra was reset\n"
- exp_continue
+ exp_continue
}
-re "\[0-9A-Fa-f\]+\[ 0x\]+\[0-9A-Fa-f\]+.*$" {
exp_continue
set result -1
incr retries
if { $retries <= 2 } {
- exp_continue
+ exp_continue
}
}
}
}
-re ".*reset on target.*$" {
verbose "Spectra was reset"
- exp_continue
+ exp_continue
}
-re "\[0-9A-Fa-f\]+\[ 0x\]+\[0-9A-Fa-f\]+.*$" {
#send "\n"
}
-i $shell_id "Warm reset on target*\n" {
verbose "Spectra did a warm reset"
- exp_continue
+ exp_continue
}
-i $shell_id "Cold reset on target*\n" {
verbose "Spectra did a cold reset"
}
-i $shell_id "$xsh_shell_prompt" {
set result 0
- exp_continue
+ exp_continue
}
-i $shell_id "load: no default target" {
perror "default target isn't set"
./configure --prefix=/usr
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
libexecdir=/usr/lib/locate localstatedir=/var/lib/locate all
-# $(MAKE)
+# $(MAKE)
touch build
clean:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-unit$(EXEEXT): $(unit_OBJECTS) $(unit_DEPENDENCIES)
+unit$(EXEEXT): $(unit_OBJECTS) $(unit_DEPENDENCIES)
@rm -f unit$(EXEEXT)
$(CXXLINK) $(unit_LDFLAGS) $(unit_OBJECTS) $(unit_LDADD) $(LIBS)
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Execute the test case, and analyse the output
if { [host_execute "unit"] != "" } {
perror "unit had an execution error" 0
-}
+}
# All done, back to the top level test directory
cd ..
#endif
testClass1.tname = "testType1";
- testClass1.tnum = 1;
+ testClass1.tnum = 1;
testClass2.tname = "testType2";
- testClass2.tnum = 2;
+ testClass2.tnum = 2;
testClass3.tname = "testType3";
- testClass3.tnum = 3;
-
+ testClass3.tnum = 3;
+
// Test the pass message
test.pass ("bogus pass message for testing");
outstate = os2;
}
}
-# this tests a proc for a returned value
+# this tests a proc for a returned value
proc lib_ret_test { cmd arg val } {
catch "$cmd \"$arg\"" result
# catch "set result [$cmd $arg]" output
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist"
}
-set file $srcdir/../lib/remote.exp
+set file $srcdir/../lib/remote.exp
if [ file exists $file] {
source $file
} else {
#
# Connect to the configured target
-#
+#
set target_info(target,netport) $target_info(idp,netport)
set target_info(target,target) localhost
set target_info(target,connect) rlogin
#
# Connect to the configured host
-#
+#
set target_info(host,connect) rlogin
set target_info(host,netport) $target_info(idp,netport)
set target_info(host,target) localhost
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-dejagnu@gnu.org
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist"
}
-set file $srcdir/../lib/target.exp
+set file $srcdir/../lib/target.exp
if [ file exists $file] {
source $file
} else {
puts "ERROR: $file doesn't exist"
}
# we load framework so we can use stuff like is3way
-set file $srcdir/../lib/framework.exp
+set file $srcdir/../lib/framework.exp
if [ file exists $file] {
source $file
} else {
puts "ERROR: $file doesn't exist"
}
# we load the remote stuff so we can test execute_anywhere
-set file $srcdir/../lib/remote.exp
+set file $srcdir/../lib/remote.exp
if [ file exists $file] {
source $file
} else {
puts "ERROR: $srcdir$subdir/default_procs.tcl doesn't exist"
}
-set file $srcdir/../lib/utils.exp
+set file $srcdir/../lib/utils.exp
if [ file exists $file] {
source $file
} else {
if { $env(TESTRUN) == "FooBar" } {
pass "setenv, set an environment variable"
} else {
- fail "setenv, set an environment variable
+ fail "setenv, set an environment variable
}
} else {
fail "setenv, set an environment variable"