diff options
| author | bors <bors@rust-lang.org> | 2023-03-02 14:04:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-02 14:04:22 +0000 |
| commit | 7e966bcd03f6d0fae41f58cf80bcb10566ab971a (patch) | |
| tree | e506c2d96410294010e4767e40b397f55460b540 /src/ci/docker/scripts | |
| parent | 18caf88956ecf454e24307e598b8ac9967f10b07 (diff) | |
| parent | 832987bb1e0691b44a057414d57d23c64e6c7d97 (diff) | |
| download | rust-7e966bcd03f6d0fae41f58cf80bcb10566ab971a.tar.gz rust-7e966bcd03f6d0fae41f58cf80bcb10566ab971a.zip | |
Auto merge of #108640 - matthiaskrgr:rollup-rii4t5t, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #108516 (Restrict `#[rustc_box]` to `Box::new` calls) - #108575 (Erase **all** regions when probing for associated types on ambiguity in astconv) - #108585 (Run compiler test suite in parallel on Fuchsia) - #108606 (Add test case for mismatched open/close delims) - #108609 (Highlight whole expression for E0599) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/ci/docker/scripts')
| -rwxr-xr-x | src/ci/docker/scripts/fuchsia-test-runner.py | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/ci/docker/scripts/fuchsia-test-runner.py b/src/ci/docker/scripts/fuchsia-test-runner.py index c3d532c4b27..e7d1d9781d5 100755 --- a/src/ci/docker/scripts/fuchsia-test-runner.py +++ b/src/ci/docker/scripts/fuchsia-test-runner.py @@ -9,6 +9,7 @@ https://doc.rust-lang.org/stable/rustc/platform-support/fuchsia.html#aarch64-unk import argparse from dataclasses import dataclass +import fcntl import glob import hashlib import json @@ -146,6 +147,9 @@ class TestEnvironment: def zxdb_script_path(self): return os.path.join(self.tmp_dir(), "zxdb_script") + def pm_lockfile_path(self): + return os.path.join(self.tmp_dir(), "pm.lock") + def log_info(self, msg): print(msg) @@ -460,6 +464,9 @@ class TestEnvironment: stderr=self.subprocess_output(), ) + # Create lockfiles + open(self.pm_lockfile_path(), 'a').close() + # Write to file self.write_to_file() @@ -676,19 +683,25 @@ class TestEnvironment: log("Publishing package to repo...") # Publish package to repo - subprocess.check_call( - [ - self.tool_path("pm"), - "publish", - "-a", - "-repo", - self.repo_dir(), - "-f", - far_path, - ], - stdout=log_file, - stderr=log_file, - ) + with open(self.pm_lockfile_path(), 'w') as pm_lockfile: + fcntl.lockf(pm_lockfile.fileno(), fcntl.LOCK_EX) + subprocess.check_call( + [ + self.tool_path("pm"), + "publish", + "-a", + "-repo", + self.repo_dir(), + "-f", + far_path, + ], + stdout=log_file, + stderr=log_file, + ) + # This lock should be released automatically when the pm + # lockfile is closed, but we'll be polite and unlock it now + # since the spec leaves some wiggle room. + fcntl.lockf(pm_lockfile.fileno(), fcntl.LOCK_UN) log("Running ffx test...") |
