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

Unified Diff: remoting/test/chromoting_test_driver.cc

Issue 1164143002: Added new driver for chromoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows return at FAIL() fix Created 5 years, 6 months 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
« no previous file with comments | « remoting/test/app_remoting_connected_client_fixture.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/chromoting_test_driver.cc
diff --git a/remoting/test/chromoting_test_driver.cc b/remoting/test/chromoting_test_driver.cc
new file mode 100644
index 0000000000000000000000000000000000000000..42a7abdcf20b617a840cf55eefe7853cd1377f75
--- /dev/null
+++ b/remoting/test/chromoting_test_driver.cc
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <string>
+
+#include "base/command_line.h"
+#include "base/test/test_suite.h"
+#include "base/test/test_switches.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace switches {
+const char kSingleProcessTestsSwitchName[] = "single-process-tests";
+const char kUserNameSwitchName[] = "username";
+}
+
+int main(int argc, char* argv[]) {
+ testing::InitGoogleTest(&argc, argv);
+ base::TestSuite test_suite(argc, argv);
+
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ DCHECK(command_line);
+
+ // Do not retry if tests fails.
+ command_line->AppendSwitchASCII(switches::kTestLauncherRetryLimit, "0");
+
+ // Different tests may require access to the same host if run in parallel.
+ // To avoid shared resource contention, tests will be run one at a time.
+ command_line->AppendSwitch(switches::kSingleProcessTestsSwitchName);
+
+ std::string username =
+ command_line->GetSwitchValueASCII(switches::kUserNameSwitchName);
+
+ // Verify that the username is passed in as an argument.
+ if (username.empty()) {
+ LOG(ERROR) << "No username passed in, can't authenticate without that!";
+ return -1;
+ }
+ DVLOG(1) << "Running chromoting tests as: " << username;
+
+ return 0;
+}
+
« no previous file with comments | « remoting/test/app_remoting_connected_client_fixture.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698