This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Command trace testsuite
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Tue, 8 Aug 2006 13:33:57 -0400
- Subject: Re: [PATCH] Command trace testsuite
- References: <44D772B2.5090301@st.com>
On Mon, Aug 07, 2006 at 06:04:50PM +0100, Andrew STUBBS wrote:
> Here is a set of tests for the 'set trace-commands' command that I added
> a while back.
Thanks!
> +# Source the script with verbose mode.
> +gdb_test "source -v tracecommandsscript" {source -v tracecommandsscript[\r\n]+\+echo in tracecommandsscript\\n[\r\n]+in tracecommandsscript[\r\n]+\+define func[\r\n]+\+if 1[\r\n]+\+\+if 2[\r\n]+\+\+\+if 3[\r\n]+\+\+\+\+if 4[\r\n]+\+\+\+\+\+echo deep\\n[\r\n]+deep[\r\n]+\+\+\+\+\+func 999[\r\n]+\+\+\+\+\+\+echo in func 999\\n[\r\n]+in func 999} "source -v"
For this sort of test, there's gdb_expect_list. The nice thing about
that is that it will tell you where there's a problem on errors (and
not generate thousand-character lines). Could you give that a try?
--
Daniel Jacobowitz
CodeSourcery