Commit Graph

259 Commits

Author SHA1 Message Date
arthur.iakab
0043db55af Backed out 2 changesets (bug 1460914)for multiple failures on profile_data/base "CLOSED TREE"
Backed out changeset a2161aab4e4e (bug 1460914)
Backed out changeset 9e438c55a248 (bug 1460914)
2018-10-26 19:42:33 +03:00
Andrew Halberstadt
11786b0c1b Bug 1460914 - [xpcshell] Use nsIPrefService.readUserPrefsFromFile to set prefs, r=ted
This uses nsIPrefService.readUserPrefsFromFile to set preferences from a
user.js passed in via the python harness. This allows us to use the profiles
under testing/profiles like all the other harnesses and will make setting prefs
in xpcshell easier to use and understand.

Differential Revision: https://phabricator.services.mozilla.com/D9716
2018-10-25 15:22:44 +00:00
Andrew Halberstadt
bd31dd1c88 Bug 1460914 - [xpcshell] Cleanup code to build the xpcshell command, r=ted
The current command line building is hard to follow and make sense of. Let's
just use a single command variable and comment the order it needs.

Depends on D9549

Differential Revision: https://phabricator.services.mozilla.com/D9550
2018-10-24 13:56:57 +00:00
Gregory Mierzwinski
54437cccaa Bug 1496791 - Disable linux64-jsdcov completely. r=jmaher
This patch removes linux64-jsdcov from the available builds on taskcluster along with any hacks used to run it. It also removes any 'coverage' entries that were added to skip tests.

Differential Revision: https://phabricator.services.mozilla.com/D7919
2018-10-05 21:06:25 +00:00
Edwin Gao
a72e9c8c8f Bug 1291335 - Check mozconfig for --disable-tests when running mach test commands r=gbrown
Behavior changes:

- instead of reading the mozconfig file, it now instantiates an instance of the build object.
- safe checking methods are used to access attributes to prevent errors on automation environment.
- better mach command parsing is performed with handler category instead of error-prone argv parsing.


Other changes:

- docstring for testing/xpcshell/runxpcshelltests.py::buildTestList() added and modernized.
- added clause that if length of tests gathered is 0, mach exits with an error code of 1.

Differential Revision: https://phabricator.services.mozilla.com/D7133
2018-10-03 15:40:48 +00:00
Geoff Brown
9e07053be8 Bug 1440714 - Remove DeviceManagerADB and Droid classes from mozdevice; r=bc 2018-04-26 10:43:08 -06:00
Honza Bambas
7b85fa6c38 Bug 1438583 - Shutdown test node server during --verify at the right time, r=gbrown 2018-02-15 09:40:00 +02:00
Patrick McManus
763886d94c Bug 1437529: --verify shudown node h2 server for phase2 r=gbrown
MozReview-Commit-ID: BwSgugC1k7A
2018-02-12 09:57:48 -05:00
Andrew Halberstadt
3353b79e9c 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
2018-01-31 14:32:08 -05:00
Andrew Halberstadt
f6b35510de Bug 1209463 - [test] Log suite names in test harnesses, r=gbrown
Suite names are currently only used by formatters to print out
an overall summary from |mach test| and |mach mochitest|. So
this doesn't need to be exact and can be tweaked further at a
later date.

If multiple test invocations have the same suite name, their
results will be merged in the overall summary. If a suite name
is missing, the summary will contain a placeholder name.

MozReview-Commit-ID: K1xpb9hUQRX
2017-11-27 17:20:06 -05:00
Mike Hommey
6841c321d6 Bug 1420355 - Statically link DMD. r=njn 2017-11-28 08:10:48 +09:00
Csoregi Natalia
e4966430b1 Backed out 7 changesets (bug 1420355) for mass failures on OS X and Android. r=backout on a CLOSED TREE
Backed out changeset a7ed89e13a4c (bug 1420355)
Backed out changeset fd6702e6e0a0 (bug 1420355)
Backed out changeset 0479dda078a2 (bug 1420355)
Backed out changeset e69357ccca9e (bug 1420355)
Backed out changeset 3742a4b69ba2 (bug 1420355)
Backed out changeset 451cd087922f (bug 1420355)
Backed out changeset d80b5c4e1dd0 (bug 1420355)
2017-11-29 03:08:46 +02:00
Mike Hommey
0a7b28a47e Bug 1420355 - Statically link DMD. r=njn 2017-11-28 08:10:48 +09:00
Geoff Brown
1c833985c8 Bug 1390884 - Enable limited test chaos mode in test-verify; r=jmaher
This adds new test verification steps for mochitest/reftest/xpcshell tests
with MOZ_CHAOSMODE=3 (thread scheduling and network thread scheduling).
Enabling all chaos mode features seems to destabilize test verification
so I am only enabling these features for now.
2017-09-26 13:20:28 -06:00
Steve Armand
7d1ce50630 Bug 1397852 - Enable flake8 linter on testing/xpcshell. r=ahal
MozReview-Commit-ID: CvZVXQPx8jF
2017-09-14 09:51:27 -04:00
Steve Armand
07ba3db5a9 Bug 1397855 - Enable py2 and py3 linter on testing/xpcshell. r=ahal
MozReview-Commit-ID: CsfIcI1ma7J
2017-09-07 21:15:35 -04:00
Sebastian Hengst
ee91a101d1 Backed out changeset ec61b7a902c2 (bug 1397855) for XPCshell bustage, at least on Android. r=backout on a CLOSED TREE 2017-09-12 21:42:12 +02:00
Steve Armand
fdf89b0329 Bug 1397855 - Enable py2 and py3 linter on testing/xpcshell. r=ahal
MozReview-Commit-ID: CsfIcI1ma7J
2017-09-07 21:15:35 -04:00
Geoff Brown
7f0deabaf9 Bug 1390884 - Do not use chaos mode for test verification; r=jmaher
Chaos mode for test verification doesn't quite work -- it is a bit flaky still.
I intend to come back to it at a later date.
2017-08-16 16:42:41 -06:00
Geoff Brown
08ed85d0c4 Bug 1390599 - 3. Add --verify and --verify-max-time options to xpcshell test harness; r=jmaher
This adds test verification support to the xpcshell test harness. With --verify,
the specified test(s) are run 20 times, then another 20 times in chaos mode.

Tests are run sequentially. I have some interest in running in parallel also,
but this may not be practical: 1. Under normal circumstances, a test does not
run in parallel with itself, so it is arguably an unrealistic mode of operation;
2. Logging fails if it sees a test start after a test with the same name has completed.
2017-08-16 06:55:55 -06:00
Geoff Brown
dc340b68e0 Bug 1390599 - 2. Break xpcshell test harness runTests() function into smaller pieces; r=jmaher
New function updateMozinfo() is broken out of runTests() and the remainder of runTests()
is split into two parts: runTests() prepares tests, then calls new function runTestList() to
actually run them. All changes are structural and no change in behavior is expected.
2017-08-16 06:55:53 -06:00
Geoff Brown
76461d9283 Bug 1390599 - 1. Simplify argument passing in xpcshell test harness; r=jmaher
The complexity of the xpcshell test harness has grown over time. I am reluctant
to make it more complex without first trying to simplify it. Here I consolidate
some of the argument passing between functions in an attempt to simplify some
important interfaces. Changes are strictly structural and should result in no
change in behavior.
2017-08-15 09:06:16 -06:00
Haik Aftandilian
e850ae58e6 Bug 1380132 - Part 2 - Set MOZ_DEVELOPER_OBJ_DIR before launching Firefox. r=gps
MozReview-Commit-ID: CvSUt2KueHr
2017-07-12 17:01:56 -07:00
Andrew Halberstadt
3efc1cdb6d Bug 1375173 - Fix bug preventing running xpcshell from ./mach test, r=jgraham
MozReview-Commit-ID: FxPAAP3r9k0
2017-06-23 08:25:21 -04:00
Sebastian Hengst
eb0fa608be Backed out changeset a0f804d0b487 (bug 1375173) for failing Windows taskcluster builds in selftest.py | XPCShellTestsTests.testAddTaskRunNextTest. r=backout on a CLOSED TREE 2017-06-23 19:08:42 +02:00
Andrew Halberstadt
eb491ed127 Bug 1375173 - Fix bug preventing running xpcshell from ./mach test, r=jgraham
MozReview-Commit-ID: FxPAAP3r9k0
2017-06-23 08:25:21 -04:00
Andrew Halberstadt
9dba3c1f37 Bug 1373796 - Normalize xpcshell manifests in errorsummary, r=jgraham
MozReview-Commit-ID: It2HPXMuqLA
2017-06-20 10:52:33 -04:00
Alex Gaynor
0e931dbe6c Bug 1370438 - The MOZ_DISABLE_CONTENT_SANDBOX environment variable now works on macOS and is used in the xpcshell tests; r=haik
This environment variable works on both Windows and Linux for force-disabling
the content sandbox, and now does so on macOS as well.

The xpcshell tests force disable the sandbox because they do things like bind()
sockets, which is not compatible with the content sandbox. This is needed now
because bug 1358223 was force upgrading the sandbox from level 0 (disabled) to
level 1 on beta channel, which caused breakage.

MozReview-Commit-ID: 5DGxtoDLp0C
2017-06-07 15:30:09 -04:00
Alex Gaynor
478321d9d3 Bug 1294641 - whitelist reads from the .app directory in the macOS sandbox r=froydnj,haik
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.

r=haik,froydnj

MozReview-Commit-ID: KNvAoUs5Ati
2017-04-07 14:53:19 -04:00
Sebastian Hengst
155e26d497 Backed out changeset 225683fed1d1 (bug 1294641) for breaking crashtests, reftests and Windows builds. r=backout on a CLOSED TREE 2017-04-17 16:29:52 +02:00
Alex Gaynor
d7af07ecbe Bug 1294641 - whitelist reads from the .app directory in the macOS sandbox r=froydnj,haik
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.

r=haik,froydnj

MozReview-Commit-ID: KNvAoUs5Ati
2017-04-07 14:53:19 -04:00
Ting-Yu Chou
9c40f931c5 Bug 1333003 part 6 - Fix test scripts to run ASan on Windows. r=ted
MozReview-Commit-ID: 6F9UXgTRb2Y
2017-03-10 12:08:34 +08:00
Brendan Dahl
85f151ac59 Bug 1338004 - Add headless browser mode. r=jrmuizel, r=ted
Supports creating a windowless browser on Linux without an X server. Most of the
changes are just adding branches to avoid calls in to GTK which calls
into X. Some of the bigger additions were adding a separate headless widget
which implements just enough to render a page. A headless look and
feel were also added since there are many calls into GTK in the platform
specific one.
2017-04-04 10:22:00 -04:00
Wes Kocher
3095b422dc Backed out 7 changesets (bug 1333003) for windows asan failures a=backout
Backed out changeset 3d2b2eeda8d3 (bug 1333003)
Backed out changeset 400d409ba4ca (bug 1333003)
Backed out changeset 1ba027abdfc9 (bug 1333003)
Backed out changeset 70114135bd8c (bug 1333003)
Backed out changeset 5715b15e33c0 (bug 1333003)
Backed out changeset 375e952bd738 (bug 1333003)
Backed out changeset d5d4112599f2 (bug 1333003)

MozReview-Commit-ID: DZUHJTdjX7V
2017-03-23 11:01:44 -07:00
Ting-Yu Chou
f66b5c4835 Bug 1333003 part 6 - Fix test scripts to run ASan on Windows. r=ted
MozReview-Commit-ID: 6F9UXgTRb2Y
2017-03-10 12:08:34 +08:00
Carsten "Tomcat" Book
88dfdca025 Backed out changeset 18fd8676751a (bug 1333003) 2017-03-23 10:38:04 +01:00
Ting-Yu Chou
f761f3c2a3 Bug 1333003 part 6 - Fix test scripts to run ASan on Windows. r=ted
MozReview-Commit-ID: 6F9UXgTRb2Y
2017-03-10 12:08:34 +08:00
Honza Bambas
d380c324d0 Bug 1321026 - Have an argument to change the number of parallel tests when running xpcshelltests, r=ted 2017-03-06 05:39:00 +01:00
Sebastian Hengst
6b2f608e3e Backed out changeset a293a617ebed (bug 1321026) on suspicion of causing xpcshell bustage. r=backout on a CLOSED TREE 2017-03-06 23:35:17 +01:00
Honza Bambas
82ce68f9b1 Bug 1321026 - Have an argument to change the number of parallel tests when running xpcshelltests. r=ted 2017-03-06 08:44:00 -05:00
Andrew Halberstadt
89b137ea65 Bug 1340551 - Log tests by manifest from suite_start in xpcshell harness, r=jgraham
MozReview-Commit-ID: G7P20w0G0fM
2017-02-22 14:34:29 -05:00
Chris Peterson
6bb2787575 Bug 1336776 - Log more useful error messages if MOZ_NODE_PATH or MOZHTTP2_PORT environment variables are not set correctly. r=nwgh
MozReview-Commit-ID: Fevu9smKdu3
2017-02-04 16:21:58 -08:00
Greg Mierzwinski
a9323edf9f Bug 1301197 - Add xpcshell code coverage to linux64-jsdcov and the 'coverage' mozinfo flag. r=jmaher
This patch makes it possible to collect code coverage for xpcshell tests using the linux64-jsdcov build. It also enables the use of a 'coverage' flag to disable tests when they are instrumented with the js debugger for code coverage. Lastly, it uses the 'coverage' flag to disable certain tests.

MozReview-Commit-ID: 97VFkJmlwQn
2016-11-08 15:57:21 -05:00
Mark Banner
ee78c2e613 Bug 503613 - Remove the tail file functionality from xpcshell; r=gps
MozReview-Commit-ID: JcglhFl89DX
2017-01-17 15:27:55 +00:00
Nicholas Hurley
87c16d8d6c Bug 1310855 - Remove hasNode xpcshell.ini variable r=mcmanus
MozReview-Commit-ID: Hx2e1JYfUfy
2016-10-18 10:54:33 -07:00
Andrew Halberstadt
58e3ab082c Bug 1316309 - Use mozcrash.kill_and_get_minidump() in xpcshell instead of automation.py, r=ted
There are a number of things that were going wrong with XPCShell on windows, this patch address them:

1) We were erroring out in Automation.killAndGetStack(), both failing to produce a minidump and failing
to kill the process. This patch fixes both these issues by using mozcrash instead.

2) Occasionally we were occasionally raising a psutil.NoSuchProcess error when attempting to kill the
process after the test. This appears to be caused by a race condition, but is safe to ignore as if the
process doesn't exist, then we don't need to kill it.

3) Spurious "Unable to remove directory" errors in cleanup. This uses mozfile.remove to remedy this.

MozReview-Commit-ID: 1g5qO8fpM7R
2016-11-09 10:32:46 -05:00
Andrew Halberstadt
b5202cebb3 Bug 1316408 - Remove all b2g related code from testing/xpcshell, r=jmaher
MozReview-Commit-ID: KF5Pw5WBleX
2016-11-09 14:50:45 -05:00
Phil Ringnalda
74a62f1b6e Backed out changeset 4777ed22d16d (bug 1261197) for xpcshell "logged while not in progress" failures 2016-11-08 21:11:50 -08:00
pyang
f6425045cc Bug 1261197 - Use StructuredOutputParser for parsing xpcshell test results r=ahal
MozReview-Commit-ID: 3kg8oEAecR7
2016-11-08 11:17:42 +08:00
Phil Ringnalda
28a0e4723b Backed out changeset 143f26b923d0 (bug 1310855) for WinXP xpcshell failures starting with test_register_success_http2.js 2016-11-07 18:42:57 -08:00