tag | 2c2dc1dc371a0dec1ed482534f164d634970df57 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Jul 05 12:48:18 2023 -0700 |
object | e5cb1d2b109a688a0af058ea5f441cae8b9a2b2c |
Android 13.0.0 release 62
commit | e5cb1d2b109a688a0af058ea5f441cae8b9a2b2c | [log] [tgz] |
---|---|---|
author | Julien Desprez <jdesprez@google.com> | Mon Jan 10 19:28:15 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Jan 10 19:28:15 2022 +0000 |
tree | 820e779a60089d48be07bfc12d8b74c9732c6c2e | |
parent | 346eb55c36de1bc560c6431e4d2d674f6cd86155 [diff] | |
parent | 2b7ac2f46076012bb04363cb067261a35cf53de0 [diff] |
Revert^2 "Set build rules for mobly bundled libs" am: 09edf69479 am: e5ab2b5b6c am: 011003be7d am: 2b7ac2f460 Original change: https://android-review.googlesource.com/c/platform/external/mobly-bundled-snippets/+/1941094 Change-Id: Iefcda9dee1df6f4cafda05decab7ba36f8990a7a
Mobly Bundled Snippets is a set of Snippets to allow Mobly tests to control Android devices by exposing a simplified version of the public Android API suitable for testing.
We are adding more APIs as we go. If you have specific needs for certain groups of APIs, feel free to file a request in Issues.
Note: this is not an official Google product.
Compile and install the bundled snippets
./gradlew assembleDebug adb install -d -r -g ./build/outputs/apk/debug/mobly-bundled-snippets-debug.apk
Use the Mobly snippet shell to interact with the bundled snippets
snippet_shell.py com.google.android.mobly.snippet.bundled >>> print(s.help()) Known methods: bluetoothDisable() returns void // Disable bluetooth with a 30s timeout. ... wifiDisable() returns void // Turns off Wi-Fi with a 30s timeout. wifiEnable() returns void // Turns on Wi-Fi with a 30s timeout. ...
To use these snippets within Mobly tests, load it on your AndroidDevice objects after registering android_device module:
def setup_class(self): self.ad = self.register_controllers(android_device, min_number=1)[0] self.ad.load_snippet('api', 'com.google.android.mobly.snippet.bundled') def test_enable_wifi(self): self.ad.api.wifiEnable()
If you want to contribute, use the usual github method of forking and sending a pull request.
Before sending a pull request, run the presubmit
target to format and run lint over the code. Fix any issues it indicates. When complete, send the pull request.
./gradlew presubmit
This target will reformat the code with googleJavaFormat and run lint. The lint report should open in your default browser.
Be sure to address all off the errors reported by lint. When finished and you run presubmit
one last time you should see:
No Issues Found Congratulations!
in your browser.