Commit Graph
197 Commits
Author SHA1 Message Date
Geoff Brown c0541a8c4c Bug 1395718 - In devicemanager killProcess, only use force-stop when a signal is not specified; r=bc
dm.killProcess correctly tries to use 'am force-stop' in preference to kill()
to end a process. But some clients of killProcess specify a kill signal and
use killProcess for purposes other than endding the process, for example, to trigger
crash dumps. To allow for these cases, it is better to not use force-stop when a
signal is specified.
2017-09-01 11:35:45 -06:00
Ganti Sai Sarath Chandra 6bda4ec56b Bug 1378422 - Add python 2 only classifiers to python modules under /testing, r=ahal
MozReview-Commit-ID: DRi8KFyCnBn
2017-08-19 04:19:06 +05:30
Andrew Halberstadt bce781d9b8 Bug 1373294 - Fix E305 (two blank lines after method or class) in files enabled by flake8 linter, r=jmaher
This is needed before we can upgrade to flake8 3.3.0, as that version starts flagging these errors.

These files were modified by running:
autopep8 --select E305 --in-place -r <dir>

on the affected directories. I did it one dir at a time and verified the result after each.

MozReview-Commit-ID: FmlsfiKIbtr
2017-06-15 12:10:59 -04:00
William Lachance d9f62fd363 Bug 1367465 - Bump mozdevice version to 0.51 r=bc
MozReview-Commit-ID: AYTbOymTApS
2017-05-24 11:52:14 -04:00
William Lachance e875f88ab5 Bug 1367465 - Fix log message when setting selinux mode on Android fails r=bc
MozReview-Commit-ID: LvLfujDcGfU
2017-05-24 11:26:59 -04:00
Geoff Brown f6246c5baa Bug 1340233 - Take more care when killing browser before starting Android tests; r=jmaher
The devicemanager killProcess() is updated to use force-stop first, then
use kill if force-stop does not work.

Browser test harnesses are updated to check if killProcess() worked, and
warn if it failed.
2017-04-12 09:15:53 -06:00
William Lachance a864195cb5 Bug 1353527 - Tag mozdevice 0.50 r=bc
MozReview-Commit-ID: 8MMuTDX7uBH
2017-04-04 16:44:07 -04:00
Geoff Brown c9c17dcbc1 Bug 1353537 - Update adb.py push() to always copy directories when pushing a directory; r=bc 2017-04-04 18:48:12 -06:00
Geoff Brown b72a74a2a6 Bug 1340584 - Remove devicemanagerSUT and references to sutagent; r=wlach
sutagent is no longer built or used; devicemanagerSUT is completely
unused. After this change, devicemanagerADB is the only implementation of
devicemanager, and test harness options like --dm_trans are eliminated.
2017-03-21 12:20:01 -06:00
Geoff Brown 1ebc8b721b Bug 1346083 - Fix devicemanagerADB's pushDir() for adb >= 1.0.36 with links in directory; r=bc
To allow for pushing directories containing symbolic links, pushDir
now always copies the source directory to a temporary local copy
before pushing.

In addition, I have added error checking, so that pushDir will now fail
if its adb command fails and returns a non-0 status from _checkCmd.
2017-03-14 08:08:42 -06:00
Andrew Halberstadt 64e33c7c26 Bug 1003417 - Add a 'mozbase' subsuite to python unittests on linux, r=ted
The subsuite is added conditionally because we only have the capability of
running source-check tasks on linux at the moment. Once taskcluster support
for windows and mac has matured a bit and the taskcluster configs support
source-check there, we should apply the subuite unconditionally.

MozReview-Commit-ID: Kk9Irz3fn14
2016-11-16 16:43:42 -05:00
Geoff Brown 9a66dbf7b4 Bug 1335944 - Delay devicemanagerADB sdk check until connect() time; r=bc 2017-02-02 09:29:08 -07:00
Bob Clary 7ebd986e1d Bug 1334613 - [mozdevice] - use root to kill processes on Android 7+, r=gbrown. 2017-01-30 16:09:14 -08:00
Bob Clary 7a50f1e17d Bug 1328301 - handle push/pull directory semantics changes in adb 1.0.36 for devicemanagerADB, r=gbrown 2017-01-21 09:49:56 -08:00
Bob Clary 3748b622db Bug 1328301 - handle push/pull directory semantics changes in adb 1.0.36 for adb.py, r=gbrown. 2017-01-21 09:49:56 -08:00
Geoff Brown 837e927bd0 Bug 1319196 - Increase timeout for 'adb shell dumpsys'; r=jmaher 2016-12-13 11:28:04 -07:00
Andrew Halberstadt e7efd21c97 Bug 1317970 - Make mozbase tests use mozunit for consistent formatting, r=chmanchester
The mozbase unittests don't use mozunit, so their output is confusing in the log.
This makes mozbase output consistent with the rest of the python unittests.

MozReview-Commit-ID: AIs5mza8Rn6
2016-11-17 16:36:18 -05:00
Bob Clary 72fd431af2 Bug 1318001 - Autophone - mozdevice - adb*.py - properly split lines from shell output, r=gbrown. 2016-11-17 09:21:06 -08:00
Bob Clary 73a29072b8 Bug 1245347 - [Autophone|mozdevice] - increase mozdevice version to 0.49, r=wlach. 2016-11-17 09:21:06 -08:00
Bob Clary 819a834916 Bug 1245347 - [Autophone|mozdevice] - is_device_ready should not require root to check the ready_path, r=wlach. 2016-11-17 09:21:06 -08:00
Bob Clary 8dd941cb23 Bug 1245347 - [Autophone|mozdevice] - catch initial ADBRootError during initialization if root is not supported, r=wlach. 2016-11-17 09:21:06 -08:00
Bob Clary 2a3f68e512 Bug 1306703 - Autophone - mozdevice - combine stdout, stderr, r=droeh,gbrown 2016-10-24 11:09:57 -07:00
Bob Clary 835253d4d1 Bug 1306703 - Autophone - mozdevice - minimal Android 7 support in adb*.py, r=droeh 2016-10-24 11:09:57 -07:00
Bob Clary 19a10de3b2 Bug 1310937 - Autophone - mozdevice - sync Bug 1300890 - Autophone - pylint fixes and logging clean up, r=jmaher. 2016-10-19 06:06:55 -07:00
Bob Clary 4f47664fef Bug 1310937 - Autophone - mozdevice - sync Bug 1249120 - Autophone - use unrolled recursive chmod when -R not supported, r=gbrown. 2016-10-19 06:06:55 -07:00
Bob Clary 606229fc67 Bug 1310937 - Autophone - mozdevice - sync Bug 1249120 - Autophone - adb.py - add ADBDevice.ls, r=gbrown. 2016-10-19 06:06:55 -07:00
Bob Clary 14b6e9efd3 Bug 1310937 - Autophone - mozdevice - sync Bug 1242070 - Autophone - adb.py - use native recursion with chmod when supported by the device, r=gbrown. 2016-10-19 06:06:54 -07:00
Bob Clary cf46791bbe Bug 1310937 - Autophone - mozdevice - sync Bug 1241267 - Autophone - adb_android.py - use install -g on Marshmallow to grant permissions at install time, r=gbrown. 2016-10-19 06:06:54 -07:00
Bob Clary 9461aba60d Bug 1310937 - Autophone - mozdevice - sync Bug 1238450 - Autophone - adb.py - use ifconfig interface or netcfg to obtain ip address, r=gbrown 2016-10-19 06:06:54 -07:00
Francesco Pischedda 46c0d4af68 Bug 1280573 - Add testing/mozbase to flake8 linter: r=ahal
added testing/mozbase to tools/lint/flake8.lint
fixed a first batch of PEP8 errors/warnings

at first the commad autopep8 -i --max-line-length 99 -r -j 8 .
has been used to fix simpler problems, run from testing/mozbase

some of the issues can not easily fixed :
- undefined 'names' in code for example isLinux - isLinux and isBsd "fixed" with # noqa
- undefined 'message' resolved with return fmt.format(...
- undefined 'structured' resolved replacing those with mozlog
- long comments - some remaining - addressed with # noqa
- package level import everything - addressed with # flake8: noqa

restored testing/mozbase/mozdevice/mozdevice/Zeroconf.py
fixed issues reported on mozreview
fixed ')' in testing/mozbase/mozprocess/mozprocess/qijo.py imports
finally fixed multiline string at testing/mozbase/manifestparser/tests/test_manifestparser.py:114
^^^ and again, but now with ./mach python-test --path-only testing/mozbase/manifestparser/tests/test_manifestparser.py passing
fixed testing/mozbase/manifestparser/tests/test_convert_directory.py assert

fixed this error:
10:15:21     INFO -      return lambda line: stack_fixer_module.fixSymbols(line)
10:15:21     INFO -  TypeError: fixSymbols() takes exactly 2 arguments (1 given)

fixed two spaces lint error even of #  noqa comments
restored assignement to lambda with #  noqa to silence the lint error
global noqa for testing/mozbase/manifestparser/tests/test_filters.py
stupid is/is not error...

MozReview-Commit-ID: 1FpJF54GqIi
2016-09-30 16:08:37 +02:00
Andrew Halberstadt ce3cd0f69b Bug 1300163 - Add a --adbpath argument to mochitest Android to allow explicitly setting the adb binary, r=gbrown
In mozdevice, it's possible to pass in the path to the adb binary (rather than requiring it to be on the path). The
mochitest android options don't provide any means to set this however (even though the b2g options do). This patch
adds that option in.

This will be used by the mach environment on interactive loaners.

MozReview-Commit-ID: 4lsKGpizfH7
2016-09-02 14:26:16 -04:00
Geoff Brown f08c875540 Bug 1285663 - Optimize profile pushes and do not chmod files on /sdcard; r=bc 2016-07-14 10:36:31 -06:00
Geoff Brown cc79a0d31a Bug 1285040 - Adapt device manager pushDir to latest adb; r=bc 2016-07-08 09:20:03 -06:00
Maja Frydrychowicz 3a6d6a6ec1 Bug 787203 - [mozdevice] Add remove_forward method to DeviceManagerADB; r=ahal
For adb forward --remove|remove-all

MozReview-Commit-ID: FrfFOCSQl6q
2016-06-28 23:41:30 -04:00
Ms2ger 07bc6570cf Bug 1257510 - Use modern exception syntax in mozbase; r=ahal
The comma form is long-deprecated.
2016-03-18 09:03:25 +01:00
Nick Alexander 1adb4c60ec Bug 1242213 - Part 0: Use org.mozilla.gecko.BrowserApp instead of .App. r=me,gbrown,bc
This approach lets us get rid of the .App <activity-alias> definitions, at
least.

In Bug 1237755, I tried pretty hard to use real intent filters, rather
than a different hard-code path name, but ran into significant issues,
and finally into the hard reality that Android 2.3 doesn't support
bare package names.  (It only supports package/class component names.)
Android 2.3 can't die fast enough.

Sadly, this approach doesn't address the issues I see loading URLs
that prompted Bug 1237755.

This is the path of least resistance.  Onwards!

Tested via:

nalexander@chocho ~/M/gecko> ./mach run
Starting: Intent { act=android.activity.MAIN cmp=org.mozilla.fennec_nalexander/org.mozilla.gecko.BrowserApp }
Warning: Activity not started, its current task has been brought to the front
nalexander@chocho ~/M/gecko> ./mach run https://mozilla.org
Starting: Intent { act=android.activity.MAIN dat=https://mozilla.org cmp=org.mozilla.fennec_nalexander/org.mozilla.gecko.BrowserApp }
nalexander@chocho ~/M/gecko> ./mach run file:///mnt/sdcard/test.html
Starting: Intent { act=android.activity.MAIN dat=file:///mnt/sdcard/test.html cmp=org.mozilla.fennec_nalexander/org.mozilla.gecko.BrowserApp }
2016-01-27 12:15:19 -08:00
Julien Pagès 51db374245 Bug 1236467 - [mozdevice] raise exception when missing devices access permissions. r=ahal
Also bump the version to 0.48.
2016-01-04 16:29:36 +01:00
Geoff Brown 11482f4ec5 Bug 1144393 - Use /storage/sdcard in preference to /sdcard for adb device root and enable test_file_equality.js; r=jmaher 2015-12-21 14:24:08 -07:00
Geoff Brown 269aa54972 Bug 1233454 - Guard against ps timeout in devicemanagerADB.getProcessList; r=jmaher 2015-12-18 12:17:06 -07:00
Bob Clary 3d10c6732c Bug 1214812 - [mozdevice] - adb_android.py - fix missing test_root argument to ADBAndroid, r=gbrown. 2015-12-02 08:34:20 -08:00
Bob Clary 22550bb923 Bug 1214812 - [mozdevice] - adb.py, adb_android.py - if possible always run adbd as root, set SELinux to Permissive, r=gbrown. 2015-12-02 08:34:20 -08:00
Bob Clary 9d7b36828e Bug 1214812 - [mozdevice] - adb.py - do not prepend LD_LIBRARY_PATH to su commands, r=gbrown. 2015-12-02 08:34:20 -08:00
Bob Clary 6417df2b78 Bug 1214812 - [mozdevice] - devicemanagerADB.py - listFiles - check for device or resource busy failure message, r=gbrown. 2015-12-02 08:34:20 -08:00
Bob Clary 7abd519125 Bug 1214812 - [mozdevice] - devicemanagerADB.py - check if busybox's ls -1A is used, r=gbrown. 2015-12-02 08:34:19 -08:00
Bob Clary fc2af6446a Bug 1214812 - [mozdevice] - devicemanagerADB.py - use su 0 if it is available; check for root updates, r=gbrown. 2015-12-02 08:34:19 -08:00
Wes Kocher 9dda6f0c84 Backed out 6 changesets (bug 1214812) for kk emulator test bustage
Backed out changeset b36710809f0c (bug 1214812)
Backed out changeset a3b5c66f34e4 (bug 1214812)
Backed out changeset df6d3dc3fca9 (bug 1214812)
Backed out changeset 9f94be2a3c1d (bug 1214812)
Backed out changeset 1eaf9f30b00d (bug 1214812)
Backed out changeset 902b985b3273 (bug 1214812)
2015-12-01 15:33:07 -08:00
Bob Clary 195a7b949f Bug 1214812 - [mozdevice] - adb_android.py - fix missing test_root argument to ADBAndroid, r=gbrown. 2015-12-01 14:25:13 -08:00
Bob Clary e8406b75e2 Bug 1214812 - [mozdevice] - adb.py, adb_android.py - if possible always run adbd as root, set SELinux to Permissive, r=gbrown. 2015-12-01 14:25:12 -08:00
Bob Clary 057c637930 Bug 1214812 - [mozdevice] - adb.py - do not prepend LD_LIBRARY_PATH to su commands, r=gbrown. 2015-12-01 14:25:12 -08:00
Bob Clary 6a55cab09c Bug 1214812 - [mozdevice] - devicemanagerADB.py - listFiles - check for device or resource busy failure message, r=gbrown. 2015-12-01 14:25:12 -08:00