Skip to content

Commit

Permalink
Bug 1714641: Remove usages of vendored "wptserve_py2" library r=jgrah…
Browse files Browse the repository at this point in the history
…am,ahal

We should only be using the Python3 "wptserve" library at this point.

Differential Revision: https://phabricator.services.mozilla.com/D117062
  • Loading branch information
Mitchell Hentges committed Jun 9, 2021
1 parent dded9cd commit 4e33fee
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 149 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ exclude =
testing/marionette/harness/marionette_harness/tests,
testing/mochitest/pywebsocket3,
testing/mozharness/configs/test/test_malformed.py,
testing/web-platform/mozilla/tests/tools/wptserve_py2,
testing/web-platform/tests,
tools/lint/test/files,
tools/infer/test/*.configure,
Expand Down
172 changes: 30 additions & 142 deletions python/mozbuild/mozbuild/action/test_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@

TEST_HARNESS_DLLS = ["crashinjectdll", "mozglue"]

GMP_TEST_PLUGIN_DIRS = [
"gmp-fake/**",
"gmp-fakeopenh264/**",
]
GMP_TEST_PLUGIN_DIRS = ["gmp-fake/**", "gmp-fakeopenh264/**"]

# These entries will be used by artifact builds to re-construct an
# objdir with the appropriate generated support files.
Expand Down Expand Up @@ -100,47 +97,30 @@
"fuzztest/**",
],
},
{
"source": buildconfig.topobjdir,
"base": "_tests",
"pattern": "modules/**",
},
{"source": buildconfig.topobjdir, "base": "_tests", "pattern": "modules/**"},
{
"source": buildconfig.topsrcdir,
"base": "testing/marionette",
"patterns": [
"client/**",
"harness/**",
"mach_test_package_commands.py",
],
"patterns": ["client/**", "harness/**", "mach_test_package_commands.py"],
"dest": "marionette",
"ignore": [
"client/docs",
"harness/marionette_harness/tests",
],
"ignore": ["client/docs", "harness/marionette_harness/tests"],
},
{
"source": buildconfig.topsrcdir,
"base": "",
"manifests": [
"testing/marionette/harness/marionette_harness/tests/unit-tests.ini",
"testing/marionette/harness/marionette_harness/tests/unit-tests.ini"
],
# We also need the manifests and harness_unit tests
"pattern": "testing/marionette/harness/marionette_harness/tests/**",
"dest": "marionette/tests",
},
{
"source": buildconfig.topobjdir,
"base": "_tests",
"pattern": "mozbase/**",
},
{"source": buildconfig.topobjdir, "base": "_tests", "pattern": "mozbase/**"},
{
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "firefox-ui/**",
"ignore": [
"firefox-ui/tests",
],
"ignore": ["firefox-ui/tests"],
},
{
"source": buildconfig.topsrcdir,
Expand All @@ -154,11 +134,7 @@
"pattern": "/**",
"dest": "telemetry/marionette",
},
{
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "tps/**",
},
{"source": buildconfig.topsrcdir, "base": "testing", "pattern": "tps/**"},
{
"source": buildconfig.topsrcdir,
"base": "services/sync/",
Expand All @@ -170,12 +146,6 @@
"pattern": "**",
"dest": "tps/tests",
},
{
"source": buildconfig.topsrcdir,
"base": "testing/web-platform/mozilla/tests/tools/wptserve_py2",
"pattern": "**",
"dest": "tools/wptserve_py2",
},
{
"source": buildconfig.topsrcdir,
"base": "testing/web-platform/tests/tools/wptserve",
Expand Down Expand Up @@ -206,11 +176,7 @@
"pattern": "**",
"dest": "tools/distro",
},
{
"source": buildconfig.topobjdir,
"base": "",
"pattern": "mozinfo.json",
},
{"source": buildconfig.topobjdir, "base": "", "pattern": "mozinfo.json"},
{
"source": buildconfig.topobjdir,
"base": "dist/bin",
Expand Down Expand Up @@ -238,18 +204,13 @@
{
"source": buildconfig.topobjdir,
"base": "dist/bin",
"patterns": [
"dmd.py",
"fix_stacks.py",
],
"patterns": ["dmd.py", "fix_stacks.py"],
"dest": "bin",
},
{
"source": buildconfig.topobjdir,
"base": "dist/bin/components",
"patterns": [
"httpd.js",
],
"patterns": ["httpd.js"],
"dest": "bin/components",
},
{
Expand All @@ -260,11 +221,7 @@
},
],
"cppunittest": [
{
"source": STAGE,
"base": "",
"pattern": "cppunittest/**",
},
{"source": STAGE, "base": "", "pattern": "cppunittest/**"},
# We don't ship these files if startup cache is disabled, which is
# rare. But it shouldn't matter for test archives.
{
Expand Down Expand Up @@ -298,25 +255,15 @@
"dest": "cppunittest",
},
],
"gtest": [
{
"source": STAGE,
"base": "",
"pattern": "gtest/**",
},
],
"gtest": [{"source": STAGE, "base": "", "pattern": "gtest/**"}],
"mochitest": [
OBJDIR_TEST_FILES["mochitest"],
{
"source": buildconfig.topobjdir,
"base": "_tests/testing",
"pattern": "mochitest/**",
},
{
"source": STAGE,
"base": "",
"pattern": "mochitest/**",
},
{"source": STAGE, "base": "", "pattern": "mochitest/**"},
{
"source": buildconfig.topobjdir,
"base": "",
Expand Down Expand Up @@ -379,11 +326,7 @@
},
],
"reftest": [
{
"source": buildconfig.topobjdir,
"base": "_tests",
"pattern": "reftest/**",
},
{"source": buildconfig.topobjdir, "base": "_tests", "pattern": "reftest/**"},
{
"source": buildconfig.topobjdir,
"base": "",
Expand Down Expand Up @@ -414,11 +357,7 @@
},
],
"talos": [
{
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "talos/**",
},
{"source": buildconfig.topsrcdir, "base": "testing", "pattern": "talos/**"},
{
"source": buildconfig.topsrcdir,
"base": "testing/profiles",
Expand All @@ -433,22 +372,10 @@
},
],
"perftests": [
{
"source": buildconfig.topsrcdir,
"pattern": "testing/mozbase/**",
},
{
"source": buildconfig.topsrcdir,
"pattern": "testing/condprofile/**",
},
{
"source": buildconfig.topsrcdir,
"pattern": "third_party/python/**",
},
{
"source": buildconfig.topsrcdir,
"pattern": "tools/lint/eslint/**",
},
{"source": buildconfig.topsrcdir, "pattern": "testing/mozbase/**"},
{"source": buildconfig.topsrcdir, "pattern": "testing/condprofile/**"},
{"source": buildconfig.topsrcdir, "pattern": "third_party/python/**"},
{"source": buildconfig.topsrcdir, "pattern": "tools/lint/eslint/**"},
{"source": buildconfig.topsrcdir, "pattern": "**/perftest_*.js"},
{"source": buildconfig.topsrcdir, "pattern": "**/hooks_*py"},
{"source": buildconfig.topsrcdir, "pattern": "build/autoconf/**"},
Expand Down Expand Up @@ -542,11 +469,7 @@
},
],
"raptor": [
{
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "raptor/**",
},
{"source": buildconfig.topsrcdir, "base": "testing", "pattern": "raptor/**"},
{
"source": buildconfig.topsrcdir,
"base": "testing/profiles",
Expand All @@ -561,11 +484,7 @@
},
],
"awsy": [
{
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "awsy/**",
},
{"source": buildconfig.topsrcdir, "base": "testing", "pattern": "awsy/**"}
],
"web-platform": [
{
Expand All @@ -582,9 +501,7 @@
"source": buildconfig.topsrcdir,
"base": "testing",
"pattern": "web-platform/tests/**",
"ignore": [
"web-platform/tests/tools/wpt_third_party",
],
"ignore": ["web-platform/tests/tools/wpt_third_party"],
},
{
"source": buildconfig.topobjdir,
Expand Down Expand Up @@ -618,11 +535,7 @@
],
"dest": "xpcshell",
},
{
"source": STAGE,
"base": "",
"pattern": "xpcshell/**",
},
{"source": STAGE, "base": "", "pattern": "xpcshell/**"},
{
"source": buildconfig.topobjdir,
"base": "",
Expand Down Expand Up @@ -669,18 +582,9 @@
"dest": "updater-dep",
},
],
"jsreftest": [
{
"source": STAGE,
"base": "",
"pattern": "jsreftest/**",
},
],
"jsreftest": [{"source": STAGE, "base": "", "pattern": "jsreftest/**"}],
"fuzztest": [
{
"source": buildconfig.topsrcdir,
"pattern": "tools/fuzzing/smoke/**",
},
{"source": buildconfig.topsrcdir, "pattern": "tools/fuzzing/smoke/**"}
],
"jittest": [
{
Expand Down Expand Up @@ -727,10 +631,7 @@
{
"source": buildconfig.topsrcdir,
"base": "python/mozbuild/",
"patterns": [
"mozpack/**",
"mozbuild/codecoverage/**",
],
"patterns": ["mozpack/**", "mozbuild/codecoverage/**"],
}
)

Expand Down Expand Up @@ -822,11 +723,7 @@ def find_files(archive):
if patterns:
entry["patterns"] = patterns
extra_entries.append(entry)
entry = {
"source": buildconfig.topobjdir,
"base": "_tests",
"patterns": [],
}
entry = {"source": buildconfig.topobjdir, "base": "_tests", "patterns": []}
for path in set(generated_harness_files) - packaged_paths:
entry["patterns"].append(path[len("_tests") + 1 :])
extra_entries.append(entry)
Expand All @@ -850,24 +747,15 @@ def find_files(archive):
patterns.extend({"{}/**".format(d) for d in dirs})

ignore = list(entry.get("ignore", []))
ignore.extend(
[
"**/.flake8",
"**/.mkdir.done",
"**/*.pyc",
]
)
ignore.extend(["**/.flake8", "**/.mkdir.done", "**/*.pyc"])

if archive not in ("common", "updater-dep") and base.startswith("_tests"):
# We may have generated_harness_files to exclude from this entry.
for path in generated_harness_files:
if path.startswith(base):
ignore.append(path[len(base) + 1 :])

common_kwargs = {
"find_dotfiles": True,
"ignore": ignore,
}
common_kwargs = {"find_dotfiles": True, "ignore": ignore}

finder = FileFinder(os.path.join(source, base), **common_kwargs)

Expand Down
3 changes: 1 addition & 2 deletions testing/config/marionette_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-r mozbase_requirements.txt

../tools/wptserve_py2 ; python_version < '3'
../tools/wptserve ; python_version >= '3'
../tools/wptserve
../tools/wpt_third_party/certifi
../tools/wpt_third_party/enum ; python_version < '3'
../tools/wpt_third_party/h2
Expand Down
3 changes: 1 addition & 2 deletions testing/config/marionette_source_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

-r mozbase_source_requirements.txt

../web-platform/tests/tools/wptserve ; python_version >= '3'
../web-platform/mozilla/tests/tools/wptserve_py2 ; python_version < '3'
../web-platform/tests/tools/wptserve
../web-platform/tests/tools/third_party/certifi
../web-platform/tests/tools/third_party/enum ; python_version < '3'
../web-platform/tests/tools/third_party/h2
Expand Down
1 change: 0 additions & 1 deletion tools/lint/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ black:
- python/mozbuild/mozbuild/fork_interpose.py
- python/mozbuild/mozbuild/test/frontend/data/reader-error-syntax/moz.build
- testing/mozharness/configs/test/test_malformed.py
- testing/web-platform/mozilla/tests/tools/wptserve_py2
- testing/web-platform/tests
extensions:
- build
Expand Down
1 change: 0 additions & 1 deletion tools/lint/file-whitespace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ file-whitespace:
- testing/web-platform/tests/tools/wptrunner/wptrunner/tests/test_update.py
- testing/web-platform/tests/tools/lint/tests/dummy/broken.html
- testing/web-platform/tests/tools/lint/tests/dummy/broken_ignored.html
- testing/web-platform/mozilla/tests/tools/wptserve_py2
- toolkit/components/telemetry/build_scripts/setup.py
- toolkit/components/telemetry/tests/marionette/mach_commands.py
- toolkit/content/tests/chrome
Expand Down

0 comments on commit 4e33fee

Please sign in to comment.