* gdb.base/completion.exp: Check that all expected files exist
authorDoug Evans <dje@google.com>
Fri, 16 May 2014 19:46:24 +0000 (12:46 -0700)
committerDoug Evans <dje@google.com>
Fri, 16 May 2014 19:46:24 +0000 (12:46 -0700)
before doing file completion.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/completion.exp

index 275aa9911e2dafbcb7b14ffa0976f97b7f203d13..e411bd3333af148e93790d8cdbad3ca74e07baba 100644 (file)
@@ -1,6 +1,8 @@
 2014-05-16  Doug Evans  <dje@google.com>
 
        * gdb.base/Makefile.in (EXECUTABLES): Add completion.
+       * gdb.base/completion.exp: Check that all expected files exist
+       before doing file completion.
 
 2014-05-16  Doug Evans  <dje@google.com>
 
index 1e152f62e45f203781740bca2afc8d53e3ad197c..2608309734a8cb8aef21000b9f648f5e578230f8 100644 (file)
@@ -110,7 +110,9 @@ gdb_test_multiple "target ctf" "" {
 # do the test on file completion.
 
 foreach dir1 [ list "./gdb.base" "./outputs/gdb.base/completion" ] {
-    if [remote_file host exists ${dir1}/completion] {
+    if { [remote_file host exists ${dir1}/completion]
+        && [remote_file host exists ${dir1}/completion0.o]
+        && [remote_file host exists ${dir1}/completion1.o] } {
        foreach target_name ${targets} {
            gdb_test "complete target ${target_name} ${dir1}/completion" \
                "target ${target_name} ${dir1}/completion.*${dir1}/completion0\\.o.*${dir1}/completion1\\.o.*"