forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored remoting targets to support app remoting and chromoting. B…
…uilt a new driver to support chromoting. BUG= Review URL: https://codereview.chromium.org/1164143002 Cr-Commit-Position: refs/heads/master@{#333840}
- Loading branch information
tonychun
authored and
Commit bot
committed
Jun 10, 2015
1 parent
b90621c
commit 61931fe
Showing
6 changed files
with
137 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|