Skip to content

Commit d8874f7

Browse files
committed
Various bugfixes
1 parent 802b4cf commit d8874f7

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

becnh

+14-11
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ baseline() {
9090
smart_echo "Build" "rust-clippy:master"
9191
git switch master
9292
git pull origin master --rebase
93-
x build src/tools/clippy > /dev/null
93+
./x build src/tools/clippy > /dev/null
9494
smart_echo "Benchmark" "Benchmarking master!"
9595
cd ../rustc-perf || error "Couldn't enter rustc-perf"
96-
./target/release/collector bench_local ../rust/build/host/stage2/rustc --profiles Clippy --clippy ../rust/build/host/stage2/cargo-clippy --id "master-$(date +%Y-%m-%d)"
96+
./target/release/collector bench_local ../rust/build/host/stage2/bin/rustc --profiles Clippy --clippy ../rust/build/host/stage2/bin/cargo-clippy --id "master-$(date +%Y-%m-%d)"
9797
}
9898

9999
if [ -f "becnh" ]; then # We're in the same directory as the becnh script.
@@ -150,15 +150,18 @@ fi
150150
# Check if there's a Clippy PR
151151
cd rust-clippy || error "Couldn't enter rust-clippy"
152152

153-
if [ -n "$1" ] && [[ "$1" =~ ^\#?[0-9]+$ ]]; then
154-
# Make sure that there are both a PR ID and branch
155-
if [ $# -ne 2 ]; then
156-
display_help
153+
154+
if [ ! "$MASTER" ]; then
155+
if [ -n "$1" ] && [[ "$1" =~ ^\#?[0-9]+$ ]]; then
156+
# Make sure that there are both a PR ID and branch
157+
if [ $# -ne 2 ]; then
158+
display_help
159+
fi
160+
smart_echo "Cloning" "The Clippy PR ($1:$2)"
161+
git fetch origin pull/"$1"/head:"$2" || (echo "Something went wrong" && exit)
162+
else
163+
display_help
157164
fi
158-
smart_echo "Cloning" "The Clippy PR ($1:$2)"
159-
git fetch origin pull/"$1"/head:"$2" || (echo "Something went wrong" && exit)
160-
else
161-
display_help
162165
fi
163166

164167
# Move that Clippy submodule to the rust-lang/rust thingy
@@ -222,7 +225,7 @@ fi
222225

223226
smart_echo "Benchmark" "Starting benchmarks!"
224227
cd ../rustc-perf || error "Couldn't enter rustc-perf"
225-
./target/release/collector bench_local ../rust/build/host/stage2/rustc --profiles Clippy --clippy ../rust/build/host/stage2/cargo-clippy --id "PR-$1"
228+
./target/release/collector bench_local ../rust/build/host/stage2/bin/rustc --profiles Clippy --clippy ../rust/build/host/stage2/bin/cargo-clippy --id "PR-$1"
226229

227230
# =========================== Let's see about also benchmarking master
228231

0 commit comments

Comments
 (0)