This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On Tue, 9 Feb 1999, John Breen wrote: > From: Scott Howard <scott@objsw.com> > >The stdout/stderr stuff is important to diagnose where the failure > >occurred, but you also need the exit status of the application (the > >value returned to the OS when exit () is called) so the tests can > >determine whether a test passed or failed. > > > >> From: Scott Howard <scott@objsw.com> > >> >The other way that might make it easy would be if > >> >there was a simulator available for the target hardware. > > Could you explain (or point me towards documentation that explains) how > std[in|out|err] and the exit status are returned from a simulator (wrt > running test cases)? Maybe I could kludge something similar with my > emulator. I have done something like this to make it work in the past. + have a "preinclude.h" (better name possible :) that has something like this in it: #define exit my_exit This file should be preincluded using the gcc -include option + have my_exit do something like this: void exit( int s ) { printf( "Exit Code %d\n", s ); exit(s); } + Have a runtest_on_target script that resets the target, runs the code, and collects the output. It can parse the regular output to see the Exit Code message and make that number its exit status. Some scripting is necessary anyway to automate control of a particular target for a download, run, reset sequence. Probably not ideal but it worked and it could work on any target. :) --joel Joel Sherrill Director of Research & Development joel@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985 _______________________________________________ New CrossGCC FAQ: http://www.objsw.com/CrossGCC _______________________________________________ To remove yourself from the crossgcc list, send mail to crossgcc-request@cygnus.com with the text 'unsubscribe' (without the quotes) in the body of the message.