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

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