Commit Graph

66 Commits

Author SHA1 Message Date
Dave Hunt
a7adf87dd6 Bug 1428706 - [mozcrash] Bump version number to 1.2.0 and prepare for release with Python 3 support; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D19133

--HG--
extra : moz-landing-system : lando
2019-02-11 15:51:24 +00:00
A. Wilcox
cc96901400 Bug 1428706 - [mozcrash] Add support for Python 3; r=ted
Differential Revision: https://phabricator.services.mozilla.com/D19132

--HG--
extra : moz-landing-system : lando
2019-02-11 13:37:25 +00:00
Nathan Froyd
79a1262103 Bug 1247453 - part 1 - request synchronization privileges in kill_pid; r=gbrown
Windows documentation indicates that it's invalid to WaitForSingleObject
on a process handle unless you request the SYNCHRONIZE access right.
And indeed, we see errors in the logs like:

09:58:28  WARNING - mozcrash kill_pid(): wait failed (-1) terminating pid 6340: error 5

That "error 5" is an ERROR_ACCESS_DENIED code.  Such errors should go
away with requesting the proper access rights.  Credit to dmajor for
noticing the discrepancy.
2019-02-04 11:19:36 -05:00
Andrew Halberstadt
ce87b08ac4 Bug 1436037 - [python] Create Windows python-test tasks, r=gps
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint

The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect

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

--HG--
extra : moz-landing-system : lando
2018-12-05 19:20:16 +00:00
Andreea Pavel
e3299fd2db Backed out 5 changesets (bug 1498640, bug 1436037, bug 1497660, bug 1505579) for mass failures on a CLOSED TREE
Backed out changeset 914a7a899dd1 (bug 1436037)
Backed out changeset e072757bf691 (bug 1436037)
Backed out changeset b0805a8cf6eb (bug 1505579)
Backed out changeset aa32ba9e6df3 (bug 1498640)
Backed out changeset ce441b8a784c (bug 1497660)
2018-11-15 07:53:41 +02:00
Andrew Halberstadt
b03e2aa337 Bug 1436037 - [python] Create Windows python-test tasks, r=gps
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint

The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect

MozReview-Commit-ID: C07FANaYzf7

Depends on D10758

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

--HG--
extra : moz-landing-system : lando
2018-11-15 00:49:45 +00: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
Henrik Skupin
10c59cca93 Bug 1451319 - Unset MINIDUMP_SAVE_PATH for mozcrash unit tests. r=davehunt
The build job on Windows sets the MINIDUMP_SAVE_PATH env variable,
and because it isn't unset mozcrash copies all created minidump
files from unittests to the "public/build" folder, which then
get uploaded as artifacts.

MozReview-Commit-ID: 6JNnRZGlOj3

--HG--
extra : rebase_source : a139221b810e1b38082d5676b67583269802b7e9
2018-04-05 11:53:43 +02:00
Tiberius Oros
784748948c Backed out changeset aecbdcadaf96 (bug 1451319) for linting opt failures /builds/worker/checkouts/gecko/testing/mozbase/mozcrash/tests/conftest.py:90 on a CLOSED TREE
--HG--
extra : amend_source : 35e120af14725c1cc045f729e0d5b36fab2a1cfd
2018-04-05 14:53:07 +03:00
Henrik Skupin
8effc5360b Bug 1451319 - Unset MINIDUMP_SAVE_PATH for mozcrash unit tests. r=davehunt
The build job on Windows sets the MINIDUMP_SAVE_PATH env variable,
and because it isn't unset mozcrash copies all created minidump
files from unittests to the "public/build" folder, which then
get uploaded as artifacts.

MozReview-Commit-ID: 6JNnRZGlOj3

--HG--
extra : rebase_source : c148e5a8ac4439ca0f4e66ee649b45ceb7b1bc60
2018-04-05 11:53:43 +02:00
Henrik Skupin
1983e0ddd6 Bug 1441287 - [mozcrash] Add support for unicode paths. r=ahal
To let mozcrash handle minidump files located in profile paths
with unicode characters, support for that has to be added. It
also applies to the locations for the stackwalk binary, minidump
save path, and symbols.

MozReview-Commit-ID: EROVmK21a5Y

--HG--
extra : rebase_source : 67092e6164eb0e46decd24b2da1490ffefb4d5d7
2018-03-20 11:54:04 +01:00
Henrik Skupin
8152b5a69d Bug 1441287 - [mozcrash] Convert unit tests to pytest. r=ahal
Switch to the pytest framework to benefit from its rich
feature set for creating Python test.

MozReview-Commit-ID: AoptjhT1Hln

--HG--
extra : rebase_source : a0870e54038697f08cf14e7babffdb014a7a3c7d
2018-03-19 14:37:31 +01:00
Henrik Skupin
ba18be73fc Bug 1441287 - [mozcrash] check_for_crashes should always return count of crashes. r=ahal
Right now if no minidump file is present in the minidump folder,
the check_for_crashes method returns False. Whereby in all other
cases the number of crashes is returned.

To be consistent this method should always return a number, and
in case of no minidumps it should be 0.

MozReview-Commit-ID: 3DTgxn41TVn

--HG--
extra : rebase_source : 1631313878b596607ede27ebb04f95a64e2f9e2e
2018-03-20 13:44:56 +01:00
Henrik Skupin
cecdc45b6f Bug 1441287 - [mozcrash] Refactor unit tests. r=ahal
Split single unit test module into different modules separated
by area of test coverage.

MozReview-Commit-ID: Blh8V46kDq1

--HG--
extra : rebase_source : 64bfa620286904fdb2bde114efb337d0dd5d42b7
2018-03-13 15:14:49 +01: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
Tom Prince
a45ea20b93 Bug 1413575: Adjust in-tree references to mozbase documentation to point in-tree. r=ahal
MozReview-Commit-ID: rctbByyjTA

--HG--
extra : rebase_source : a682eb6d77b79640ac9ec20e9d64340613bcfed7
2017-11-20 11:43:13 -07:00
Geoff Brown
00ee6fdea3 Bug 1415290 - Check return codes in mozcrash kill_pid; r=jmaher 2017-11-13 13:12:05 -07:00
Steve Armand
fa0b6e7c7e Bug 1397849 - Enable py2 and py3 linter on testing/mozbase. r=ahal
MozReview-Commit-ID: GnaVLhtO4un

--HG--
extra : rebase_source : 8839a423c5db505469b813957649b1605ed5737f
2017-09-25 22:57:18 -04:00
Andrew Halberstadt
f79b06a32a Bug 1339178 - Use pytest to run python-tests, r=davehunt
This switches most tests over to use pytest as the runner instead of unittest (taking
advantage of the fact that pytest can run unittest based tests).

There were a couple tests that had failures when swithing to pytest:
config/tests/unit-expandlibs.py
xpcom/idl-parser/xpidl/runtests.py

For these tests, I added a runwith='unittest' argument so that they still run the
same way as before. Once we fix them to use pytest, the unittest logic in mozunit.py
can be deleted.

MozReview-Commit-ID: Gcsz6z8MeOi

--HG--
extra : rebase_source : 3c762422ce0af54cbbe7d9fc20085a2d1ebe7057
2017-08-29 14:50:33 -04:00
Ganti Sai Sarath Chandra
6ed789d12b Bug 1378422 - Add python 2 only classifiers to python modules under /testing, r=ahal
MozReview-Commit-ID: DRi8KFyCnBn

--HG--
extra : rebase_source : 3ac98bdc648f8a0e3dc6d3b6d42e19dfc295a396
2017-08-19 04:19:06 +05:30
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
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
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
Henrik Skupin
659bb474d2 Bug 1299216 - [mozcrash] Count crash reports in check_for_crashes and bump version to 1.0. r=ahal
Currently check_for_crashes() behaves differently compared to log_crashes(), whereby it only returns a
boolean if a crash has been detected but not the amount of crash reports found. We should make sure that
both methods behave the same. Given that this change might affect consumers, we should have a major version
bump for the new release.

MozReview-Commit-ID: LiPaozJL5NF

--HG--
extra : rebase_source : d4392207399a1383a20e037bcf73f44bf3c36c7d
2016-09-28 23:26:19 +02:00
Geoff Brown
094fe98143 Bug 1309436 - Add test name to java-exception failure messages; r=ted 2016-10-26 11:31:41 -06:00
Geoff Brown
3bab85a102 Bug 1311528 - Do not report java-exception on "FATAL EXCEPTION"; r=jmaher 2016-10-25 08:53:31 -06: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
Geoff Brown
dd65ba7f12 Bug 1274395 - Delete pending crash reports before running tests; r=jmaher 2016-05-25 14:48:42 -06:00
Henrik Skupin
8f68142bb9 Bug 1251196 - Bump mozcrash to 0.17. r=ted
MozReview-Commit-ID: 98iyU2DXdYN

--HG--
extra : rebase_source : ad4b75f2903dd1c9b5d78306f57d1740a665df92
2016-03-03 21:41:27 +01:00
Henrik Skupin
a731eb848d Bug 1251196 - [mozcrash] If no symbols path is specified let stackwalk download the symbols. r=ted
MozReview-Commit-ID: 89bOoLwHMgK

--HG--
extra : rebase_source : 2a48d9c675cb7453bef5c14975f900286e2c4b28
2016-02-26 23:34:56 +01:00
Carsten "Tomcat" Book
6244cfb10e Backed out changeset 200da85932e9 (bug 1230862) for valgrind perma failures 2016-02-10 11:04:50 +01:00
Julien Pagès
cb348f4346 Bug 1230862 - Remove mozhttpd. r=wlach
--HG--
extra : commitid : HRDp24nhYo8
extra : rebase_source : 76443fa9938e488fcd06af7ba0676d491c9da36e
2016-02-09 03:26:43 +01:00
Chris Manchester
4c18bc2045 Bug 1194935 - Add a C++ implementation of kill_and_get_minidump as part of the build to accommodate dumping 64 bit Firefox from 32 bit python. r=ted
--HG--
extra : commitid : K6BGWSIH6Nk
2015-08-18 17:04:45 -07:00
Armen Zambrano Gasparnian
9cb894a3c7 Bug 1234353 - Notify the user if the stackwalk binary is not executable. r=chmanchester
--HG--
extra : commitid : Puf7a5bGxK
extra : rebase_source : 7d8f2bcf5d12175c695c3f7d63532de6be47cb9a
2015-12-21 16:50:49 -05:00
Steve Fink
29c5b5d917 Bug 837969 - Make mozcrash.py runnable, r=ted
--HG--
extra : commitid : FB26Q0s1SXJ
extra : rebase_source : ffbccf23816976bcae9d810828eeba50f0ace293
2015-06-16 13:14:04 -07:00
Julien Pagès
e349eb87dd Bug 1203040 - [mozcrash] bump version to 0.16. r=ahal
--HG--
extra : rebase_source : eb6f5df720deeceb54a1fa7ad55ffc312ebee28d
2015-09-09 02:15:00 +02:00
Chris Manchester
82d2096a68 Bug 890026 - Fixup to import signal in mozcrash. r=ahal
--HG--
extra : commitid : JRt9d8Qku2P
2015-07-17 12:32:53 -07:00
Andrew Halberstadt
4f232ef5f5 Bug 1014760 - Version bump mozbase modules that depend on mozlog 3.0, r=me
--HG--
extra : commitid : L7a2lDztYH4
extra : rebase_source : 6178d707787cfa11a806ea8369789092b22a5d4f
2015-07-17 10:06:59 -04:00
Andrew Halberstadt
2be5ff0c10 Bug 1014760 - Move mozlog.structured to mozlog; Move mozlog to mozlog.unstructured, r=jgraham
Mozlog currently has two implementations. The top level package is based on the logging module and is
deprecated. The newer structured logging implementation lives in mozlog.structured. This patch swaps the
two, so the top level mozlog module contains the recommended implementation, while mozlog.unstructured
contains the old one.

--HG--
rename : testing/mozbase/docs/mozlog_structured.rst => testing/mozbase/docs/mozlog.rst
rename : testing/mozbase/mozlog/mozlog/structured/commandline.py => testing/mozbase/mozlog/mozlog/commandline.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/__init__.py => testing/mozbase/mozlog/mozlog/formatters/__init__.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/base.py => testing/mozbase/mozlog/mozlog/formatters/base.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/errorsummary.py => testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/html/__init__.py => testing/mozbase/mozlog/mozlog/formatters/html/__init__.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/html/html.py => testing/mozbase/mozlog/mozlog/formatters/html/html.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/html/main.js => testing/mozbase/mozlog/mozlog/formatters/html/main.js
rename : testing/mozbase/mozlog/mozlog/structured/formatters/html/style.css => testing/mozbase/mozlog/mozlog/formatters/html/style.css
rename : testing/mozbase/mozlog/mozlog/structured/formatters/html/xmlgen.py => testing/mozbase/mozlog/mozlog/formatters/html/xmlgen.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/machformatter.py => testing/mozbase/mozlog/mozlog/formatters/machformatter.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py => testing/mozbase/mozlog/mozlog/formatters/tbplformatter.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/unittest.py => testing/mozbase/mozlog/mozlog/formatters/unittest.py
rename : testing/mozbase/mozlog/mozlog/structured/formatters/xunit.py => testing/mozbase/mozlog/mozlog/formatters/xunit.py
rename : testing/mozbase/mozlog/mozlog/structured/handlers/__init__.py => testing/mozbase/mozlog/mozlog/handlers/__init__.py
rename : testing/mozbase/mozlog/mozlog/structured/handlers/base.py => testing/mozbase/mozlog/mozlog/handlers/base.py
rename : testing/mozbase/mozlog/mozlog/structured/handlers/bufferhandler.py => testing/mozbase/mozlog/mozlog/handlers/bufferhandler.py
rename : testing/mozbase/mozlog/mozlog/structured/handlers/statushandler.py => testing/mozbase/mozlog/mozlog/handlers/statushandler.py
rename : testing/mozbase/mozlog/mozlog/structured/logtypes.py => testing/mozbase/mozlog/mozlog/logtypes.py
rename : testing/mozbase/mozlog/mozlog/structured/reader.py => testing/mozbase/mozlog/mozlog/reader.py
rename : testing/mozbase/mozlog/mozlog/structured/scripts/__init__.py => testing/mozbase/mozlog/mozlog/scripts/__init__.py
rename : testing/mozbase/mozlog/mozlog/structured/scripts/format.py => testing/mozbase/mozlog/mozlog/scripts/format.py
rename : testing/mozbase/mozlog/mozlog/structured/scripts/logmerge.py => testing/mozbase/mozlog/mozlog/scripts/logmerge.py
rename : testing/mozbase/mozlog/mozlog/structured/scripts/unstable.py => testing/mozbase/mozlog/mozlog/scripts/unstable.py
rename : testing/mozbase/mozlog/mozlog/structured/stdadapter.py => testing/mozbase/mozlog/mozlog/stdadapter.py
rename : testing/mozbase/mozlog/mozlog/structured/structuredlog.py => testing/mozbase/mozlog/mozlog/structuredlog.py
rename : testing/mozbase/mozlog/mozlog/logger.py => testing/mozbase/mozlog/mozlog/unstructured/logger.py
rename : testing/mozbase/mozlog/mozlog/loggingmixin.py => testing/mozbase/mozlog/mozlog/unstructured/loggingmixin.py
rename : testing/mozbase/mozlog/mozlog/loglistener.py => testing/mozbase/mozlog/mozlog/unstructured/loglistener.py
extra : commitid : 3JWk75JY4N0
extra : rebase_source : 229bad7a7bf8ead013ce62d128c0896a75cad393
2015-07-16 10:38:40 -04:00
Ted Mielczarek
762d7f01fe bug 890026 - Add mozcrash.kill_and_get_minidump r=jimm
--HG--
extra : commitid : AiwIqkz3KIe
2013-07-31 10:41:33 -04:00
Geoff Brown
8f916d8709 Bug 1160351 - Improve newline handling in getLogcat; r=bc 2015-05-04 10:32:44 -06:00
Geoff Brown
65d6cce4d3 Bug 1093328 - Limit crashreports to first 10 minidumps; r=ted 2014-11-04 08:17:19 -07:00
Dave Hunt
3ce11fb12b Bug 1082470 - [mozcrash] Bump version to 0.14. r=ahalberstadt 2014-10-14 02:47:00 +02:00
Chris Manchester
e2b843d329 Bug 1068429 - Provide an indication whether a crash was logged by log_crashes.r=ted 2014-09-23 20:33:11 -04:00
James Graham
678f4e386e Bug 1055522 - Bump mozcrash version number for structured logging changes, r=ted.mielczarek 2014-08-19 16:17:58 +01:00
James Graham
38feb0f461 Bug 1055521 - Expose mozcrash.log_crashes for structured logging of crashes, r=ted.mielczarek 2014-08-19 16:15:19 +01:00
James Graham
48af23d3d1 Bug 1023371 - Refactor mozcrash to seperate out the IO from the stack inspection, r=ted.mielczarek
This makes it compatible with structured logging.
2014-08-15 23:19:34 +01:00
Dan Minor
d9815011e3 Bug 978066 - [mozcrash] Mozcrash check_for_java_exception function should take quiet parameter; r=wlach 2014-02-28 09:18:25 -05:00
Henrik Skupin
30621fe275 Bug 973937 - [mozcrash] check_for_crashes() doesn't save .extra file to dump_save_path. r=ted
--HG--
extra : rebase_source : 2173eb218be74052b176ba5d02f375f512e4296f
2014-02-20 15:06:38 +01:00
Andrew Halberstadt
2162ac0779 Bug 949600 - Sync mozbase to m-c one last time, r=wlach 2014-02-19 16:42:01 -05:00