Commit 92107f0e authored by Yuke Liao's avatar Yuke Liao Committed by Commit Bot

[Coverage] Fix two bugs on iOS platform.

This CL fixes two bugs on iOS platform:

1. When running tests using iossim, the application bundle parameter
always comes last.

2. When user specifies path to the an .app bundle, if it ends with a
'/', os.path.basename returns empty instead of the the basename that
we want.

Change-Id: I12130dd8e35415c9a9e56e7e47be712b2334ad5f
Reviewed-on: https://chromium-review.googlesource.com/951858
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: default avatarAbhishek Arya <inferno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541279}
parent df80de60
......@@ -985,9 +985,12 @@ def _GetBinaryPath(command):
2. Use xvfb.
2.1. "python testing/xvfb.py out/coverage/url_unittests <arguments>"
2.2. "testing/xvfb.py out/coverage/url_unittests <arguments>"
3. Use iossim to run tests on iOS platform.
3. Use iossim to run tests on iOS platform, please refer to testing/iossim.mm
for its usage.
3.1. "out/Coverage-iphonesimulator/iossim
out/Coverage-iphonesimulator/url_unittests.app <arguments>"
<iossim_arguments> -c <app_arguments>
out/Coverage-iphonesimulator/url_unittests.app"
Args:
command: A command used to run a target.
......@@ -1009,7 +1012,7 @@ def _GetBinaryPath(command):
if _IsIOSCommand(command):
# For a given application bundle, the binary resides in the bundle and has
# the same name with the application without the .app extension.
app_path = command_parts[1]
app_path = command_parts[-1].rstrip(os.path.sep)
app_name = os.path.splitext(os.path.basename(app_path))[0]
return os.path.join(app_path, app_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment