rust-lang / cargo-bisect-rustc

Bisects rustc, either nightlies or CI artifacts
https://rust-lang.github.io/cargo-bisect-rustc/
Apache License 2.0
174 stars 55 forks source link

Seems plain broken with scripts? #328

Closed workingjubilee closed 3 months ago

workingjubilee commented 3 months ago

I was trying to run the following script:

#!/bin/sh
# cargo clean
# cargo install --path cargo-pgrx --locked
result=$(cargo test -p pgrx-tests \
        --features "pg16" --no-default-features --lib \
        --tests "array" 2>&1 | rg -c 'FAIL')
if test -z $result; then
        echo "passed"
        exit 0
else
        echo "exiting failure"
        exit $result
fi

Yes, a rather lot of debugging attempts happened.

When I manually switched to the --start and --end rustc versions and ran the script, it would exit correctly on both ends of the regression I was testing for. When I used cargo bisect-rustc --script=that.sh it would fail.

workingjubilee commented 3 months ago

...No, wait, I think I realized what's going on. Some code isn't properly determining the target directory and is doing something overly clever instead. Sorry, one of those "open your mouth, realize what the problem was 5 minutes later" moments.