Commit 0529464f authored by Henrik Skupin's avatar Henrik Skupin
Browse files

Bug 1893223 - [marionette] Fix master manifest for in-tree Marionette tests....

Bug 1893223 - [marionette] Fix master manifest for in-tree Marionette tests. r=webdriver-reviewers,application-update-reviewers,Sasha,nalexander

Differential Revision: https://phabricator.services.mozilla.com/D211151
parent 5f662f03
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -67,3 +67,35 @@ The full API documentation is found [here], but the key objects are:
* {class}`Marionette <marionette_driver.marionette.Marionette>`: client that speaks to Firefox

[here]: /python/marionette_driver.rst

## Registering Test Manifests

To run Marionette Python tests locally via `mach` or as part of the `Mn` tests jobs
in CI they need to be registered. This happens by adding a manifest file to the tree,
which includes a reference to the test files and expectations for results.

Such a manifest file can look like the following and is stored with the extension `.toml`:

```ini
[DEFAULT]

["test_expected_fail.py"]
expected = "fail"

["test_not_on_windows.py"]
skip-if = ["os == 'win'"]
```

The registration of such a manifest file is done in two different ways:

1. To run the tests locally via `./mach test` or `./mach marionette-test` the
created Marionette manifest file needs to be referenced in the folder's related
`moz.build` file by adding it to the `MARIONETTE_MANIFESTS` variable like:

    MARIONETTE_MANIFESTS += ["test/marionette/manifest.toml"]

2. To run the tests in CI the manifest file also needs to be included in the
Marionette's own [master manifest file]. This ensures that the test packaging step
will find the tests and include them as well in the test package.

[master manifest file]: https://searchfox.org/mozilla-central/source/testing/marionette/harness/marionette_harness/tests/unit-tests.toml
+12 −9
Original line number Diff line number Diff line
@@ -13,12 +13,6 @@
# marionette unit tests
["include:unit/unit-tests.toml"]

# DOM tests
["include:../../../../../dom/cache/test/marionette/manifest.toml"]
["include:../../../../../dom/indexedDB/test/marionette/manifest.toml"]
["include:../../../../../dom/quota/test/marionette/manifest.toml"]
["include:../../../../../dom/workers/test/marionette/manifest.toml"]

# browser tests
["include:../../../../../browser/components/backup/tests/marionette/manifest.toml"]
["include:../../../../../browser/components/migration/tests/marionette/manifest.toml"]
@@ -27,9 +21,18 @@
["include:../../../../../browser/components/sessionstore/test/marionette/manifest.toml"]
["include:../../../../../browser/components/tests/marionette/manifest.toml"]

# DOM tests
["include:../../../../../dom/cache/test/marionette/manifest.toml"]
["include:../../../../../dom/indexedDB/test/marionette/manifest.toml"]
["include:../../../../../dom/quota/test/marionette/manifest.toml"]
["include:../../../../../dom/workers/test/marionette/manifest.toml"]

# extensions tests
["include:../../../../../extensions/pref/autoconfig/test/marionette/manifest.toml"]

# js tests
["include:../../../../../js/xpconnect/tests/marionette/manifest.toml"]

# layout tests
["include:../../../../../layout/base/tests/marionette/manifest.toml"]

@@ -40,7 +43,7 @@
["include:../../../../../toolkit/components/antitracking/bouncetrackingprotection/test/marionette/manifest.toml"]
["include:../../../../../toolkit/components/cleardata/tests/marionette/manifest.toml"]
["include:../../../../../toolkit/components/extensions/test/marionette/manifest-serviceworker.toml"]
["include:../../../../../toolkit/xre/test/marionette/marionette.toml"]
["include:../../../../../toolkit/xre/test/marionette/manifest.toml"]

# update tests
["include:../../../../../toolkit/mozapps/update/tests/marionette/marionette.toml"]
# update tests (move into toolkit above once bug 1898477 is fixed)
["include:../../../../../toolkit/mozapps/update/tests/marionette/manifest.toml"]
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ XPIDL_SOURCES += [
]

TEST_DIRS += ["tests"]
MARIONETTE_MANIFESTS += ["tests/marionette/marionette.toml"]

EXTRA_COMPONENTS += [
    "nsUpdateService.manifest",
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ if not CONFIG["MOZ_SUITE"]:
    if CONFIG["MOZ_BITS_DOWNLOAD"]:
        BROWSER_CHROME_MANIFESTS += ["browser/browser.bits.toml"]

MARIONETTE_MANIFESTS += ["marionette/manifest.toml"]

XPCSHELL_TESTS_MANIFESTS += [
    "unit_aus_update/xpcshell.toml",
    "unit_base_updater/xpcshell.toml",
Loading