This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Update testsuite: insight-support.exp


Hi,

Over in gdb-land, I've ripped our testsuite stuff into a separate file
from gdb.exp. I have updated the testsuite driver files and the README to
reflect the change.

Keith

ChangeLog
2001-08-30  Keith Seitz  <keiths@redhat.com>

	* README: Update documentation to reflect recent changes.
	* browser.exp: Load the insight testsuite support library.
	* c_variable.exp: Likewise.
	* console.exp: Likewise.
	* cpp_variable.exp: Likewise.
	* srcwin.exp: Likewise.

Patch
Index: README
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/README,v
retrieving revision 1.1
diff -u -p -r1.1 README
--- README	2001/05/07 20:39:32	1.1
+++ README	2001/08/30 16:35:20
@@ -105,28 +105,16 @@ proc gdbtk_start {test}
     src/gdb/testsuite)
   SUBDIR
     The dejagnu testsuite subdirectory for the test (i.e., gdb.gdbtk)
-  GDBTK_LIBRARY
-    The location of the Insight tcl library (i.e., src/gdb/gdbtk/library)
-  TCL_LIBRARY
-    The location of the Tcl library (i.e., src/tcl/library)
-  TK_LIBRARY
-    The location of the Tk library (i.e., src/tk/library)
-  TIX_LIBRARY
-    The location of the Tix library (i.e., src/tix/library)
-  ITCL_LIBRARY
-    The location fo the Itcl librarry (i.e., src/itcl/itcl/library)
-  CYGNUS_GUI_LIBRARY
-    The location of libgui (i.e., src/libgui/library)
   DEFS
     The location of the testsuite definitions file (i.e.,
     src/gdb/testsuite/gdb.gdbtk/defs)

-  Note that *_LIBRARY and DEFS are converted to absolute tcl-style
-  paths. On unix, this means that GDBTK_LIBRARY would point to, for example,
-  /home/keiths/insight/src/gdb/gdbtk/library. On Cygwin it would point to
-  C:/cygwin/home/keiths/insight/src/gdb/gdbtk/library. This is because of
-  a descrepency between Cygwin's posix paths and Tcl's not-quite-posix
-  paths.
+  Note that DEFS is converted to abs$lute tcl-style paths. On unix,
+  this means that DEFS would point to, for example,
+  /home/keiths/insight/src/gdb/testsuite/gdb.gdbtk/defs. On Cygwin it
+  would point to C:/cygwin/home/keiths/insight/src/gdb/testsuite/gdb.gdbtk/defs.
+  This is because of a descrepency between Cygwin's posix paths and Tcl's
+  not-quite-posix paths.

 proc gdbtk_analyze_results {results}
   This function translates the list of results in RESULTS into dejagnu
@@ -215,26 +203,29 @@ gdb's dejagnu testsuite, the basic tests
 (minimally) like this:

 File: mytest.exp
-1   if {[gdbtk_initialize_display]} {
-2     # We found a display to use
-3     gdb_exit;   # Make sure any previous gdb is gone
-4     set results [gdbtk_start mytest.test]
-5
-6     # Done!
-7     gdbtk_done [split $results \n]
-8   }
-
-Line 1 calls gdbtk_initialize_display to ascertain whether there is a display
+1   load_lib "insight-support.exp"
+2   if {[gdbtk_initialize_display]} {
+3     # We found a display to use
+4     gdb_exit;   # Make sure any previous gdb is gone
+5     set results [gdbtk_start mytest.test]
+6
+7     # Done!
+8     gdbtk_done [split $results \n]
+9   }
+
+Line 1 loads the insight testsuite support library which contains definitions
+for all the procedures used in dejagnu to initialize and run the Insight testsuite.
+Line 2 calls gdbtk_initialize_display to ascertain whether there is a display
 to use for the test. This could use an existing display (if GDB_DISPLAY is
 set in the environment) or gdbk_initialize_display could startup an Xvfb
 for use by the testsuite.

-Line 3 forces any previously executing gdb to terminate.
+Line 4 forces any previously executing gdb to terminate.

-Line 4 signals the start of the test run. "mytest.test" is the name of the
+Line 5 signals the start of the test run. "mytest.test" is the name of the
 Tcl test file to execute in Insight's built-in Tcl interpreter. The output
 of gdbtk_start_test is all of the results of the Tcl test from Insight, which
-is subsequently passed to gdbk_analyze_results via gdbtk_done on Line 7.
+is subsequently passed to gdbk_analyze_results via gdbtk_done on Line 8.

 Note how nothing happens if gdbtk_initialize_display returns false.

@@ -356,7 +347,7 @@ GUI. Please do not write tests which att
 mouse and clicking buttons), unless there is no other way to test the functionality.

 The basic test file (with one test) looks like this (nonsensical one):
-File: mytest.exp
+File: mytest.test
 1  if {![gdbtk_read_defs]} {
 2    break
 3  }
Index: browser.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/browser.exp,v
retrieving revision 1.2
diff -u -p -r1.2 browser.exp
--- browser.exp	2001/05/07 20:39:32	1.2
+++ browser.exp	2001/08/30 16:35:20
@@ -10,6 +10,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.

+load_lib insight-support.exp
+
 if {[gdbtk_initialize_display]} {
   if {$tracelevel} {
     strace $tracelevel
Index: c_variable.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/c_variable.exp,v
retrieving revision 1.2
diff -u -p -r1.2 c_variable.exp
--- c_variable.exp	2001/05/07 20:39:32	1.2
+++ c_variable.exp	2001/08/30 16:35:20
@@ -10,6 +10,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.

+load_lib insight-support.exp
+
 if {[gdbtk_initialize_display]} {
   if {$tracelevel} {
     strace $tracelevel
Index: console.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/console.exp,v
retrieving revision 1.2
diff -u -p -r1.2 console.exp
--- console.exp	2001/05/07 20:39:32	1.2
+++ console.exp	2001/08/30 16:35:20
@@ -10,6 +10,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.

+load_lib insight-support.exp
+
 if {[gdbtk_initialize_display]} {
   if {$tracelevel} {
     strace $tracelevel
Index: cpp_variable.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/cpp_variable.exp,v
retrieving revision 1.2
diff -u -p -r1.2 cpp_variable.exp
--- cpp_variable.exp	2001/05/07 20:39:32	1.2
+++ cpp_variable.exp	2001/08/30 16:35:20
@@ -10,6 +10,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.

+load_lib insight-support.exp
+
 if {[gdbtk_initialize_display]} {
   if {$tracelevel} {
     strace $tracelevel
Index: srcwin.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.gdbtk/srcwin.exp,v
retrieving revision 1.2
diff -u -p -r1.2 srcwin.exp
--- srcwin.exp	2001/05/07 20:39:32	1.2
+++ srcwin.exp	2001/08/30 16:35:20
@@ -10,6 +10,8 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.

+load_lib insight-support.exp
+
 if {[gdbtk_initialize_display]} {
   if {$tracelevel} {
     strace $tracelevel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]