Skip to content

Commit

Permalink
Merge #1447
Browse files Browse the repository at this point in the history
1447: ci: remove unnecessary cleanup on exit after error r=tiagolobocastro a=tiagolobocastro



Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Jul 19, 2023
2 parents df4a5fb + 663facd commit fac39b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions scripts/cargo-test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/usr/bin/env bash

SCRIPTDIR=$(dirname "$0")
SCRIPTDIR="$(realpath "$(dirname "$0")")"

cleanup_handler() {
$SCRIPTDIR/clean-cargo-tests.sh || true
ERROR=$?
"$SCRIPTDIR"/clean-cargo-tests.sh || true
if [ $ERROR != 0 ]; then exit $ERROR; fi
}

trap cleanup_handler ERR INT QUIT TERM HUP EXIT

echo "running cargo-test..."
echo "rustc version:"
rustc --version

cleanup_handler
trap cleanup_handler INT QUIT TERM HUP EXIT

set -euxo pipefail
export PATH=$PATH:${HOME}/.cargo/bin
Expand Down
12 changes: 7 additions & 5 deletions scripts/grpc-test.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#!/usr/bin/env bash

SCRIPTDIR=$(dirname "$0")
trap cleanup_handler ERR INT QUIT TERM HUP EXIT
SCRIPTDIR="$(realpath "$(dirname "$0")")"

cleanup_handler() {
$SCRIPTDIR/clean-cargo-tests.sh || true
ERROR=$?
"$SCRIPTDIR"/clean-cargo-tests.sh || true
if [ $ERROR != 0 ]; then exit $ERROR; fi
}

cleanup_handler
trap cleanup_handler INT QUIT TERM HUP EXIT

set -euxo pipefail

export PATH="$PATH:${HOME}/.cargo/bin"
export npm_config_jobs=$(nproc)

cleanup_handler

cargo build --all
cd "$(dirname "$0")/../test/grpc"
npm install --legacy-peer-deps
Expand Down

0 comments on commit fac39b1

Please sign in to comment.