This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfa][testsuite] Consolidade Python test functions in lib/gdb.exp.
- From: Tom Tromey <tromey at redhat dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Mon, 20 Apr 2009 11:13:10 -0600
- Subject: Re: [rfa][testsuite] Consolidade Python test functions in lib/gdb.exp.
- References: <1240154454.19777.39.camel@localhost.localdomain>
- Reply-to: tromey at redhat dot com
>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
Thiago> This is a cleanup on the testcases in gdb.python. Currently,
Thiago> they define the same test functions in each .exp. I put them
Thiago> in lib/gdb.exp instead.
It looks like the GDB style is to put specific support functions into
a new file, e.g., "mi-support.exp". So perhaps we should add
"python-support.exp"... WDYT?
Thiago> +# Return 1 if Python scripting is supported in GDB, 0 if not.
Thiago> +proc python_supported { } {
Thiago> + global gdb_prompt
I think this proc should do the test only once per runtest invocation,
and just return a cached result in subsequent calls.
Otherwise this looks reasonable to me.
Tom