Blame SOURCES/gdb-6.3-test-movedir-20050125.patch

f9426a
2005-01-25  Elena Zannoni  <ezannoni@redhat.com>
f9426a
f9426a
        * gdb.base/move-dir.exp: New test.
f9426a
        * gdb.base/move-dir.c: Ditto.
f9426a
        * gdb.base/move-dir.h: Ditto.
f9426a
f9426a
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
f9426a
===================================================================
f9426a
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
f9426a
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c	2008-12-07 23:57:41.000000000 +0100
f9426a
@@ -0,0 +1,10 @@
f9426a
+#include <stdio.h>
f9426a
+#include <stdlib.h>
f9426a
+#include "move-dir.h"
f9426a
+
f9426a
+int main() {
f9426a
+   const char* hw = "hello world.";
f9426a
+   printf ("%s\n", hw);;
f9426a
+   other();
f9426a
+}
f9426a
+
f9426a
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
f9426a
===================================================================
f9426a
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
f9426a
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp	2008-12-07 10:13:01.000000000 +0100
f9426a
@@ -0,0 +1,57 @@
f9426a
+#   Copyright 2005
f9426a
+#   Free Software Foundation, Inc.
f9426a
+
f9426a
+# This program is free software; you can redistribute it and/or modify
f9426a
+# it under the terms of the GNU General Public License as published by
f9426a
+# the Free Software Foundation; either version 2 of the License, or
f9426a
+# (at your option) any later version.
f9426a
+# 
f9426a
+# This program is distributed in the hope that it will be useful,
f9426a
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f9426a
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f9426a
+# GNU General Public License for more details.
f9426a
+# 
f9426a
+# You should have received a copy of the GNU General Public License
f9426a
+# along with this program; if not, write to the Free Software
f9426a
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
f9426a
+
f9426a
+set testfile "move-dir"
f9426a
+set srcfile ${testfile}.c
f9426a
+set incfile ${testfile}.h
f9426a
+set binfile ${objdir}/${subdir}/${testfile}
f9426a
+
f9426a
+set testdir "${objdir}/${subdir}/incdir"
f9426a
+
f9426a
+remote_exec build "mkdir $testdir"
f9426a
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}"
f9426a
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${testdir}"
f9426a
+
f9426a
+set additional_flags "additional_flags=-I${subdir}/incdir"
f9426a
+
f9426a
+if  { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
f9426a
+    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
f9426a
+}
f9426a
+
f9426a
+# Create and source the file that provides information about the compiler
f9426a
+# used to compile the test case.
f9426a
+
f9426a
+if [get_compiler_info ${binfile}] {
f9426a
+    return -1;
f9426a
+}
f9426a
+
f9426a
+
f9426a
+set oldtimeout $timeout
f9426a
+set timeout [expr "$timeout + 60"]
f9426a
+
f9426a
+# Start with a fresh gdb.
f9426a
+
f9426a
+gdb_exit
f9426a
+gdb_start
f9426a
+gdb_test "cd ../.." "" ""
f9426a
+gdb_load ${binfile}
f9426a
+gdb_test "list main" ".*hw.*other.*" "found main"
f9426a
+gdb_test "list other" ".*ostring.*" "found include file"
f9426a
+
f9426a
+
f9426a
+set timeout $oldtimeout
f9426a
+return 0
f9426a
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
f9426a
===================================================================
f9426a
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
f9426a
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h	2008-12-07 10:13:01.000000000 +0100
f9426a
@@ -0,0 +1,7 @@
f9426a
+#include <stdlib.h>
f9426a
+
f9426a
+void other() {
f9426a
+  const char* ostring = "other";
f9426a
+  printf ("%s\n", ostring);;
f9426a
+}
f9426a
+