summaryrefslogtreecommitdiffstats
path: root/remoting/tools
diff options
context:
space:
mode:
authornicholss <nicholss@chromium.org>2015-09-29 11:06:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-29 18:08:58 +0000
commit284d97f05d577fd3b5b1fc7115368a7b1d292e10 (patch)
tree898e1c47c17ccbd1bcd0bbea98ae01571d92ad31 /remoting/tools
parent20e1ede5e6eb73dac71b026a8d76da195048145a (diff)
downloadchromium_src-284d97f05d577fd3b5b1fc7115368a7b1d292e10.zip
chromium_src-284d97f05d577fd3b5b1fc7115368a7b1d292e10.tar.gz
chromium_src-284d97f05d577fd3b5b1fc7115368a7b1d292e10.tar.bz2
Chrome Remote Desktop client integration for host OS details.
This will add the first pass integration for the client to have an understanding of what kind of host OS and what the host OS version it will be connecting to. There is also a minor update to the client side test runner to add an optional parameter (--build-path) to allow each testing for the newer style of gn builds that want to target the out/Default directory. Build path defaults to "out/Debug" as before, but it is now overridable to a new target. R=kelvinp@chromium.org BUG=534902 Review URL: https://codereview.chromium.org/1373913002 Cr-Commit-Position: refs/heads/master@{#351352}
Diffstat (limited to 'remoting/tools')
-rwxr-xr-xremoting/tools/run_webapp_unittests.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/remoting/tools/run_webapp_unittests.py b/remoting/tools/run_webapp_unittests.py
index bff7128..e9cfada 100755
--- a/remoting/tools/run_webapp_unittests.py
+++ b/remoting/tools/run_webapp_unittests.py
@@ -27,12 +27,12 @@ def GetChromePath():
return chrome_path
-def BuildTestPageUri(opt_module=None, opt_coverage=False):
+def BuildTestPageUri(build_path, opt_module=None, opt_coverage=False):
"""Builds the Uri for the test page with params."""
script_path = os.path.dirname(__file__)
test_page_path = os.path.join(script_path,
- '../../out/Debug/remoting/unittests/unittests.html')
+ '../../' + build_path + '/remoting/unittests/unittests.html')
test_page_path = 'file://' + os.path.abspath(test_page_path)
test_page_params = {}
@@ -45,7 +45,7 @@ def BuildTestPageUri(opt_module=None, opt_coverage=False):
return '"' + test_page_path + '"'
-def BuildCommandLine(chrome_path, opt_module, opt_coverage):
+def BuildCommandLine(chrome_path, build_path, opt_module, opt_coverage):
"""Builds the command line to execute."""
command = []
command.append('"' + chrome_path + '"')
@@ -53,7 +53,7 @@ def BuildCommandLine(chrome_path, opt_module, opt_coverage):
# The flag |--allow-file-access-from-files| is required so that we can open
# JavaScript files using XHR and instrument them for code coverage.
command.append(' --allow-file-access-from-files')
- test_page_path = BuildTestPageUri(opt_module, opt_coverage)
+ test_page_path = BuildTestPageUri(build_path, opt_module, opt_coverage)
command.append(test_page_path)
return ' '.join(command)
@@ -67,9 +67,16 @@ def ParseArgs():
help='The path of the chrome binary to run the test.',
default=chrome_path)
parser.add_argument(
- '--module', help='only run tests that belongs to MODULE')
+ '--module',
+ help='only run tests that belongs to MODULE')
parser.add_argument(
- '--coverage', help='run the test with code coverage', action='store_true')
+ '--coverage',
+ help='run the test with code coverage',
+ action='store_true')
+ parser.add_argument(
+ '--build-path',
+ help='The output build path for remoting. (out/Debug)',
+ default='out/Debug')
return parser.parse_args(sys.argv[1:])
@@ -84,7 +91,11 @@ def main():
print 'binary to run the test.'
return 1
- command_line = BuildCommandLine(args.chrome_path, args.module, args.coverage)
+ command_line = BuildCommandLine(
+ args.chrome_path,
+ args.build_path,
+ args.module,
+ args.coverage)
os.system(command_line)
return 0