ronniebhatti / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

--gtest_output flag doesn't produce output on platforms where argv[0] is empty #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
From user's email:

I'm evaluating Google Test on VXWorks with the Wind River compiler.
The source code runs on a special control device with a motorolla
platform, without
any shell to visualize standard out.

So I try to write out a xml file with the right flag --gtest_output.
But nothing happens. Gtest don't want write any file.

I find out, that argv[0] in the main function is empty.
On Windows XP, there is the program name / path.

Original issue reported on code.google.com by vladlosev on 22 Oct 2008 at 6:15

GoogleCodeExporter commented 9 years ago

Original comment by shiq...@gmail.com on 2 Dec 2008 at 5:00

GoogleCodeExporter commented 9 years ago
If you want to work this.

You should use this solution

char *option[] = { "test.exe", //it doesn't have meaning, just dummy
                   "--gtest_output=xml:filename" };
int argc = 2;

InitGoogleTest( &argc, option );

Original comment by chars...@gmail.com on 13 Apr 2009 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by w...@google.com on 27 Sep 2010 at 7:09