aboutsummaryrefslogtreecommitdiffstats
path: root/python/wpt/exporter/common.py
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-04-16 11:33:02 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-04-20 12:24:55 +0200
commite2cf3e8d1a47ae91b53c2edc20ed605731eb5979 (patch)
treeb7b11a8ff3493a204c9c99cfe27f78e4389b7ce5 /python/wpt/exporter/common.py
parent9acb9cc5cf21d14709355a3c75af7202e9301bd5 (diff)
downloadservo-e2cf3e8d1a47ae91b53c2edc20ed605731eb5979.tar.gz
servo-e2cf3e8d1a47ae91b53c2edc20ed605731eb5979.zip
Reorganize Servo's WPT Python scripts
This change moves all of Servo's WPT Python support scripts into one directory as they were previously scattered throughout the directory structure. This should allow more code reuse and make it easier to understand how everything fits together. The changes: - `tests/wpt/update` → `python/wpt/importer` - `etc/ci/upstream-wpt-changes/wptupstreamer` → `python/wpt/exporter` - `etc/ci/upstream-wpt-changes/test.py` → `python/wpt/test.py` - `etc/ci/upstream-wpt-changes/tests` → `python/wpt/tests` - `tests/wpt/servowpt.py` → - `python/wpt/update.py` - `python/wpt/run.py` - `tests/wpt/manifestupdate.py` → `python/wpt/manifestupdate.py` This change also removes - The ability to run the `update-wpt` and `test-wpt` commands without using `mach`. These didn't work very well, because it was difficult to get all of the wptrunner and mach dependencies installed outside of the Python virtualenv. It's simpler if they are always run through `mach`. - The old WPT change upstreaming script that was no longer used.
Diffstat (limited to 'python/wpt/exporter/common.py')
-rw-r--r--python/wpt/exporter/common.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/python/wpt/exporter/common.py b/python/wpt/exporter/common.py
new file mode 100644
index 00000000000..307edce0276
--- /dev/null
+++ b/python/wpt/exporter/common.py
@@ -0,0 +1,53 @@
+# Copyright 2023 The Servo Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+# pylint: disable=missing-docstring
+
+UPSTREAMABLE_PATH = "tests/wpt/web-platform-tests/"
+NO_SYNC_SIGNAL = "[no-wpt-sync]"
+
+OPENED_NEW_UPSTREAM_PR = (
+ "🤖 Opened new upstream WPT pull request ({upstream_pr}) "
+ "with upstreamable changes."
+)
+UPDATED_EXISTING_UPSTREAM_PR = (
+ "📝 Transplanted new upstreamable changes to existing "
+ "upstream WPT pull request ({upstream_pr})."
+)
+UPDATED_TITLE_IN_EXISTING_UPSTREAM_PR = (
+ "✍ Updated existing upstream WPT pull request ({upstream_pr}) title and body."
+)
+CLOSING_EXISTING_UPSTREAM_PR = (
+ "🤖 This change no longer contains upstreamable changes to WPT; closed existing "
+ "upstream pull request ({upstream_pr})."
+)
+NO_UPSTREAMBLE_CHANGES_COMMENT = (
+ "👋 Downstream pull request ({servo_pr}) no longer contains any upstreamable "
+ "changes. Closing pull request without merging."
+)
+COULD_NOT_APPLY_CHANGES_DOWNSTREAM_COMMENT = (
+ "🛠 These changes could not be applied onto the latest upstream WPT. "
+ "Servo's copy of the Web Platform Tests may be out of sync."
+)
+COULD_NOT_APPLY_CHANGES_UPSTREAM_COMMENT = (
+ "🛠 Changes from the source pull request ({servo_pr}) can no longer be "
+ "cleanly applied. Waiting for a new version of these changes downstream."
+)
+COULD_NOT_MERGE_CHANGES_DOWNSTREAM_COMMENT = (
+ "⛔ Failed to properly merge the upstream pull request ({upstream_pr}). "
+ "Please address any CI issues and try to merge manually."
+)
+COULD_NOT_MERGE_CHANGES_UPSTREAM_COMMENT = (
+ "⛔ The downstream PR has merged ({servo_pr}), but these changes could not "
+ "be merged properly. Please address any CI issues and try to merge manually."
+)
+
+
+def wpt_branch_name_from_servo_pr_number(servo_pr_number):
+ return f"servo_export_{servo_pr_number}"