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

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