From bcebd39e47ef9fd63b16525ff0fe4ad4b8f488e6 Mon Sep 17 00:00:00 2001 From: Mara Robin B Date: Wed, 20 Apr 2022 09:04:46 +0200 Subject: [PATCH] [ci] benchmarks: suppress wrong exit code (#5344) * [ci] benchmarks: suppress wrong exit code The script uses '!' to prevent set -e failures, however a $? of `0` becomes exit code 1 if it is the last command ran. This `true` makes sure that $? is 0 when we reach the end, instead of carrying over a failure which would otherwise cause the whole CI job to abort. * add explanation comment --- polkadot/scripts/run_benches_for_runtime.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/polkadot/scripts/run_benches_for_runtime.sh b/polkadot/scripts/run_benches_for_runtime.sh index fee04f846a..b0aa3ed876 100755 --- a/polkadot/scripts/run_benches_for_runtime.sh +++ b/polkadot/scripts/run_benches_for_runtime.sh @@ -46,3 +46,9 @@ rm "${runtime}_pallets" --weight-path="runtime/${runtime}/constants/src/weights/" \ --warmup=10 \ --repeat=100 + + +# This true makes sure that $? is 0 instead of +# carrying over a failure which would otherwise cause +# the whole CI job to abort. +true