Skip to content

Commit 52b1889

Browse files
authored
Make output quieter (#600)
1 parent e4c0cdf commit 52b1889

7 files changed

+10
-13
lines changed

.evergreen/auth_oidc/oidc_get_tokens.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Get the set of OIDC tokens in the OIDC_TOKEN_DIR.
44
#
5-
set -ex
5+
set -eu
66
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
77
. $SCRIPT_DIR/../handle-paths.sh
88

.evergreen/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ functions:
361361
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
362362
working_dir: "src"
363363
script: |
364-
set -ex
364+
set -eu
365365
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh
366366
test -f /tmp/tokens/test_user1
367367
test -f /tmp/tokens/test_user2
@@ -380,7 +380,7 @@ functions:
380380
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
381381
working_dir: "src"
382382
script: |
383-
set -ex
383+
set -eu
384384
cd ${DRIVERS_TOOLS}/.evergreen/auth_oidc
385385
ENTRYPOINT=/root/docker_entry_base.sh bash start_local_server.sh
386386
test -f /tmp/tokens/test_user1

.evergreen/csfle/stop-servers.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/usr/bin/env bash
22

33
# Clean up CSFLE kmip servers
4-
set -ex
4+
set -eu
55

66
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
77
. $SCRIPT_DIR/../handle-paths.sh
88
pushd $SCRIPT_DIR
99
rm -f pykmip.db
1010
if [ -f "kmip_pids.pid" ]; then
1111
while read p; do
12-
kill -9 "$p" || true
12+
kill -9 "$p" 2> /dev/null || true
1313
done <kmip_pids.pid
1414
rm kmip_pids.pid
1515
fi

.evergreen/download-mongodb.sh

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ download_and_extract_package ()
100100
$EXTRACT mongodb-binaries.tgz
101101
echo "Installing server binaries... done."
102102

103-
set -x
104103
rm -f mongodb-binaries.tgz
105104
mv mongodb* mongodb
106105
chmod -R +x mongodb

.evergreen/k8s/configure-pod.sh

-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ echo "Waiting for pod to be ready... done."
3434

3535
# Run the setup script and ensure git was installed.
3636
echo "Configuring pod $POD_NAME..."
37-
set -x
3837
# Account for initial error in connecting to pod.
3938
TIMEOUT=5 ../retry-with-backoff.sh kubectl cp ./remote-scripts/setup-pod.sh ${POD_NAME}:/tmp/setup-pod.sh
4039
kubectl exec ${POD_NAME} -- /tmp/setup-pod.sh
4140
kubectl exec ${POD_NAME} -- git --version
42-
set +x
4341
echo "Configuring pod $POD_NAME... done."
4442

4543
popd

.evergreen/process-utils.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ killport() {
2626
if [[ "${OSTYPE:?}" == cygwin || "${OSTYPE:?}" == msys ]]; then
2727
for pid in $(netstat -ano | grep ":$port .* LISTENING" | awk '{print $5}' | tr -d '[:space:]'); do
2828
echo "Killing pid $pid for port $port using taskkill" 1>&2
29-
taskkill /F /T /PID "$pid" || true
29+
taskkill /F /T /PID "$pid" 2>/dev/null || true
3030
done
3131
elif [ -x "$(command -v lsof)" ]; then
3232
for pid in $(lsof -t "-i:$port" || true); do
3333
echo "Killing pid $pid for port $port using kill" 1>&2
34-
kill -SIGKILL "$pid" || true
34+
kill -SIGKILL "$pid" 2>/dev/null|| true
3535
done
3636
elif [ -x "$(command -v fuser)" ]; then
3737
echo "Killing process using port $port using fuser" 1>&2
3838
fuser --kill "$port/tcp" || true
3939
elif [ -x "$(command -v ss)" ]; then
4040
for pid in $(ss -tlnp "sport = :$port" | awk 'NR>1 {split($7,a,","); print a[1]}' | tr -d '[:space:]'); do
4141
echo "Killing pid $pid for port $port using kill" 1>&2
42-
kill -SIGKILL "$pid" || true
42+
kill -SIGKILL "$pid" 2>/dev/null || true
4343
done
4444
else
4545
echo "Unable to identify the OS (${OSTYPE:?}) or find necessary utilities (fuser/lsof/ss) to kill the process."

.evergreen/run-orchestration.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# shellcheck shell=sh
3-
set -o errexit # Exit the script with error if any of the commands fail
4-
set -x
3+
set -eu
4+
55
# See https://stackoverflow.com/questions/35006457/choosing-between-0-and-bash-source/35006505#35006505
66
# Why we need this syntax when sh is not aliased to bash (this script must be able to be called from sh)
77
# shellcheck disable=SC3028

0 commit comments

Comments
 (0)