Bug 552117 - Print current test name in IPDL tests. r=cjones

--HG--
extra : rebase_source : 45b554a05e8a9e3ca627b10f633a955cec4f0f05
This commit is contained in:
Josh Matthews 2010-03-13 13:23:50 +13:00
parent 8d6f4dd13b
commit 9e6dd7d2f1
2 changed files with 4 additions and 1 deletions

View File

@ -54,6 +54,7 @@
#define MOZ_IPDL_TESTFAIL_LABEL "TEST-UNEXPECTED-FAIL"
#define MOZ_IPDL_TESTPASS_LABEL "TEST-PASS"
#define MOZ_IPDL_TESTINFO_LABEL "TEST-INFO"
namespace mozilla {

View File

@ -126,12 +126,14 @@ IPDLUnitTestMain(void* aData)
IPDLUnitTestType test = IPDLUnitTestFromString(testString);
if (!test) {
// use this instead of |fail()| because we don't know what the test is
fprintf(stderr, MOZ_IPDL_TESTFAIL_LABEL "| %s | unknown unit test %s\\n",
fprintf(stderr, MOZ_IPDL_TESTFAIL_LABEL "| %s | unknown unit test %s\n",
"<--->", testString);
NS_RUNTIMEABORT("can't continue");
}
gIPDLUnitTestName = testString;
printf(MOZ_IPDL_TESTINFO_LABEL "| running test | %s\n", gIPDLUnitTestName);
std::vector<std::string> testCaseArgs;
testCaseArgs.push_back(testString);