New way to run chrome_public_apk

393 просмотра
Перейти к первому непрочитанному сообщению

Andrew Grieve

не прочитано,
11 авг. 2017 г., 15:41:2211.08.2017
– chromium-dev
android_build_instructions.md have been updated.

Old and broken:
   out/Debug/bin/install_chrome_public_apk_incremental

New and awesome:
   out/Debug/bin/chrome_public_apk install --incremental

Unchanged
  out/Debug/bin/run_chrome_public_test_apk_incremental

Beware that the run_chrome_public_test_apk_incremental script was broken for a window of time today, so if you see errors around json paths when running, try setting your CWD to your output directory to work around it (or git pull).


The new generated scripts have other super powers:
out/Debug/bin/chrome_public_apk launch <url> [--args="--a --b"]
* Does not trigger an install
* When --args is omitted, clears any existing command-line args file on the device(s)
* When --args is present, sets command-line args
* Runs on one or more devices (same as build/android/adb_run_chrome_public)
* If multiple devices attached, show error with list of devices (like install_chrome_public_apk_incremental does)
  * But allow --all to install to all devices.

out/Debug/bin/chrome_public_apk run <url> [--args=]
* Installs and then launches

out/Debug/bin/chrome_public_apk stop
* Stops / kills chrome on all devices (or just those from -d flag)

out/Debug/bin/chrome_public_apk clear-data
* Clear states of the apk package.

out/Debug/bin/chrome_public_apk argv
* Prints current command-line flags
* Same as //build/android/adb_chrome_public_command_line
* Although launch sets this, it's still useful when starting chrome with your finger (you know, by actually touching the device)

out/Debug/bin/chrome_public_apk argv --args=""
* Clears command-line flags

out/Debug/bin/chrome_public_apk argv --args="--a --b"
* Sets command-line flags

out/Debug/bin/chrome_public_apk gdb --args="--a --b"
* Calls //build/android/adb_gdb with correct flags
* Requires --device if multiple devices are present.

There's a few more ideas for enhancements, so follow along here if you'd like:


Finally, I *think* it would be fine to delete:
  • //build/android/adb_*_command_line
  • //build/android/adb_gdb_*
  • //build/android/adb_kill_*
  • //build/android/adb_run_*
  • //build/android/adb_install_apk.py
Please let me know if you think any of these scripts would be useful to leave around though.

Miriam Gershenson

не прочитано,
11 авг. 2017 г., 15:55:0811.08.2017
– Andrew Grieve, chromium-dev
Cronet's tests still use build/android/adb_install_apk.py.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABiQX1W_SHaTxue40bp6iFLw0BLmqvMRox5hA1VnF-81S9OgGw%40mail.gmail.com.

Dale Curtis

не прочитано,
18 авг. 2017 г., 15:40:4218.08.2017
– mge...@chromium.org, Andrew Grieve, chromium-dev
Are there any updates from running incremental unit_tests? https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md#Running says there should be a run_xxx_incremental, but that seems false and the normal run_xxx script doesn't work:

$ m media_unittests_apk_incremental -j 2000
$ l out_android/Release/bin/
total 24
drwxr-x---  3 dalecurtis eng  4096 Aug 18 12:26 .
drwx------ 18 dalecurtis eng 12288 Aug 18 12:33 ..
drwxr-x---  2 dalecurtis eng  4096 Aug 18 12:25 helper
-rwxr-x---  1 dalecurtis eng   884 Aug 18 12:33 run_media_unittests

$ ./out_android/Release/bin/run_media_unittests --gtest_filter=Vpx*
C    0.006s Main  Could not find apk or executable for media_unittests
E    0.007s Main  Unrecognized error occurred.
Traceback (most recent call last):
  File "/d/code/chrome/src/build/android/test_runner.py", line 983, in main
    return RunTestsCommand(args)
  File "/d/code/chrome/src/build/android/test_runner.py", line 727, in RunTestsCommand
    return RunTestsInPlatformMode(args)
  File "/d/code/chrome/src/build/android/test_runner.py", line 833, in RunTestsInPlatformMode
    test_instance = test_instance_factory.CreateTestInstance(args, infra_error)
  File "/d/code/chrome/src/build/android/pylib/base/test_instance_factory.py", line 18, in CreateTestInstance
    args, device_dependencies.GetDataDependencies, error_func)
  File "/d/code/chrome/src/build/android/pylib/gtest/gtest_test_instance.py", line 307, in __init__
    error_func('Could not find apk or executable for %s' % self._suite)
  File "/d/code/chrome/src/build/android/test_runner.py", line 750, in infra_error
    sys.exit(constants.INFRA_EXIT_CODE)
SystemExit: 87

- dale

Eric Stevenson

не прочитано,
18 авг. 2017 г., 15:59:5018.08.2017
– dalec...@chromium.org, mge...@chromium.org, Andrew Grieve, chromium-dev
You'd need to do: ninja -C out/Debug media_unittests_incremental

Then out/Debug/bin/run_media_unittests_incremental will be generated. 


I'm assuming this just worked before if you had at some point built media_unittests_incremental and the script already existed in your output directory. AFAICT nothing has changed recently around this.

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAPUDrwfBujLOyKUrssyW-HZ3YSjQ90bBWqj%2BbRL30ao4tv0tCw%40mail.gmail.com.

Dale Curtis

не прочитано,
18 авг. 2017 г., 16:38:1218.08.2017
– Eric Stevenson, mge...@chromium.org, Andrew Grieve, chromium-dev
Thanks! I never noticed that we didn't need to attach _apk_ in there.

- dale 
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений