This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git
The following commit(s) were added to refs/heads/master by this push:
new 86101e4 Support physical Android devices (#24)
86101e4 is described below
commit 86101e4c0a9bf7d15c085ce0c5a8bb3b6035232f
Author: johanlantz <[email protected]>
AuthorDate: Tue Oct 2 20:56:25 2018 +0200
Support physical Android devices (#24)
With this minor change I could run on a physical device by passing the
device id with the --target parameter.
---
README.md | 8 ++++++++
lib/ParamedicTargetChooser.js | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/README.md b/README.md
index fa8fe67..960f61b 100644
--- a/README.md
+++ b/README.md
@@ -154,6 +154,14 @@ iOS only parameter. The path to the sample TCC DB file,
with permissions, to be
cordova-paramedic --platform ios --plugin cordova-plugin-contacts --tccDbPath
tcc.db
```
+#### `--target` (optional)
+
+Android only parameter. The device ID (from `adb devices`) of a device the
tests should be run on.
+
+```
+cordova-paramedic --platform android --plugin cordova-plugin-contacts --target
02e7f7e9215da7f8
+```
+
### Sauce-only arguments
#### `--shouldUseSauce` (optional)
diff --git a/lib/ParamedicTargetChooser.js b/lib/ParamedicTargetChooser.js
index c3544db..6b162ad 100644
--- a/lib/ParamedicTargetChooser.js
+++ b/lib/ParamedicTargetChooser.js
@@ -53,6 +53,14 @@ ParamedicTargetChooser.prototype.chooseTarget = function
(emulator, target) {
ParamedicTargetChooser.prototype.chooseTargetForAndroid = function (emulator,
target) {
logger.info('cordova-paramedic: Choosing Target for Android');
+
+ if (target) {
+ logger.info('cordova-paramedic: Target defined as: ' + target);
+ var obj = {};
+ obj.target = target;
+ return obj;
+ }
+
return this.startAnAndroidEmulator(target).then(function(emulatorId) {
var obj = {};
obj.target = emulatorId;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]