Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Unified Diff: mojo/public/cpp/application/lib/application_test_main.cc

Issue 744973002: Pass command line args to apptests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: switch to using --args-for to pass arguments to apptests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/application/lib/application_test_main.cc
diff --git a/mojo/public/cpp/application/lib/application_test_main.cc b/mojo/public/cpp/application/lib/application_test_main.cc
index 6cdfb0d7fa53eab272d69fdd3967e28ce3a0a038..573a1d3114c01be6f826145f71a3963180bf9864 100644
--- a/mojo/public/cpp/application/lib/application_test_main.cc
+++ b/mojo/public/cpp/application/lib/application_test_main.cc
@@ -21,7 +21,8 @@ MojoResult MojoMain(MojoHandle shell_handle) {
// Construct an ApplicationImpl just for the GTEST commandline arguments.
// GTEST command line arguments are supported amid application arguments:
- // $ mojo_shell 'mojo:example_apptests arg1 --gtest_filter=foo arg2'
+ // $ mojo_shell mojo:example_apptests \
+ // --args-for='mojo:example_apptests arg1 --gtest_filter=foo arg2'
mojo::ApplicationDelegate dummy_application_delegate;
mojo::ApplicationImpl app(&dummy_application_delegate, shell_handle);
MOJO_CHECK(app.WaitForInitialize());
@@ -40,6 +41,7 @@ MojoResult MojoMain(MojoHandle shell_handle) {
testing::InitGoogleTest(&argc, const_cast<char**>(&(argv[0])));
mojo::test::SetShellHandle(app.UnbindShell());
+ mojo::test::InitializeArgs(argc, argv);
}
int result = RUN_ALL_TESTS();

Powered by Google App Engine
This is Rietveld 408576698