Skip to content

Commit 320443c

Browse files
author
Benjamin Rewis
committed
CXX-2211 Remove usages of xtrace in shell scripts
1 parent 9e6e351 commit 320443c

File tree

20 files changed

+6
-43
lines changed

20 files changed

+6
-43
lines changed

.evergreen/build_example_projects.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
set -o errexit
33
set -o pipefail
4-
set -o xtrace
54

65
if [ "$USE_STATIC_LIBS" ]; then
76
DIR=static

.evergreen/compile.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# behavior of this script:
99
# - BUILD_TYPE: must be set to "Release" or "Debug"
1010

11-
set -o xtrace
1211
set -o errexit
1312
set -o pipefail
1413

.evergreen/debian_package_build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Supported/used environment variables:
77
# IS_PATCH If "true", this is an Evergreen patch build.
88

9-
set -o xtrace
109
set -o errexit
1110

1211
on_exit () {
@@ -51,8 +50,8 @@ git clone https://salsa.debian.org/installer-team/debootstrap.git debootstrap.gi
5150
export DEBOOTSTRAP_DIR=`pwd`/debootstrap.git
5251
sudo -E ./debootstrap.git/debootstrap unstable ./unstable-chroot/ http://cdn-aws.deb.debian.org/debian
5352
cp -a mongo-cxx-driver ./unstable-chroot/tmp/
54-
sudo DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" chroot ./unstable-chroot /bin/bash -c "(set -o xtrace && \
55-
apt-get install -y build-essential git-buildpackage fakeroot debhelper cmake curl ca-certificates libboost-dev libsasl2-dev libicu-dev doxygen ${MNMLSTC_DEPS} && \
53+
sudo DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" chroot ./unstable-chroot /bin/bash -c "
54+
(apt-get install -y build-essential git-buildpackage fakeroot debhelper cmake curl ca-certificates libboost-dev libsasl2-dev libicu-dev doxygen ${MNMLSTC_DEPS} && \
5655
mkdir /tmp/mongo-c-driver && \
5756
curl -o deb.tar.gz -L https://s3.amazonaws.com/mciuploads/mongo-c-driver/master/mongo-c-driver-debian-packages-latest.tar.gz && \
5857
tar zxvf deb.tar.gz && \

.evergreen/find_cmake.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
2-
set -o xtrace # Write all commands first to stderr
32
set -o errexit # Exit the script with error if any of the commands fail
43

54
find_cmake ()

.evergreen/install_c_driver.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# PREFIX=/tmp/installdir ./install.sh 1.3.5
66

77
set -o errexit
8-
set -o xtrace
98
set -o pipefail
109

1110
usage() {

.evergreen/uninstall_check.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
2-
set -o xtrace # Write all commands first to stderr
32
set -o errexit # Exit the script with error if any of the commands fail
43

54
BUILD_DIR=$(pwd)/build
@@ -15,8 +14,6 @@ $CMAKE --build $BUILD_DIR --target uninstall
1514

1615
ls -lR $INSTALL_DIR
1716

18-
set +o xtrace
19-
2017
if test -f $INSTALL_DIR/lib/pkgconfig/libbsoncxx.pc; then
2118
echo "libbsoncxx.pc found!"
2219
exit 1

.mci.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ functions:
8383
shell: bash
8484
script: |
8585
set -o errexit
86-
set -o xtrace
8786
set -o pipefail
8887
rm -rf "mongo-cxx-driver"
8988
rm -fr "mongo-c-driver"
@@ -98,7 +97,6 @@ functions:
9897
working_dir: "."
9998
script: |
10099
set -o errexit
101-
set -o xtrace
102100
set -o pipefail
103101
cc --version || true
104102
c++ --version || true
@@ -114,7 +112,6 @@ functions:
114112
working_dir: "."
115113
script: |
116114
set -o errexit
117-
set -o xtrace
118115
set -o pipefail
119116
if [ ! -d "drivers-evergreen-tools" ]; then
120117
git clone git@github.com:mongodb-labs/drivers-evergreen-tools.git
@@ -129,7 +126,7 @@ functions:
129126
export MONGODB_VERSION=${mongodb_version}
130127
export AUTH=${AUTH}
131128
export TOPOLOGY=${TOPOLOGY|server}
132-
129+
133130
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
134131
./.evergreen/run-orchestration.sh
135132
@@ -149,7 +146,6 @@ functions:
149146
working_dir: "."
150147
script: |
151148
set -o errexit
152-
set -o xtrace
153149
set -o pipefail
154150
cd drivers-evergreen-tools/.evergreen/orchestration
155151
if [ -f venv/bin/activate ]; then
@@ -166,7 +162,6 @@ functions:
166162
working_dir: "mongo-cxx-driver"
167163
script: |
168164
set -o errexit
169-
set -o xtrace
170165
set -o pipefail
171166
export PREFIX=$(pwd)/../mongoc/
172167
if [ "Windows_NT" == "$OS" ]; then
@@ -182,7 +177,6 @@ functions:
182177
working_dir: "mongo-cxx-driver"
183178
script: |
184179
set -o errexit
185-
set -o xtrace
186180
set -o pipefail
187181
python etc/clang_format.py lint
188182
@@ -193,7 +187,6 @@ functions:
193187
working_dir: "mongo-cxx-driver"
194188
script: |
195189
set -o errexit
196-
set -o xtrace
197190
set -o pipefail
198191
export BUILD_TYPE=${build_type}
199192
export PATH="${extra_path}:$PATH"
@@ -234,7 +227,6 @@ functions:
234227
working_dir: "mongo-cxx-driver"
235228
script: |
236229
set -o errexit
237-
set -o xtrace
238230
set -o pipefail
239231
240232
# Grabs the mongocryptd path
@@ -244,7 +236,7 @@ functions:
244236
export MONGOCRYPTD_PATH=$(cygpath -m $MONGOCRYPTD_PATH)
245237
fi
246238
cd mongo-cxx-driver
247-
239+
248240
export PATH="${extra_path}:$PATH"
249241
250242
cd build
@@ -270,13 +262,11 @@ functions:
270262
export RETRYABLE_READS_TESTS_PATH="$(pwd)/../data/retryable-reads"
271263
export READ_WRITE_CONCERN_OPERATION_TESTS_PATH="$(pwd)/../data/read-write-concern/operation"
272264
273-
# export environment variables for encryption tests (and redact them)
274-
set +o xtrace
265+
# export environment variables for encryption tests
275266
set +o errexit
276267
export MONGOCXX_TEST_AWS_SECRET_ACCESS_KEY="${cse_aws_secret_access_key}"
277268
export MONGOCXX_TEST_AWS_ACCESS_KEY_ID="${cse_aws_access_key_id}"
278269
set -o errexit
279-
set -o xtrace
280270
281271
if [ "Windows_NT" == "$OS" ]; then
282272
CRUD_TESTS_PATH=$(cygpath -m $CRUD_TESTS_PATH)
@@ -289,7 +279,7 @@ functions:
289279
if [ -z "${disable_slow_tests}" ]; then
290280
export MONGOCXX_ENABLE_SLOW_TESTS=1
291281
fi
292-
282+
293283
ulimit -c unlimited || true
294284
295285
# Run tests and examples 1-by-1 with "test_params" so we can run them with valgrind.
@@ -358,7 +348,6 @@ functions:
358348
working_dir: "mongo-cxx-driver"
359349
script: |
360350
set -o errexit
361-
set -o xtrace
362351
set -o pipefail
363352
export PATH="${extra_path}:$PATH"
364353
cd build
@@ -511,7 +500,6 @@ tasks:
511500
working_dir: "mongo-cxx-driver"
512501
script: |-
513502
set -o errexit
514-
set -o xtrace
515503
export INSTALL_VERSION=${mongocxx_version_finder_sh}
516504
sh ./.evergreen/uninstall_check.sh
517505
@@ -532,7 +520,6 @@ tasks:
532520
working_dir: "mongo-cxx-driver"
533521
script: |-
534522
set -o errexit
535-
set -o xtrace
536523
export INSTALL_VERSION=${mongocxx_version_finder_sh}
537524
cmd.exe /c .\\.evergreen\\uninstall_check_windows.cmd
538525
@@ -546,7 +533,6 @@ tasks:
546533
shell: bash
547534
script: |-
548535
set -o errexit
549-
set -o xtrace
550536
export IS_PATCH="${is_patch}"
551537
sh .evergreen/debian_package_build.sh
552538
- command: s3.put
@@ -570,7 +556,6 @@ tasks:
570556
shell: bash
571557
script: |-
572558
set -o errexit
573-
set -o xtrace
574559
export IS_PATCH="${is_patch}"
575560
export DEB_BUILD_PROFILES="pkg.mongo-cxx-driver.mnmlstc"
576561
sh .evergreen/debian_package_build.sh

etc/debug-core-evergreen.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
set -o xtrace
4-
53
if ! which gdb > /dev/null; then
64
echo "gdb not found. Will not search for core files"
75
exit 0

examples/projects/bsoncxx/cmake-deprecated/shared/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
set -o errexit
33
set -o pipefail
4-
set -o xtrace
54

65
BUILD_TYPE=${BUILD_TYPE:-Release}
76
CXX_STANDARD=${CXX_STANDARD:-11}

examples/projects/bsoncxx/cmake-deprecated/static/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
set -o errexit
33
set -o pipefail
4-
set -o xtrace
54

65
BUILD_TYPE=${BUILD_TYPE:-Release}
76
CXX_STANDARD=${CXX_STANDARD:-11}

0 commit comments

Comments
 (0)