1 2005-01-25 Elena Zannoni <ezannoni@redhat.com>
3 * gdb.base/move-dir.exp: New test.
4 * gdb.base/move-dir.c: Ditto.
5 * gdb.base/move-dir.h: Ditto.
7 Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
8 ===================================================================
9 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
10 +++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c 2008-12-07 23:57:41.000000000 +0100
14 +#include "move-dir.h"
17 + const char* hw = "hello world.";
18 + printf ("%s\n", hw);;
22 Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
23 ===================================================================
24 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
25 +++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp 2008-12-07 10:13:01.000000000 +0100
28 +# Free Software Foundation, Inc.
30 +# This program is free software; you can redistribute it and/or modify
31 +# it under the terms of the GNU General Public License as published by
32 +# the Free Software Foundation; either version 2 of the License, or
33 +# (at your option) any later version.
35 +# This program is distributed in the hope that it will be useful,
36 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
37 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 +# GNU General Public License for more details.
40 +# You should have received a copy of the GNU General Public License
41 +# along with this program; if not, write to the Free Software
42 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
44 +set testfile "move-dir"
45 +set srcfile ${testfile}.c
46 +set incfile ${testfile}.h
47 +set binfile ${objdir}/${subdir}/${testfile}
49 +set testdir "${objdir}/${subdir}/incdir"
51 +remote_exec build "mkdir $testdir"
52 +remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}"
53 +remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${testdir}"
55 +set additional_flags "additional_flags=-I${subdir}/incdir"
57 +if { [gdb_compile "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
58 + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
61 +# Create and source the file that provides information about the compiler
62 +# used to compile the test case.
64 +if [get_compiler_info ${binfile}] {
69 +set oldtimeout $timeout
70 +set timeout [expr "$timeout + 60"]
72 +# Start with a fresh gdb.
76 +gdb_test "cd ../.." "" ""
78 +gdb_test "list main" ".*hw.*other.*" "found main"
79 +gdb_test "list other" ".*ostring.*" "found include file"
82 +set timeout $oldtimeout
84 Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
85 ===================================================================
86 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
87 +++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h 2008-12-07 10:13:01.000000000 +0100
92 + const char* ostring = "other";
93 + printf ("%s\n", ostring);;