Closed Bug 1892038 Opened 1 year ago Closed 1 year ago

./mach try cannot run specific marionette tests; marionette.py prepends build/tests/marionette/tests/ to the passed test paths

Categories

(Testing :: Marionette Client and Harness, defect, P3)

defect

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: robwu, Assigned: gbrown)

References

Details

Attachments

(1 file)

When I use mach try with paths I get a bunch of failures in Mn and Mn-swr. It looks like Marionette tries to read the tests from the wrong location. All other test runners look up the test manifest at the given path, but Marionette prepends build/tests/marionette/tests/ before the paths:

Relevant code responsible:

Minimal example:

Example from ./mach try --preset=webextensions (example of try push):

  • Input path: toolkit/components/extensions/test
  • Expected matched manifest: toolkit/components/extensions/test/marionette/manifest-serviceworker.toml
  • Actual path passed to runtests.py: /builds/worker/workspace/build/tests/marionette/tests/toolkit/components/extensions/test

Relevant part of log file:

Calling ['/builds/worker/workspace/build/venv/bin/python', '-u', '/builds/worker/workspace/build/tests/marionette/harness/marionette_harness/runtests.py', '--setpref=media.peerconnection.mtransport_process=false', '--setpref=network.process.enabled=false', '--setpref=layers.d3d11.enable-blacklist=false', '--gecko-log=-', '--log-raw=-', '-vv', '--log-errorsummary=/builds/worker/workspace/build/blobber_upload_dir/marionette_errorsummary.log', '--log-html=/builds/worker/workspace/build/blobber_upload_dir/report.html', '--binary=/builds/worker/workspace/build/application/firefox/firefox', '--address=localhost:2828', '--symbols-path=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Cj489SrlTSOF9duuQ0_dJw/artifacts/public/build/target.crashreporter-symbols.zip', '/builds/worker/workspace/build/tests/marionette/tests/toolkit/components/extensions/test'] with output_timeout 1000
INFO - usage: runtests.py [options] test_file_or_dir <test_file_or_dir> ...
INFO - runtests.py: error: Test file(s) not found: /builds/worker/workspace/build/tests/marionette/tests/toolkit/components/extensions/test
INFO - Return code: 2
ERROR - No suite end message was emitted by this harness.

webextensions try preset was added in bug 1856473.

Due to this bug, marionette tests are not scheduled and each try push has orange jobs.
While I could explicitly filter out marionette tests from the try preset (to avoid orange jobs), my preference is to fix this bug so that marionette tests are scheduled as expected.

See Also: → 1856473

I'm not sure if there is a problem with the path manipulations.

It looks to me like the expected test files are not present in the test archive. afaik, the marionette test files come from the target.common.tests archive. For example, in https://firefoxci.taskcluster-artifacts.net/Ct6-uIRhQdK52Gy3DGPd9A/0/public/logs/live_backing.log:

[task 2024-04-17T07:12:22.973Z] 07:12:22     INFO - Downloading and extracting to /builds/worker/workspace/build/tests these dirs * from https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Cj489SrlTSOF9duuQ0_dJw/artifacts/public/build/target.common.tests.tar.gz

but if I examine that target.common.tests.tar.gz file, there are no toolkit/components/extensions paths present.

I wonder if that's related to the conditional at https://searchfox.org/mozilla-central/rev/ee9fd5e2df79c6d69af5aa9bc36041166f483227/toolkit/components/extensions/moz.build#133 ?

Actually, I think target.common.tests.tar.gz is normally populated with marionette test files via https://searchfox.org/mozilla-central/rev/ee9fd5e2df79c6d69af5aa9bc36041166f483227/python/mozbuild/mozbuild/action/test_archive.py#108-117 -- that is, from the main manifest, at https://searchfox.org/mozilla-central/rev/ee9fd5e2df79c6d69af5aa9bc36041166f483227/testing/marionette/harness/marionette_harness/tests/unit-tests.toml ... which seems to be missing toolkit/components/extensions/test.

Yes, those test tasks pass on try if the missing manifest is added to unit-tests.toml: https://treeherder.mozilla.org/jobs?repo=try&revision=6dc21c9a9b151e2f927d7dccd7f5fbea7cc68a8a

Assignee: nobody → gbrown
Component: Applications: MozharnessCore → Marionette Client and Harness
Product: Release Engineering → Testing

Bug 1893223 was filed when a concern was raised about the general case of tests being in MARIONETTE_MANIFESTS but not in unit-tests.toml.

See Also: → 1893223
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P3
Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11ef59138be1 Add missing marionette manifest path r=webdriver-reviewers,jdescottes,robwu
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: