This means stdout and stderr are not created for ClientThreadBase_ instances, right?
stdin, stdout and stderr specify the executed program’s standard input, standard output and standard error file handles, respectively. Valid values are PIPE, an existing file descriptor (a positive integer), an existing file object, and None. PIPE indicates that a new pipe to the child should be created. With the default settings of None, no redirection will occur; the child’s file handles will be inherited from the parent.
I'm not terribly familiar with pdb, could you explain why this was necessary?
Are you familiar with other tools and how they handle such a use case?
On Wed, Apr 18, 2012 at 2:26 PM, Robert Schuppenies <sch...@google.com> wrote:
This means stdout and stderr are not created for ClientThreadBase_ instances, right?I grepped for ClientThreadBase_ in the gaedriver code and couldn't find it, so I'm not sure what you're referring to.
stdin, stdout and stderr specify the executed program’s standard input, standard output and standard error file handles, respectively. Valid values are PIPE, an existing file descriptor (a positive integer), an existing file object, and None. PIPE indicates that a new pipe to the child should be created. With the default settings of None, no redirection will occur; the child’s file handles will be inherited from the parent.I'm not terribly familiar with pdb, could you explain why this was necessary?Without this, the stdio of the subprocess gaedriver spawns with your app in it gets swallowed up. So nothing your app writes to stdout is displayed, including any logging it does to stdout, which is helpful to see while debugging failing tests.
pdb is like other command line debuggers (gdb, jdb, etc). Calling pdb.set_trace() from in your app halts execution, prints a debugging environment to stdout, and waits for input from stdin so you can interact with the state of your program while it's running. But since your program's stdio is not connected to your terminal's when spawned by gaedriver, putting a breakpoint in your app makes it silently stuck forever.
Are you familiar with other tools and how they handle such a use case?
Nose's --pdb-failures option comes to mind, but nose is for unit tests, not end-to-end tests, so doing exactly what nose does wouldn't be possible / appropriate. I'm not sure about other tools, but I agree checking out some other test drivers to see what they do is a good idea.