|
2 | 2 |
|
3 | 3 | set -eu
|
4 | 4 |
|
5 |
| - |
6 |
| -# Enable core dumps if enabled on the machine |
7 |
| -# Copied from https://github.com/mongodb/mongo/blob/master/etc/evergreen.yml |
8 |
| -if [ -f /proc/self/coredump_filter ]; then |
9 |
| - # Set the shell process (and its children processes) to dump ELF headers (bit 4), |
10 |
| - # anonymous shared mappings (bit 1), and anonymous private mappings (bit 0). |
11 |
| - echo 0x13 >/proc/self/coredump_filter |
12 |
| - |
13 |
| - if [ -f /sbin/sysctl ]; then |
14 |
| - # Check that the core pattern is set explicitly on our distro image instead |
15 |
| - # of being the OS's default value. This ensures that coredump names are consistent |
16 |
| - # across distros and can be picked up by Evergreen. |
17 |
| - core_pattern=$(/sbin/sysctl -n "kernel.core_pattern") |
18 |
| - if [ "$core_pattern" = "dump_%e.%p.core" ]; then |
19 |
| - echo "Enabling coredumps" |
20 |
| - ulimit -c unlimited |
21 |
| - fi |
22 |
| - fi |
23 |
| -fi |
24 |
| - |
25 |
| -if [ "$(uname -s)" = "Darwin" ]; then |
26 |
| - core_pattern_mac=$(/usr/sbin/sysctl -n "kern.corefile") |
27 |
| - if [ "$core_pattern_mac" = "dump_%N.%P.core" ]; then |
28 |
| - echo "Enabling coredumps" |
29 |
| - ulimit -c unlimited |
30 |
| - fi |
31 |
| -fi |
| 5 | +HERE=$(dirname ${BASH_SOURCE:-$0}) |
| 6 | +HERE="$( cd -- "$HERE" > /dev/null 2>&1 && pwd )" |
| 7 | +ROOT=$(dirname "$(dirname $HERE)") |
32 | 8 |
|
33 | 9 | if [ -z "${TEST_CRYPT_SHARED:-}" ]; then
|
34 | 10 | export SKIP_CRYPT_SHARED=1
|
35 | 11 | fi
|
36 | 12 |
|
| 13 | +# Override the tls files if applicable. |
| 14 | +if [ "${SSL:-}" == "ssl" ]; then |
| 15 | + export TLS_CERT_KEY_FILE=${ROOT}/test/certificates/client.pem |
| 16 | + export TLS_PEM_KEY_FILE=${ROOT}/test/certificates/server.pem |
| 17 | + export TLS_CA_FILE=${ROOT}/test/certificates/ca.pem |
| 18 | +fi |
| 19 | + |
37 | 20 | MONGODB_VERSION=${VERSION:-} \
|
38 | 21 | TOPOLOGY=${TOPOLOGY:-} \
|
39 | 22 | AUTH=${AUTH:-} \
|
|
0 commit comments