Fix the WPT exporter (#30870)

* Fix the WPT exporter

* apply fixes by @mrobinson

* fix mach test-scripts on NixOS

* rename main_branch_name to default_branch
This commit is contained in:
Delan Azabani 2023-12-15 19:05:00 +08:00 committed by GitHub
parent 29eb4878ed
commit 0be30b30ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 11 deletions

View file

@ -644,17 +644,17 @@ def setUpModule():
suppress_force_push=True,
)
def setup_mock_repo(repo_name, local_repo):
def setup_mock_repo(repo_name, local_repo, default_branch: str):
subprocess.check_output(
["cp", "-R", "-p", os.path.join(TESTS_DIR, repo_name), local_repo.path])
local_repo.run("init", "-b", "main")
local_repo.run("init", "-b", default_branch)
local_repo.run("add", ".")
local_repo.run("commit", "-a", "-m", "Initial commit")
logging.info("=" * 80)
logging.info("Setting up mock repositories")
setup_mock_repo("servo-mock", SYNC.local_servo_repo)
setup_mock_repo("wpt-mock", SYNC.local_wpt_repo)
setup_mock_repo("servo-mock", SYNC.local_servo_repo, "main")
setup_mock_repo("wpt-mock", SYNC.local_wpt_repo, "master")
logging.info("=" * 80)