gdb.mi/mi-info-os.exp: Fix cross-debugger testing
authorPedro Alves <palves@redhat.com>
Thu, 9 Jan 2014 19:57:13 +0000 (19:57 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 9 Jan 2014 19:57:13 +0000 (19:57 +0000)
commitc6a9e42ce45887180e2918ab53b323282193000d
treea6ee59b1f093c9b9278735f1762dff4446310ded
parente2e6193d65a20e6b7fccba288e5d1bc45b78d194
gdb.mi/mi-info-os.exp: Fix cross-debugger testing

A live target is required for `-info-os' to work in non-native
configurations.

 (gdb)
 Expecting: ^(-info-os[
 ]+)?(.*\^done,OSDataTable=.*[
 ]+[(]gdb[)]
 [ ]*)
 -info-os
 ^error,msg="Don't know how to get OS data.  Try \"help target\"."
 (gdb)
 FAIL: gdb.mi/mi-info-os.exp: -info-os

If GDB does have a native configuration included, but we're testing
remote, it'll be worse, as if we're not connected yet, -info-os will
run against the default run target, and pass, falsely giving the
impression the remote bits were exercised.

gdb/testsuite/
2014-01-09  Maciej W. Rozycki  <macro@codesourcery.com>
    Pedro Alves  <palves@redhat.com>

* gdb.mi/mi-info-os.exp: Connect to the target with
        mi_gdb_target_load.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-info-os.exp