]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.chill/pr-5016.exp
Major revision to testsuites for cross-testing and DOS testing support.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.chill / pr-5016.exp
index 0e4f83d28294f23009a8a346e3e9b037cd749d3c..2a036d1a2f68563aa753982d25225d79d1626109 100644 (file)
@@ -12,7 +12,7 @@
 # 
 # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@prep.ai.mit.edu
@@ -23,6 +23,16 @@ if $tracelevel then {
        strace $tracelevel
 }
 
+if [skip_chill_tests] then { continue }
+
+set testfile "pr-5016"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+    perror "Couldn't compile ${srcfile}"
+    return -1
+}
+
 proc do_tests {} {
     global prms_id bug_id subdir objdir srcdir binfile prompt
 
@@ -34,26 +44,19 @@ proc do_tests {} {
     gdb_exit
     gdb_start
     gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $objdir/$subdir/$binfile
+    gdb_load $binfile
 
-    send "set language chill\n" ; expect -re "$prompt $"
+    gdb_test "set language chill ""
 
     runto dump
+    # Linux thinks type is "_cint" (and so does sparc-sun-sunos4, alpha-dec-osf2.0)
+    #setup_xfail "i*86-pc-linux*-gnu" "sparc-sun-sunos4*" "alpha-dec-osf2*"
     gdb_test "whatis i" "type = m_index" "whatis int-range"
     gdb_test_exact "ptype m_index" "type = RANGE (1:10)" "ptype m_index"
     gdb_test_exact "whatis a" "type = /*LOC*/ vector"
     gdb_test "ptype a" "type = /\\*LOC\\*/ ARRAY \\(1:10\\) (INT|int)"
+    gdb_test "step ""
+    gdb_test_exact "whatis i" "type = long" "whatis loop counter i"
 }
 
-# Check to see if we have an executable to test.  If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-5016.exe"
-set srcfile $binfile.ch
-
-if ![file exists $objdir/$subdir/$binfile] then {
-    warning "$binfile does not exist; tests suppressed."
-} else {
-    do_tests
-}
+do_tests