diff --git a/scripts/cargo-cache-build.sh b/scripts/cargo-cache-build.sh index 8e49299a1..94bb3232f 100755 --- a/scripts/cargo-cache-build.sh +++ b/scripts/cargo-cache-build.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash set -euo pipefail +# A setup failure under set -e otherwise dies with no output at all; +# CI has eaten six silent exit-1s from this script in one day. Name +# the dying command instead of leaving a bare exit code. +trap 'echo "cargo-cache-build.sh: exit $? at line $LINENO: $BASH_COMMAND" >&2' ERR + # Shared Cargo build wrapper. # Keeps Rust/C/C++ artifacts in stable cache locations and opportunistically # enables compiler caches so whole-workspace builds warm up instead of starting diff --git a/scripts/tests/cargo-cache-build-tests.sh b/scripts/tests/cargo-cache-build-tests.sh index 6f123fb05..a07c8d71d 100755 --- a/scripts/tests/cargo-cache-build-tests.sh +++ b/scripts/tests/cargo-cache-build-tests.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail +# Failures under set -e in this suite die silently in CI otherwise; +# name the dying command and line. +trap 'echo "cargo-cache-build-tests.sh: exit $? at line $LINENO: $BASH_COMMAND" >&2' ERR + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" WRAPPER="$ROOT_DIR/scripts/cargo-cache-build.sh" diff --git a/scripts/tests/cargo-target-gc-tests.sh b/scripts/tests/cargo-target-gc-tests.sh index 2491b70e2..e17c512f2 100755 --- a/scripts/tests/cargo-target-gc-tests.sh +++ b/scripts/tests/cargo-target-gc-tests.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail +# Failures under set -e in this suite die silently in CI otherwise; +# name the dying command and line. +trap 'echo "cargo-target-gc-tests.sh: exit $? at line $LINENO: $BASH_COMMAND" >&2' ERR + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" GC="$ROOT_DIR/scripts/cargo-target-gc.sh"