Граф коммитов

262 Коммитов

Автор SHA1 Сообщение Дата
Wes Kocher 08745f46ef Bug 1498680 - Fix wpt runner's browser stop implementation: request stop before waiting; r=kwierso
The current implementation waits for fennec to stop before trying to stop it - easy enough
to address. At the same time, I am updating the runner stop implementation to try
stop_application before kill: stop_application shuts down the application more
cleanly; kill should only be used as a backup.

--HG--
extra : source : d95463150a6fccfc51fe190693d2528cbeec49a4
2018-10-12 23:55:47 -07:00
Geoff Brown 90b6dc31b9 Bug 1497566 - Remove logcat functionality from mozrunner; r=automatedtester
When testing locally, logcat can be run easily; in CI, mozharness scripts manage
logcat and save the logcat as a test artifact.
2018-10-11 09:47:55 -06:00
Raphael Pierzina 50207b9243 Bug 1471622 - Update dependency specifier for mozfile in mozrunner; r=davehunt
Depends on D8096

Differential Revision: https://phabricator.services.mozilla.com/D8097

--HG--
extra : moz-landing-system : lando
2018-10-10 10:11:13 +00:00
Geoff Brown 0b2be11c56 Bug 1495863 - Pass mozrunner adb path when creating ADBHost; r=bc 2018-10-02 16:55:10 -06:00
Aaron Klotz acee6df4f4 Bug 1494398: Bump mozrunner version to 7.1.0 to reflect wait-for-browser changes; r=wlach
Differential Revision: https://phabricator.services.mozilla.com/D6997

--HG--
extra : moz-landing-system : lando
2018-09-26 21:19:40 +00:00
Aaron Klotz ad8a283d23 Bug 1488554: Part 4 - Make FirefoxRunner pass --wait-for-browser on Windows; r=ahal
Depends on D4972

Differential Revision: https://phabricator.services.mozilla.com/D6702

--HG--
extra : moz-landing-system : lando
2018-09-26 19:11:55 +00:00
Dave Hunt e0f982a753 Bug 1492341 - Bump mozrunner version to 7.0.2; r=tcsc
TPS is currently depending on mozrunner v7.0.1, which depends on an earlier version of mozprofile. For TPS to be able to use the latest version of mozprofile we need to release a new version of mozrunner with the recent mozprofile version identifier update.

Differential Revision: https://phabricator.services.mozilla.com/D6406

--HG--
extra : moz-landing-system : lando
2018-09-20 16:33:56 +00:00
Bob Clary 60e22167a6 Bug 1491424 - Define AndroidMixin as new class Mixin with proper initialization, r=gbrown.
As defined initially, AndroidMixin was an old-style class not inheriting from object. This
prevents it from being properly called via super() which requires it be a new style class
and also requires that its __init__ method's signature conform to the signatures of the other
mixin's __init_methods.

AndroidMixin originally detected the adb_path using BaseScript's query_exe which required that
the previous initializers complete prior to the call which is not possible. To work around the
problem, adb_path was turned into a property whose value was not looked up until requested.
The intent was to defer the need to reference attributes which had not yet been initialized.

BaseScript's __init__ iterates over the attributes of its object determining if listeners should
be attached for the methods. This can cause problems in mixins which define properties which
require a fully initialized object since accessing the property will invoke the method before it
is ready.

This is worked around in this patch by catching AttributeError in adb_path and ignoring it. The
proper fix however might be to do this catch in BaseScript's __init__ where item = getattr(self, k)
is called.

These changes are not sufficient in of themselves. The additional followup patch to CoverCoverageMixin
and SingleTestMixin are also required for AndroidMixin to be properly initialized.

Since Raptor currently initializes AndroidMix without explicitly giving a device serial number,
mozrunner's android_device.py is modified to export the detected device serial number into the
environment as DEVICE_SERIAL. This allows AndroidMixin to obtain the device's serial number.
2018-09-19 10:35:39 -07:00
Aaron Klotz 9e357d1cf3 Bug 1489277: Skip mozrunner tests if running under automation; r=ahal!
Differential Revision: https://phabricator.services.mozilla.com/D5922
2018-09-14 16:26:57 -06:00
Pavel Slepushkin 21f7f10fe9 Bug 1471888 - [mozprofile] Add support for Python 3. r=davehunt
Bug 1471888 - [mozprofile] Add support for Python 3.

Differential Revision: https://phabricator.services.mozilla.com/D5187

--HG--
extra : moz-landing-system : lando
2018-09-11 18:58:05 +00:00
ui.manish a5ea6dfab9 Bug 1435552 Remove NO_EM_RESTART from test harnesses; r=gbrown 2018-08-31 15:33:32 +02:00
Bob Clary 705ee14361 Bug 1487220 - [mozrunner] Add a loop to the raw_input in verify_android_device to check if user actually installed app, r=gbrown. 2018-08-30 19:04:46 -07:00
Bob Clary b6ff47bfe1 Bug 1482888 - Allow fennec to record audio, r=gbrown. 2018-08-18 10:47:12 -07:00
Tiberius Oros fffda63981 Backed out changeset aaabe6d53de2 (bug 1428713) for causing Bug 1483850 a=backout 2018-08-17 00:17:04 +03:00
dvarga 87db76ae1a Merge mozilla-central to mozilla-inbound on a CLOSED TREE
--HG--
extra : rebase_source : c9e6b9edae9ecf064d1318fa15d5d57ea42c102a
2018-08-16 01:22:36 +03:00
Pavel Slepushkin 01b4686deb Bug 1428713 - [mozprocess] Add support for Python 3 r=davehunt
MozReview-Commit-ID: 9wHoIEboA0K

--HG--
extra : rebase_source : f1b1c3a1dcbcd9038adb7a149fc00f7c1849d6e1
2018-08-04 17:32:57 +02:00
Geoff Brown 2b831a4422 Bug 1483563 - Remove 'mach autophone'; r=bc
Autophone has been retired.
2018-08-15 12:54:08 -06:00
Raphael Pierzina f17db4328b Bug 1471625 - Bump mozinfo to v1.0.0 and update classifiers;r=davehunt
MozReview-Commit-ID: 1Kgl4fCzCyq

--HG--
extra : rebase_source : 865e9abdd4a04b3e3dc1906ce8ec497096f5e6b3
2018-07-03 14:22:11 +02:00
Geoff Brown 15f306a0f1 Bug 1425471 - Avoid use of netcfg in Android marionette tests; r=bc 2018-06-26 16:17:50 -06:00
Dave Hunt 696d9f1858 Bug 1388016 - Run mozbase tests against Python 2 and 3; r=ahal
MozReview-Commit-ID: LdmTHHrLZwq

--HG--
extra : rebase_source : e7f21bb73ffc1a322a10eef21b705b14a2077144
2018-06-21 06:26:17 +01:00
Geoff Brown 619e1afee0 Bug 1433308 - Change mach android-emulator default to x86-7.0; r=me,a=test-only
The x86-7.0 avd is great and offers much better performance than the arm 4.3
configuration. 7.0 is okay if you need arm / are in an arm context.
2018-06-07 17:00:48 -06:00
Geoff Brown bf2dcd9a16 Bug 1433308 - Remove Android 6.0/x86-6.0 options for mach android-emulator; r=me,a=test-only
mach android-emulator currently supports 6 different avds; I am struggling to maintain
that many configurations. I don't see a lot of value in keeping both 6.0 and 7.0,
and Android 6.0 is not as popular as 7.0. Let's remove 6.0, encouraging 7.0 as an
alternative; same for x86-6.0 -> x86-7.0.
2018-06-07 17:00:45 -06:00
Dave Hunt f6a3ef5b8c Bug 1388013 - Remove restriction of Python 2 in mozrunner; r=ahal
MozReview-Commit-ID: 1ARx4Jy2Z83

--HG--
extra : rebase_source : cd401029f79fb8792a0ce5b42947feadf2645cc9
2018-05-30 13:21:51 +01:00
Andreea Pavel dd5cd1d832 Backed out 3 changesets (bug 1388013) for build bustages e.g. ../python/mozbuild/mozpack/test/test_files.py on a CLOSED TREE
Backed out changeset eea857170a41 (bug 1388013)
Backed out changeset c55bfefbd4e1 (bug 1388013)
Backed out changeset 3a163da2b21b (bug 1388013)
2018-05-31 11:48:19 +03:00
Dave Hunt 0fe264f656 Bug 1388013 - Remove restriction of Python 2 in mozrunner; r=ahal
MozReview-Commit-ID: 1ARx4Jy2Z83

--HG--
extra : rebase_source : 4de2a3f53dad010bdc2f1c0dc0050c279517c720
2018-05-30 13:21:51 +01:00
Rob Wu 90138813b0 Bug 1462936 - Use QEMU 2 engine for android-emulator for x86-6.0 and x86-7.0 r=gbrown
Before this patch, the x86-6.0 and x86-7.0 Android emulators were
unusable on macOS (tested 10.13.4 High Sierra).
The emulator's UI appears (but with black screen), and the launcher
icon in the dock has a default folder icon instead of the emulator.

When I use "mach android-emulator --version=x86-6.0 --verbose",
then the full emulator command is printed. I discovered that
using the newer QEMU 2 engine ("-engine qemu2") fixes the issue, and
that the emulator launches as expected. This option is documented at:
https://developer.android.com/studio/run/emulator-commandline

However, when I modify the source of these commands, then the emulator
fails to start (as before). This is caused by the setpgid call via
preexec_fn in testing/mozbase/mozprocess/mozprocess/processhandler.py .
Passing ignore_children=True to ProcessHandler avoids the setpgid call
and allows the emulator to be used as expected on macOS.

The effect of not using setpgid is that the spawned process will not
be put in the process group of the "mach" Python script. This is not
a big deal. I can confirm that the emulator can still be killed by
quitting or force-quitting it, and did not experience other issues.

MozReview-Commit-ID: 4AKVqtwIoCj

--HG--
extra : rebase_source : df6615a32de666d0f9d4f27c1c6f462120364ee2
2018-05-19 21:48:50 +02:00
Geoff Brown ec356d3b70 Bug 1459351 - Warn when 'mach android-emulator' tries to start an x86 emulator without kvm; r=jmaher 2018-05-08 07:38:55 -06:00
Geoff Brown 37cbed2df7 Bug 1457600 - Version bump for mozrunner; r=rwood
In bug 1440714, mozdevice had its version bumped to 1.0.0, outside of the required
range in mozrunner's deps, causing in-tree breakage. Subsequently, I changed mozrunner's
dep list to allow for mozdevice 1.0.0, and released mozdevice 1.0.0 on pypi. Now I need
to update mozrunner on pypi with the updated deps, so require a mozrunner version bump.
2018-04-30 07:18:29 -06:00
Geoff Brown f3a5cf22ea Bug 1440714 - Follow-up: Update mozrunner's mozdevice requirements; r=me on a CLOSED TREE 2018-04-26 12:30:23 -06:00
Geoff Brown 4f07c8ba29 Bug 1440714 - Convert Android marionette tests to use adb.py; r=bc 2018-04-26 10:43:08 -06:00
Andrew Halberstadt e35a19ff81 Bug 1445944 - [mozbase] Bump mozprofile and mozrunner version numbers r=rwood
Neither package has any backwards incompatible changes. However, I decided to
bump the major version for mozrunner as this is the first time it's switching
to SemVer (mozprofile already made the switch). It seemed cleaner to have the
switch happen after a major bump.

In both cases, I've added major version upper limit guards to each dependency.
This way we won't break these packages in the future when we land backwards
incompatible changes to the dependendencies.

MozReview-Commit-ID: 5SIpMGTS3cc

--HG--
extra : rebase_source : 43ab4c9f3af50eb82a22ec3112e5b56fe703dbc6
2018-04-13 18:22:46 -04:00
Andrew Halberstadt a1af153708 Bug 1445944 - [mozprofile] Create a new ChromeProfile class for managing chrome profiles r=rwood
In Chrome it doesn't seem to be possible to install extensions by dropping them
in the profile directory. Instead we use the --load-extension command line
argument. To that end the ChromeProfile uses a 'dummy' AddonManager() class
that is actually just a list with an 'install' method. Mozrunner will be
responsible for building the command line based on this list.

We also need a few other command line arguments to build and create a temporary
profile directory.

MozReview-Commit-ID: HC2p2ZZMl66

--HG--
extra : rebase_source : 2d748893e8530a312afb5d8b1442a4c29f93caf1
2018-04-13 13:28:30 -04:00
Andrew Halberstadt 3d3df5c730 Bug 1445944 - [mozrunner] Create a base BlinkRuntimeRunner and add a ChromeRunner to the runners list r=rwood
This allows consumers to bootstrap Chrome with mozrunner. For now the profile implementation
is just an empty class but this will be expanded in a future commit.

MozReview-Commit-ID: 1Z14FudH0JJ

--HG--
extra : rebase_source : b593965a6bd725b133adf42ff31d61726bcff520
2018-04-12 22:29:17 -04:00
Andrew Halberstadt 07297de09a Bug 1445944 - [mozrunner] Convert mozrunner unittests to the pytest format r=davehunt
This will make it easier to add the ChromeRunner tests in the next couple of
commits.

MozReview-Commit-ID: 2Nfz92FStSX

--HG--
rename : testing/mozbase/mozrunner/tests/mozrunnertest.py => testing/mozbase/mozrunner/tests/conftest.py
extra : rebase_source : 27837679b744e7f765fdb2d4f43d4bab14fb2dc0
2018-04-12 15:14:03 -04:00
Andrew Halberstadt 11c250e87b Bug 1445944 - [mozrunner] Remove ability to specify the 'wrap_command' function on an Application context r=rwood
This is a leftover artifact from the B2G days that isn't being used anymore.

MozReview-Commit-ID: FZoTwHltmAG

--HG--
extra : rebase_source : 455450f360fa222522f365118d1e687528e08b69
2018-04-12 12:08:05 -04:00
Andreea Pavel 7a4b9a3f56 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
extra : rebase_source : 66bd87105d99036ada5008499ff0eaea579b531a
2018-04-06 13:20:21 +03:00
Geoff Brown 146ff5998a Bug 1440714 - Convert Android mach commands to adb.py; r=bc 2018-04-05 12:50:29 -06:00
Henrik Skupin 4c98f9ad50 Bug 1451310 - [mozrunner] Catch exceptions when starting the client process. r=ahal
If a ProcessHandler instance has been created, but mozprocess fails
to start the child process, a dangling process_handler instance is
attached to the runner instance. This should be avoided, and a
RunnerNotStartedError has to be thrown.

MozReview-Commit-ID: LgNFVaT9qVs

--HG--
extra : rebase_source : c06aef08d7619ac9d3fe94ad29bdae06f0f79364
2018-04-04 15:04:42 +02:00
Henrik Skupin 14f784eac8 Bug 1451246 - [mozrunner] Always encode key and value of env variables as UTF-8 if those are of unicode type. r=gbrown
Without encoding the key and value of environment variables as UTF-8
for non-interactive sessions "subprocess.Popen()" and specifically
"os.execvpe()" will fail.

MozReview-Commit-ID: 9lO562XnDZx

--HG--
extra : rebase_source : bba542648b6050d0e9f628c95b658c3a546d2b5d
2018-04-04 10:36:58 +02:00
Andrew Halberstadt 61fa56c010 Bug 1328273 - Log mozrunner.utils failure messages at the error level, r=jgraham
MozReview-Commit-ID: LSzpGJeyY77

--HG--
extra : rebase_source : b9eef524597a29cfa912fb14c5eab0d58f74d430
2018-04-04 16:46:32 -04:00
Henrik Skupin 9726fd9d3b Bug 1451680 - Release mozrunner 6.15. r=gbrown
DONTBUILD

MozReview-Commit-ID: 6gRUgVbNjwA

--HG--
extra : rebase_source : ea47169db17f4e4b7a3d464d298f684d984926aa
2018-04-05 12:12:07 +02:00
Geoff Brown b4dddb3c35 Bug 1440719 - Set MOZ_CRASHREPORTER_SHUTDOWN during tests, other than browser-chrome and non-e10s; r=ted 2018-03-28 12:43:52 -06:00
Andrew Halberstadt c252fe40f7 Bug 1447401 - [mozrunner] Remove b2g related runners and devices, r=jmaher
MozReview-Commit-ID: 4TYYSoviSEy

--HG--
extra : rebase_source : a6fd7356ad4c320c00c1f9ddad9b3924086c4954
2018-03-20 10:43:39 -04:00
Henrik Skupin f5e866d199 Bug 1438679 - [mozrunner] DeviceRunner has to override returncode and wait() to check for remote process status. r=gbrown
Without returncode and wait() being overridden the default
implementation of the Runner class takes precedence and will
run the check for the adb command but not the remote process.
This always returns 0 because adb runs or forks itself as daemon.

Instead the remote process has to be checked for existence.

MozReview-Commit-ID: GvuAaMSxBT2

--HG--
extra : rebase_source : e84b52fdc9ce48617102650d6d0ae73e90899538
2018-02-22 23:08:49 +01:00
Csoregi Natalia 393c7ab6c0 Backed out 2 changesets (bug 1438679) for xpcshell failures on Android. CLOSED TREE
Backed out changeset 0f79e397a320 (bug 1438679)
Backed out changeset 5685421d86eb (bug 1438679)
2018-02-26 21:57:40 +02:00
Henrik Skupin 37160bb41e Bug 1438679 - [mozrunner] DeviceRunner has to override returncode and wait() to check for remote process status. r=gbrown
Without returncode and wait() being overridden the default
implementation of the Runner class takes precedence and will
run the check for the adb command but not the remote process.
This always returns 0 because adb runs or forks itself as daemon.

Instead the remote process has to be checked for existence.

MozReview-Commit-ID: GvuAaMSxBT2

--HG--
extra : rebase_source : 9dc790a343d8f53bf00589c68f16e51a17d1b057
2018-02-22 23:08:49 +01:00
James Willcox a47a1c6678 Bug 1291387 - Make mochitest and reftest work against TestRunnerActivity r=gbrown,jchen
Pass --appname org.mozilla.geckoview.test to 'mach mochitest' or
'mach reftest'. This runs the tests without e10s currently.

MozReview-Commit-ID: 7TIvA3zRCw2
2018-02-22 09:18:37 -06:00
Jim Chen 5e9435a262 Bug 1434469 - Add ACCESS_COARSE_LOCATION to list of permissions; r=snorp
Add ACCESS_COARSE_LOCATION to the Fennec and GeckoView list of
permissions. For completeness, also add ACCESS_COARSE_LOCATION to JS
modules that handle runtime permissions.

MozReview-Commit-ID: 8UHaiJcRnq

--HG--
extra : rebase_source : 5a74d4138d6d7b4bf6cf70724f695ff06201c38c
2018-02-13 13:01:18 -05:00
Geoff Brown cd78045019 Bug 1434423 - Check for installation of correct test application when --app is passed to mach; r=jmaher 2018-02-09 14:34:20 -07:00
Andrew Halberstadt f354075c7a Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.

This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`.  If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.

Of course, being specific is often better than a catch all.

MozReview-Commit-ID: FKx80MLO4RN

--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
2018-01-31 14:32:08 -05:00