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

82 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Andrew Halberstadt c9beaa56b4 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

--HG--
extra : rebase_source : 9df32258cadff5d27a0e72113c57f782756c0b18
2017-06-15 12:10:59 -04:00
Sam Giles eda63b77d4 Bug 1340429 - Bump mozprocess to 0.24; r=jgraham
MozReview-Commit-ID: G3473IJp0i2

--HG--
extra : rebase_source : c74a707cef891135da77ffb7dd2854c0159265ff
2017-02-17 05:53:06 +00:00
Sam Giles 8c1f7ef5cc Bug 1329528 - Reap zombie processes on Mac OS if killing the process group initially fails with EPERM; r=ahal
MozReview-Commit-ID: IKqXKIN0mXx

--HG--
extra : rebase_source : 40e012f3cbeca139e15ce23e33f4c131f1e4d6cd
2017-02-16 06:18:17 +00:00
Andrew Halberstadt 8415b25e37 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

--HG--
extra : rebase_source : b9266a06583083c36477d4e93f5462ee614cdb71
2016-11-16 16:43:42 -05:00
James Graham 5f011d137e Bug 1328823 - Bump mozprocess version number to 0.24 for release, r=ahal
MozReview-Commit-ID: 251xwdA7rxc

--HG--
extra : rebase_source : 2662ed18044da7173eaaeca941c0e72b3f9ba089
2017-01-06 15:39:55 +00:00
Andrew Halberstadt 2d76b4f70d 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

--HG--
extra : rebase_source : 10f65e612f5b3cebb921c47699f5a8be7cd2ba5a
2016-11-17 16:36:18 -05:00
Andrew Halberstadt ffb7cb0b99 Bug 1309060 - Ignore "No such process" when trying to find pgid in mozprocess, r=gps
For some reason calling os.getpgid(proc.pid) in this bug results in an OSError "No such process"
on OSX. This bug is starting the ProcessHandler from a concurrent.futures Thread, that must be
somehow related.

I tried debugging this, but couldn't figure out why this is happening. However, the pgid is not
needed for this use case, and simply ignoring the error works. We also ignore this very same
exception when calling os.getpgid elsewhere in mozprocess, so there must be some weird OSXism
happening.

MozReview-Commit-ID: 2YXhBaORC5s

--HG--
extra : rebase_source : 120e4bff7ef29d2a0ad1e3bdd2df11b8b682d981
2016-11-03 10:24:11 -04:00
Francesco Pischedda f45ed99748 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

--HG--
extra : rebase_source : 3cf0277fb36a296e3506aeacc2ff05e1b03f9eac
2016-09-30 16:08:37 +02:00
Henrik Skupin 4a66067bde Bug 1176758 - Release mozprocess 0.23 and mozrunner 6.12. r=ahal
MozReview-Commit-ID: JeQhPhZHbUX

--HG--
extra : rebase_source : 729a8393b18ce7b75d3e615d5010cd32744cc16f
2016-06-30 16:45:21 +02:00
Henrik Skupin c0ae4f73e9 Bug 1176758 - Allow mozprocess to detect and kill detached child processes. r=ahal
MozReview-Commit-ID: B9yfLYUZw76

--HG--
extra : rebase_source : dcf4d1a7b58b2045cf058247f3d6ffc753b398b1
2016-06-30 16:44:56 +02:00
Henrik Skupin be1e7aaec0 Bug 1276886 - [mozprocess] Fix hang in output readers when process is in a new process group. r=ahal
MozReview-Commit-ID: 9e6HNAaF0Yo

In case of in-process restarts it can happen that the new process gets forked into a new process group.
When that happens we loose the capability to kill the process. To prevent a hang when joining the output
reader threads in wait(), we simply skip that call by passing-through the IO error.

--HG--
extra : rebase_source : 702dfec407ed13114f59fa6ccb0d82c5b0790550
2016-06-02 20:19:34 +02:00
Andrew Halberstadt 95882ef0e4 Bug 1274584 - [mozprocess] Fix IO Completion Port failed to signal process shutdown, r=jgriffin
Sometimes the IO completion port doesn't shutdown child processes. When this happens,
mozprocess will attempt to force kill the child processes manually. However, there is
a bug here which causes the OSError to get raised.

Although this fixes that bug, the original issue(s) which prevented the IOC port
from signaling shutdown remain and are still undiagnosed.

MozReview-Commit-ID: L3DQPW0Is5v

--HG--
extra : rebase_source : cf6320cffea5a4c8fb5d62861c41065d9dcefa52
2016-05-30 11:02:13 -04:00
Andrew Halberstadt 7746cfd17f Bug 1274584 - [mozprocess] Improve debugging messages on windows, r=jgriffin
We can set MOZPROCESS_DEBUG to help debug windows process code. However on try
it is unreadable as there are multiple things using mozprocess, and each process
has multiple threads. It's impossible to tell which log message comes from where.
This improves the debug logs a bit by always specifying the PID and thread name.

There are a few other drive-by cleanups in this thread. The only one of note is
removing a python 2.5 only code path.

MozReview-Commit-ID: L3DQPW0Is5v

--HG--
extra : rebase_source : f07c07f53b06b1160cd3e70cb06b8dc12a89c3ab
2016-05-30 11:00:59 -04:00
Andrew Halberstadt c2f03c6447 Bug 1152428 - [mozprocess] Fix UnicodeEncodeError when non-ascii characters are in the environment, r=wlach
MozReview-Commit-ID: 3AG9oLxWexy

--HG--
extra : rebase_source : a1f0d66c9434e2129c166181105b55fad43fe716
2016-03-16 11:07:35 -04:00
Ms2ger 4d796781c7 Bug 1257510 - Use modern exception syntax in mozbase; r=ahal
The comma form is long-deprecated.
2016-03-18 09:03:25 +01:00
Chris Manchester 7bec6d7863 Bug 1055224 - Run gtest output through a stack fixer. r=ahal
--HG--
extra : commitid : EI5D81v5sjt
2016-01-15 10:36:46 -08:00
Julien Pagès 46f35681b7 Bug 1215756 - Fix mozprocess unit tests failures. r=ahal
This now check process status based on pids, not anymore
on an arbitrary string given in the command line.

Some cleanup in there, including removing code duplicate.
2015-10-21 10:57:58 -04:00
Julien Pagès e6f8f405f1 Bug 1139487 - Remove mozprocess.pid, mozprocess.wpk. r=jmaher
--HG--
extra : commitid : DGexoEWiJn4
extra : rebase_source : 51bc43ca702d67522e58a74286dcaa3487bdacc7
2015-10-06 21:35:43 +02:00
Gregory Szorc 2ec17b35ed Bug 1176642 - Fix typo in import name; r=smacleod
This regressed in 101600812e66.

--HG--
extra : commitid : D0l0sNE394Y
extra : amend_source : 3b811d6911996fb5e56ade252d7c71e83e16bbfe
2015-06-25 13:06:25 -07:00
Gregory Szorc 03600b9f4c Bug 1176642 - Use relative imports in mozprocess; r=smacleod
This regressed in 101600812e66.

--HG--
extra : commitid : BIrMVQYfgXC
2015-06-25 12:55:48 -07:00
Gregory Szorc df5168acca Bug 1176642 - Use absolute_import, remove unused imports from mozprocess; r=chmanchester
--HG--
extra : commitid : AYv7GiLGo4p
extra : rebase_source : bc4157c319894b7a6a9aeda7623cba3f2544738e
2015-06-25 12:13:27 -07:00
Julien Pagès 4dc4420abe Bug 1124695 - [mozrunner] and/or [mozprocess] should send SIGTERM before sending SIGKILL by default; r=ahal
--HG--
extra : rebase_source : f748f2b0ed6e3cf17f7bc9da1be8a8d243dff468
2015-02-27 15:11:14 -05:00
Philip Chee ceb176ce0d Bug 1050561 - Decode string when building an environment block to support non-ASCII environment variables. r=ahalberstadt 2015-04-07 16:09:49 +08:00
Julien Pagès 5bd5f0f1fe Bug 1088192 - mozprocess.ProcessHandlerMixin does not handle missing property "proc" on unstarted processes. r=ahal 2015-03-17 01:10:00 +01:00
Julien Pagès ef6b0d32e0 Bug 923381 - [mozprocess] mozprocess.ProcessHandler should have an option not to print. r=ahal 2015-03-12 13:38:00 +01:00
Chris Manchester b232b5d003 Bug 1140507 - Bump mozprocess version and release to pypi to pick up recent changes.;r=ahal DONTBUILD 2015-03-06 13:55:58 -08:00
Chris Manchester c49a2dcff4 Bug 1139722 - Allow use of nested job objects in mozprocess on windows versions that support them.;r=ahal
This patch detects when breaking away from the parent job isn't strictly necessary to manage processses in a new job to allow using nested job objects to manage processes and their children. Loss of job object functionality is handled in mozprocess as non-fatal, however mozrunner and others doing things like restarting firefox require it.
2015-03-05 18:02:38 -08:00
Ted Mielczarek 61b17bc728 bug 1137228 - use readline instead of iterator for reading mozprocess output. r=ahal
--HG--
extra : rebase_source : dfea4b912d5e91e13330e92fdd300a44bf0a9dc4
2015-02-26 15:16:59 -05:00
Julien Pagès 21fb986d25 Bug 794984 - [mozprocess] Add ability to separate stderr from stdout. r=ahal
A new parameter called 'processStderrLine' is added. When specified, stdout gets processed by the
'processOutputLine' callbacks and stderr is processed by the 'processStderrLine' callbacks. When
not specified, stderr is redirected to stdout which is the same default behaviour.

A side effect of this is that mozprocess now uses three threads to process output. One thread each
for stdout and stderr that reads output lines and stores them in a Queue as fast as possible, this
makes sure there is no blocking in stdout.write(). A third thread executes the callbacks.
2015-02-23 07:39:00 -05:00
Andrew Halberstadt 56769d6693 Bug 1060527 - [mozprocess] signal finished if IO completion port unexpectedly closed on windows, r=jgriffin
--HG--
extra : rebase_source : 773b4bdcbaa088caa958b6d084989439f00a0370
2014-11-14 08:47:32 -05:00
Pankaj Malhotra(:bitgeeky) 945b5e8e0b Bug 1064960 - [mozprocess] Guard against the output thread trying to join with itself. r=ahal 2014-11-04 02:35:00 +01:00
Daniel Lee eed6da99ca Bug 705864 - [mozprocess] mozprocess tests should use mozprocess.pid. r=ahal 2014-10-07 07:00:40 -07:00
Daniel Lee 955aae0525 Bug 1067008 - [mozprocess] mozprocess.pid running_process should look at the entire command not just the executable name. r=ahal 2014-09-16 16:56:21 -07:00
Armen Zambrano Gasparnian d1eeaa0d52 Bug 1051799 - [mozprocess] Bump mozprocess to 0.21. r=wlach. DONTBUILD 2014-08-11 11:36:01 -04:00
Armen Zambrano Gasparnian 115f77927e Bug 1046087 - Normalize line endings on mozprocess for Adb Windows. r=wlach 2014-08-11 08:59:56 -04:00
Ryan VanderMeulen 1bcc49deea Backed out changeset 735394aa3813 (bug 1046087) for Windows bustage.
CLOSED TREE
2014-08-08 13:01:25 -04:00
Armen Zambrano Gasparnian ea2dac5c99 Bug 1050756 - Bump mozprocess to 0.20. r=wlach. DONTBUILD 2014-08-08 09:10:12 -04:00
Armen Zambrano Gasparnian 354655b26f Bug 1046087 - Normalize line endings on Windows. r=wlach
We have found out that the output of Adb on Windows ends with
\r\r\n rather than \r\n. This abnormal line ending cannot be
dealt properly with python's universal_lines. Instead we
decided to normalize every line ending to \n.
2014-08-08 08:47:05 -04:00
Armen Zambrano Gasparnian d268839202 Bug 1026710 - Make DeviceManagerADB use mozprocess to allow logging. r=wlach
Up until now, mozdevice has been using subprocess. The switch gives us the
ability to log adb commands and its output. This will be mainly used
for the Firefox OS cert suite.
2014-07-15 08:59:48 -04:00
Chris Manchester 1c97de1410 Bug 1035006 - Fix pyflakes warnings in mozbase.;r=wlach 2014-07-07 14:51:34 -04:00
Sylvestre Ledru bf348fed7c Bug 991866: Catch the exception and returns the iso8859-1 string. In some cases, the display was failing r=ahal
--HG--
extra : rebase_source : 2a913276a15f721d3a9f07783735544bf292ec7e
2014-07-04 12:07:38 +02:00
Andrew Halberstadt e60605718c Bug 997244 - Move emulator.py out of marionette and into mozrunner, r=wlach,mdas,jgriffin 2014-06-19 14:17:26 -04:00
Ryan VanderMeulen d6d20ed14c Backed out changeset 12536416d070 (bug 991866) for breaking B2G mochitests.
CLOSED TREE
2014-06-04 16:04:14 -04:00
Andrew Halberstadt 4c459289ac Bug 991866 - Decode mozprocess output before printing to stdout, r=gps 2014-06-04 15:00:01 -04:00
James Graham 1e5a6da82f Bug 991727 - Update mozprocess version due to API change, r=ahal 2014-04-03 22:19:31 +01:00
dadadel eff50c44d9 Bug 975136 - Test mozprocess parameters;r=wlach
DONTBUILD

--HG--
extra : rebase_source : 87f60210eccbfe7925cdcce3fafc878cb873c13b
2014-03-10 12:34:03 -04:00
Andrew Halberstadt b1dff3469e Bug 967647 - Enforce an unbuffered stream by default in mozprocess, r=jgriffin 2014-03-03 15:16:54 -05:00
dadadel 554c21189d Bug 975136 - Fix mozprocess to accept single function or array of functions for onTimeout/onFinish, update docs;r=wlach 2014-02-21 16:33:30 -05:00
Andrew Halberstadt 2162ac0779 Bug 949600 - Sync mozbase to m-c one last time, r=wlach 2014-02-19 16:42:01 -05:00