This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/testsuite] Remote host testing fix for completion.exp
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 16 Feb 2010 15:22:09 -0500
- Subject: [commit/testsuite] Remote host testing fix for completion.exp
Jan switched this test to use a unique directory in the objdir when
gdb/testsuite became no longer unique. That patch used "file mkdir";
this doesn't work out right if you're running the tests with remote
host (e.g. DejaGNU running on Linux, gdb running on Windows or a
remote Linux host). It's always troublesome to create files on the
build system and access them on the host, or vice versa, because all
network filesystems have some degree of caching.
For files we solve this with remote_upload / remote_download. DejaGNU
does not have equally useful facilities for directories, though. So I
have switched this test back to using the srcdir - but I gave it a
dedicated directory this time, so it shouldn't break so often.
You may have to cvs up -dP, if you don't usually do that, to get the
new gdb.base/comp-dir.
Tested on arm-none-eabi and x86_64-linux, local and remote host.
Committed to trunk.
--
Daniel Jacobowitz
CodeSourcery
2010-02-16 Daniel Jacobowitz <dan@codesourcery.com>
gdb/testsuite/
* gdb.base/comp-dir/subdir/dummy.txt: New file.
* gdb.base/completion.exp: Use comp-dir/subdir instead of creating
a temporary directory.
diff -Nurp gdb-merged-orig/gdb/testsuite/gdb.base/comp-dir/subdir/dummy.txt gdb-merged/gdb/testsuite/gdb.base/comp-dir/subdir/dummy.txt
--- gdb-merged-orig/gdb/testsuite/gdb.base/comp-dir/subdir/dummy.txt 1969-12-31 16:00:00.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.base/comp-dir/subdir/dummy.txt 2010-02-13 12:46:45.000000000 -0800
@@ -0,0 +1 @@
+For completion.exp
diff -Nurp gdb-merged-orig/gdb/testsuite/gdb.base/completion.exp gdb-merged/gdb/testsuite/gdb.base/completion.exp
--- gdb-merged-orig/gdb/testsuite/gdb.base/completion.exp 2010-02-10 14:54:32.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.base/completion.exp 2010-02-13 12:47:51.000000000 -0800
@@ -724,14 +724,11 @@ gdb_test "cd ${fullsrcdir}" \
# GDB used to fail adding / on directories, on the first try only.
-# Do not use the `completion' start here as it would conflict with the
-# testcase (complete 'file ./gdb.base/complet') expectations.
-set uniquedir ${objdir}/${subdir}/compl-uNiQuEdIr
+set uniquedir ../testsuite/gdb.base/comp-dir
set escapeduniquedir [string_to_regexp ${uniquedir}]
set uniquesu subdi
set uniquesub ${uniquesu}r
set escapeuniquesub [string_to_regexp ${uniquesub}]
-file mkdir ${uniquedir}/${uniquesub}
send_gdb "dir ${uniquedir}\t"
gdb_expect {
-re "${escapeduniquedir}/" {