diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index ab24b92..013066d 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -159,8 +159,13 @@ jobs: # disambiguated declaration - which is where a stale tool shows up. - name: Test against the pinned release tool run: | + # A test proving a fix in the tool cannot pass against a release + # made before that fix. Skipping it is the honest reading of what + # this job asks: whether the released tool still works with these + # rules, not whether it has changes it predates. ./pleasew test -p -v notice \ -o plugin.rust.pleaserusttool://tools/please_rust:please_rust_release \ + --exclude requires_unreleased_tool \ //test/... //examples/... \ --log_file plz-out/log/pinned.log - name: Archive logs @@ -206,8 +211,11 @@ jobs: # pins, so its hash was taken on trust. - name: Test against the pinned release tool run: | + # See the note on the linux job: a test proving a fix in the tool + # cannot pass against a release made before that fix. ./pleasew test -p -v notice \ -o plugin.rust.pleaserusttool://tools/please_rust:please_rust_release \ + --exclude requires_unreleased_tool \ //test/... //examples/... \ --log_file plz-out/log/pinned.log - name: Archive logs diff --git a/BUILD b/BUILD index 1ac7393..03d72b7 100644 --- a/BUILD +++ b/BUILD @@ -24,6 +24,7 @@ rust_project( # of those resolves in the editor only if its lock is here too. lock = [ "//third_party/crates:rust_lock", + "//test/buildscript_env:buildscript_env_lock", "//test/firstparty:firstparty_lock", "//test/links:links_lock", "//test/patch:patch_lock", diff --git a/build_defs/rust.build_defs b/build_defs/rust.build_defs index 066e759..4b7f367 100644 --- a/build_defs/rust.build_defs +++ b/build_defs/rust.build_defs @@ -908,7 +908,7 @@ def rust_binary(name:str, main:str, modules:list=None, deps:list=[], cc_deps:lis return bin_rule -def rust_test(name:str, root:str, modules:list=None, deps:list=[], cc_deps:list=[], edition:str="2018", features:list=None, manifest:str=None, visibility:list=None): +def rust_test(name:str, root:str, modules:list=None, deps:list=[], cc_deps:list=[], edition:str="2018", features:list=None, manifest:str=None, labels:list=[], visibility:list=None): """Defines a test rule for a Rust library. Note that the Rust test runner has no ability to output in a format plz @@ -922,6 +922,10 @@ def rust_test(name:str, root:str, modules:list=None, deps:list=[], cc_deps:list= deps (list): Dependencies of the test harness. edition (str): Rust edition to compile with (2015, 2018, 2021, 2024). features (list): Feature cfgs to enable. + labels (list): Extra labels, on top of the `rust` one every rule + carries. Labels are how a run selects or skips tests, + so a test that only passes under some condition can say + so and be excluded with `plz test --exclude