Bug 96414 - Remove an aliasing command line option in favor of using --platform (post-review comments)
Summary: Remove an aliasing command line option in favor of using --platform (post-rev...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peter Beverloo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 11:39 PDT by Peter Beverloo
Modified: 2022-02-27 23:55 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.42 KB, patch)
2012-09-11 11:41 PDT, Peter Beverloo
dpranke: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Beverloo 2012-09-11 11:39:43 PDT
Remove an aliasing command line option in favor of using --platform (post-review comments)
Comment 1 Peter Beverloo 2012-09-11 11:41:23 PDT
Created attachment 163413 [details]
Patch
Comment 2 Dirk Pranke 2012-09-11 12:58:33 PDT
Comment on attachment 163413 [details]
Patch

I think you're missing the point ... I wouldn't have added --chromium-android to run-webkit-tests either. Since we don't use platform=X anywhere else in run-webkit-tests, we shouldn't use it here.
Comment 3 Peter Beverloo 2012-09-11 13:17:55 PDT
All other platforms can determine their type based on the host OS, which is what the layout test port factory does. The reason that we can't re-use --chromium is that the host OS is different from the target OS for Android. We could determine this based on files in the out/{Debug,Release}/ directory, but since that isn't necessarily cleared when switching between Android and Linux builds in the same checkout it'd be a fragile heuristic.

I'll be uploading a patch tomorrow which special-cases us for running webkit_unit_tests and TestWebKitAPI for the same reason: we can't run it locally, it needs to be pushed to a device, then all dependencies need to be pushed, and only then it can be executed.

The --chromium-android argument is supported on update-webkit(-chromium), build-webkit (for updates) and now run-webkit-tests. I agree on the "--platform=X" concern, which is exactly why I added the argument in the first place.

If you have another idea about how we can reliably determine that an update (which has Android-specific dependencies and needs to source a script) or executing a test suite which needs to be done on a device rather than locally, we can definitely consider changing this. Android is simply unique in this perspective, being the first platform where host!=target. Chromium OS could be similar, I imagine.

This approach is documented on the Wiki as well, and has been in place since mid last year:
http://trac.webkit.org/wiki/Chromium#BuildingonAndroid
Comment 4 Dirk Pranke 2012-09-11 13:29:36 PDT
I think we're talking past each other slightly.

I've mostly been trying to say that "run-webkit-tests --chromium-android" didn't do anything that "run-webkit-tests --platform chromium-android" didn't do, and so this change didn't seem like a big win to me. I don't want to add '--X' as a shortcut for '--platform X' for all Xes (I'm not actually a fan of any of the --X shortcuts but they do seem to be widely used).

I never thought (or claimed) that you should be able to re-use --chromium; I realize we can't pick the correct port to use from just the host (otherwise we wouldn't need flags for --chromium/--qt/--gtk etc. at all).

Your observation that we use '--chromium-android' (for example) to update-webkit and build-webkit and so we should be able to use it for run-webkit-tests as well is a good one; I had not considered this angle and I didn't pick it up from what you had written previously (perhaps I just missed your earlier points?).

So, the code is fine as is. No need to change anything.
Comment 5 Peter Beverloo 2012-09-11 17:01:11 PDT
That clarified the confusion, thank you. My interpretation of your slippery slope was WebKit's Android infrastructure in general, while you meant using command line flags for each port/platform combination. Sorry!

My intention with the --chromium-android flag is that it should be usable as a drop-in replacement for --chromium on all tools/scripts where this may be relevant (because custom behavior is required), and make sure that it implies --chromium as well, because, after all, that's what it is.

Sorry for the confusion, I see where my explanations weren't clear. I'll make sure to be clearer and more complete in the future.
Comment 6 Dirk Pranke 2012-09-11 17:33:42 PDT
Yeah, sorry, I took "because it's consistent with the other flags" in the other bug to mean "consistent with the other platform shortcuts on run-webkit-tests", not "consistent with the flags to build-webkit and update-webkit" :(.