Remove an aliasing command line option in favor of using --platform (post-review comments)
Created attachment 163413 [details] Patch
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.
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
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.
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.
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" :(.