Bug 1027497 - Move Gtest startup after Qt/Gtk initialization. r=BenWa

This commit is contained in:
Mike Hommey 2014-06-25 08:36:12 +09:00
parent 934a0b53a3
commit 7dfa49820c

View File

@ -3215,19 +3215,6 @@ XREMain::XRE_mainInit(bool* aExitFlag)
return 0; return 0;
} }
if (PR_GetEnv("MOZ_RUN_GTEST")) {
int result;
// RunGTest will only be set if we're in xul-unit
if (mozilla::RunGTest) {
result = mozilla::RunGTest();
} else {
result = 1;
printf("TEST-UNEXPECTED-FAIL | gtest | Not compiled with enable-tests\n");
}
*aExitFlag = true;
return result;
}
return 0; return 0;
} }
@ -3432,7 +3419,22 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
// opens. // opens.
if (!gtk_parse_args(&gArgc, &gArgv)) if (!gtk_parse_args(&gArgc, &gArgv))
return 1; return 1;
#endif /* MOZ_WIDGET_GTK */
if (PR_GetEnv("MOZ_RUN_GTEST")) {
int result;
// RunGTest will only be set if we're in xul-unit
if (mozilla::RunGTest) {
result = mozilla::RunGTest();
} else {
result = 1;
printf("TEST-UNEXPECTED-FAIL | gtest | Not compiled with enable-tests\n");
}
*aExitFlag = true;
return result;
}
#if defined(MOZ_WIDGET_GTK)
// display_name is owned by gdk. // display_name is owned by gdk.
const char *display_name = gdk_get_display_arg_name(); const char *display_name = gdk_get_display_arg_name();
if (display_name) { if (display_name) {
@ -3444,7 +3446,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
return 1; return 1;
} }
} }
#endif /* MOZ_WIDGET_GTK2 */ #endif /* MOZ_WIDGET_GTK */
#ifdef MOZ_ENABLE_XREMOTE #ifdef MOZ_ENABLE_XREMOTE
// handle -remote now that xpcom is fired up // handle -remote now that xpcom is fired up