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

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