This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Command trace testsuite


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]