Commit Graph

246 Commits

Author SHA1 Message Date
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
Nicholas Hurley
0b381a0479 Bug 1310855 - Remove hasNode xpcshell.ini variable r=mcmanus
MozReview-Commit-ID: Hx2e1JYfUfy
2016-10-18 10:54:33 -07:00
Chris Manchester
c4aba81fb1 Bug 1282522 - Ensure stderr is printed in case of a shutdown crash in a passing xpcshell test. r=gps
There were two assumptions preventing this output from being logged, both
related to the case a test passes and xpcshell returns 0. The first was
that we would not find crash dumps in this case, and would therefore not
need to log the full output of the test process (in the case xpcshell
returned non-zero or a test failed, we would log this output prior to checking
for crashes). The second was that if a test was eligible to retry, we wouldn't
need to store a test's output at all, because this output would only relate to
a failure that we would consider non-fatal.

The first assumption does not hold because it's possible to fatally assert
at shutdown in tests spawning child processes without causing a test failure
or non-zero exit code.

The second assumption followed from the first, and is violated when the first
is violated, because in this case we would consider a found crash fatal even
when a test was eligible to retry.

This patch reverses these assumptions and logs the full output of a test that
passes but produces crash dumps. It's not clear that the existing code intended
for a crash to ever be considered fatal when a test was eligible to retry, but
to change this criteria now would reduce our effective test coverage by
ignoring crashes that are now considered fatal, so after this patch we continue
to consider this scenario fatal. If it is determined these crashes are related
to these tests running in parallel with other tests, or they are not relevant
for some other reason, these tests should be run sequentially, or this criteria
should be changed.


MozReview-Commit-ID: 2PaFSGx2MVR
2016-09-12 23:02:44 -07:00
Nicholas Hurley
3ed39d224f Bug 1296280 (part 0b) - Make debugging node h2 server work better r=mcmanus
MozReview-Commit-ID: 6QoGiUKGTzA
2016-09-07 09:43:47 -07:00
Masatoshi Kimura
8b7e6c6a08 Bug 1248198 - Set "hasNode" only if the node version is >=5.0.0 because older node does not support ALPN. r=glandium
MozReview-Commit-ID: D4rrp92R5YS
2016-07-15 21:08:42 +09:00
Nicholas Hurley
5bd2184bfd Bug 1248197 - Remove spdy/3.1 support. r=mcmanus
MozReview-Commit-ID: 1RgzxOY00Le
2016-07-15 15:13:49 -07:00
Greg Mierzwinski
4cc8cf9258 Bug 1278649 - Add code coverage to xpcshell tests. r=chmanchester
This adds the ability to use the command line flag '--jscov-dir-prefix' to collect javascript code coverage from xpcshell tests and output it into the specified directory as a JSON file.

MozReview-Commit-ID: 3MZm73SNChL
2016-06-08 09:41:04 -04:00
Gregory Szorc
2dd9fb2182 Bug 1272851 - Allow temporary directory to be specified to xpcshell test harness; r=ted
A subsequent commit will change where the temporary directory is located
in certain test invocations. To do this, we need to teach the xpcshell
harness to use an alternate temporary directory instead of using the system
default (likely specified from TEMP* environment variables).

MozReview-Commit-ID: IUUlYaLBiEC
2016-05-26 12:09:46 -07:00
Kris Maglione
62ba00e812 Bug 1269501: Part 1 - Add $PYTHON variable to environment for subprocess xpcshell tests. r=glandium
I'm not especially happy with this method, but the DMD tests are the only
other tests I can find doing anything like this, and I don't have a better
solution than doing it the same way.

MozReview-Commit-ID: JlclyKoUhRf
2016-05-08 20:33:36 -07:00
Sebastian Hengst
3344303db0 Backed out 5 changesets (bug 1269501) for failing the added test_subprocess.js on Windows (didn't fold it into the last backout). r=backout
Backed out changeset 3e1d7c5d1a58 (bug 1269501)
Backed out changeset 167e407cb1fc (bug 1269501)
Backed out changeset 6438b11898cf (bug 1269501)
Backed out changeset 1cbbf940ec35 (bug 1269501)
Backed out changeset ed35c5f4d756 (bug 1269501)
2016-05-28 12:38:25 +02:00
Kris Maglione
4976d8b97a Bug 1269501: Part 1 - Add $PYTHON variable to environment for subprocess xpcshell tests. r=glandium
I'm not especially happy with this method, but the DMD tests are the only
other tests I can find doing anything like this, and I don't have a better
solution than doing it the same way.

MozReview-Commit-ID: JlclyKoUhRf
2016-05-08 20:33:36 -07:00
Andreas Tolfsen
a5114bd995 Bug 1240723 - Harmonise xpcshell head- and tail list computation; r=ted.mielczarek
Head- and tail entries in manifest files are not mandatory on
local/desktop xpcshell tests, and they should not be on remote/B2G either.

This change makes remotexpcshelltests and runxpcshelltests agree on how
to get head- and tail files.
2016-01-19 13:48:53 +00:00
Julian Seward
c3e7f8c2eb Bug 1222043 - Make "mach xpcshell-test" more TSan-friendly. r=ahalberstadt. 2015-11-25 12:38:20 +01:00
James Graham
8ee5cf605c Bug 1207747 - Ensure that logging command line options are always available when running xpcshell tests, r=chmanchester 2015-10-08 10:28:15 +01:00