Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 16677f9

Browse files
committed
CI: Make script.sh less spammy when run locally
1 parent 5e1c2bb commit 16677f9

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

ci/script.sh

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,30 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7+
travis_cmd_prelude() {
8+
if [[ -n "$TRAVIS" ]]; then
9+
echo "travis_fold:start:_"
10+
fi
11+
}
12+
13+
travis_cmd_postlude() {
14+
declare elapsed_seconds=$1
15+
if [[ -n "$TRAVIS" ]]; then
16+
echo "travis_fold:end:_"
17+
# TODO: Use "travis_time" annotations instead of this fold hack:
18+
echo "travis_fold:start:${elapsed_seconds}s"
19+
echo "travis_fold:end:${elapsed_seconds}s"
20+
fi
21+
}
22+
723
_() {
8-
echo "travis_fold:start:_"
24+
travis_cmd_prelude
925
SECONDS=
1026
(
1127
set -x
1228
"$@"
1329
) || exit 1
14-
echo "travis_fold:end:_"
15-
declare elapsed_seconds=$SECONDS
16-
17-
# TODO: Use "travis_time" annotations instead of this fold hack:
18-
echo "travis_fold:start:${elapsed_seconds}s"
19-
echo "travis_fold:end:${elapsed_seconds}s"
30+
travis_cmd_postlude $SECONDS
2031
}
2132

2233
export RUSTFLAGS="-D warnings"
@@ -55,7 +66,7 @@ for Xargo_toml in $(git ls-files -- '*/Xargo.toml'); do
5566
done
5667

5768
# Run SPL Token's performance monitor
58-
cargo test --manifest-path=token/perf-monitor/Cargo.toml -- --nocapture
69+
_ cargo test --manifest-path=token/perf-monitor/Cargo.toml -- --nocapture
5970

6071

6172
# Test token js bindings

0 commit comments

Comments
 (0)