Skip to content

Commit b240a6c

Browse files
authored
CXX-3273 revert to using system-installed valgrind (#1400)
1 parent dbc9469 commit b240a6c

File tree

6 files changed

+1
-145
lines changed

6 files changed

+1
-145
lines changed

.evergreen/config_generator/components/funcs/install_valgrind.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

.evergreen/config_generator/components/valgrind.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from config_generator.components.funcs.compile import Compile
22
from config_generator.components.funcs.fetch_det import FetchDET
33
from config_generator.components.funcs.install_c_driver import InstallCDriver
4-
from config_generator.components.funcs.install_valgrind import InstallValgrind
54
from config_generator.components.funcs.install_uv import InstallUV
65
from config_generator.components.funcs.run_kms_servers import RunKMSServers
76
from config_generator.components.funcs.setup import Setup
@@ -68,7 +67,6 @@ def tasks():
6867

6968
commands += [
7069
Setup.call(),
71-
InstallValgrind.call(),
7270
StartMongod.call(mongodb_version=mongodb_version, topology=topology),
7371
InstallCDriver.call(vars=icd_vars),
7472
InstallUV.call(),

.evergreen/generated_configs/functions.yml

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -418,70 +418,6 @@ functions:
418418
type: setup
419419
params:
420420
file: expansions.uv.yml
421-
install-valgrind:
422-
- command: subprocess.exec
423-
type: setup
424-
params:
425-
binary: bash
426-
args:
427-
- -c
428-
- |
429-
if [[ -n "$XDG_CACHE_DIR" ]]; then
430-
cache_dir="$XDG_CACHE_DIR" # XDG Base Directory specification.
431-
elif [[ -n "$LOCALAPPDATA" ]]; then
432-
cache_dir="$LOCALAPPDATA" # Windows.
433-
elif [[ -n "$USERPROFILE" ]]; then
434-
cache_dir="$USERPROFILE/.cache" # Windows (fallback).
435-
elif [[ -d "$HOME/Library/Caches" ]]; then
436-
cache_dir="$HOME/Library/Caches" # MacOS.
437-
elif [[ -n "$HOME" ]]; then
438-
cache_dir="$HOME/.cache" # Linux-like.
439-
elif [[ -d ~/.cache ]]; then
440-
cache_dir="~/.cache" # Linux-like (fallback).
441-
else
442-
cache_dir="$(pwd)/.cache" # EVG task directory (fallback).
443-
fi
444-
445-
mkdir -p "$cache_dir/mongo-cxx-driver" || exit
446-
cache_dir="$(cd "$cache_dir/mongo-cxx-driver" && pwd)" || exit
447-
448-
printf "MONGO_CXX_DRIVER_CACHE_DIR: %s\n" "$cache_dir" >|expansions.set-cache-dir.yml
449-
- command: expansions.update
450-
type: setup
451-
params:
452-
file: expansions.set-cache-dir.yml
453-
- command: subprocess.exec
454-
type: setup
455-
params:
456-
binary: bash
457-
args:
458-
- -c
459-
- |
460-
set -o errexit
461-
set -o pipefail
462-
463-
if [[ ! -n "${MONGO_CXX_DRIVER_CACHE_DIR}" ]]; then
464-
echo "MONGO_CXX_DRIVER_CACHE_DIR is not defined!" 1>&2
465-
exit 1
466-
fi
467-
468-
valgrind_install_dir="${MONGO_CXX_DRIVER_CACHE_DIR}/valgrind-3.24.0"
469-
mkdir -p "$valgrind_install_dir"
470-
471-
if ! command -v "$valgrind_install_dir/bin/valgrind" 2>/dev/null; then
472-
env \
473-
install_prefix="${MONGO_CXX_DRIVER_CACHE_DIR}/valgrind-3.24.0" \
474-
mongo-cxx-driver/.evergreen/scripts/valgrind-installer.sh
475-
fi
476-
477-
PATH="$valgrind_install_dir/bin:$PATH" command -V valgrind
478-
PATH="$valgrind_install_dir/bin:$PATH" valgrind --version
479-
480-
printf "VALGRIND_INSTALL_DIR: %s\n" "$valgrind_install_dir/bin" >|expansions.valgrind.yml
481-
- command: expansions.update
482-
type: setup
483-
params:
484-
file: expansions.valgrind.yml
485421
install_c_driver:
486422
- command: expansions.update
487423
type: setup

.evergreen/generated_configs/tasks.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15715,7 +15715,6 @@ tasks:
1571515715
updates:
1571615716
- { key: build_type, value: Debug }
1571715717
- func: setup
15718-
- func: install-valgrind
1571915718
- func: start_mongod
1572015719
vars:
1572115720
TOPOLOGY: replica_set
@@ -15745,7 +15744,6 @@ tasks:
1574515744
updates:
1574615745
- { key: build_type, value: Debug }
1574715746
- func: setup
15748-
- func: install-valgrind
1574915747
- func: start_mongod
1575015748
vars:
1575115749
TOPOLOGY: sharded_cluster
@@ -15775,7 +15773,6 @@ tasks:
1577515773
updates:
1577615774
- { key: build_type, value: Debug }
1577715775
- func: setup
15778-
- func: install-valgrind
1577915776
- func: start_mongod
1578015777
vars:
1578115778
mongodb_version: "4.0"
@@ -15804,7 +15801,6 @@ tasks:
1580415801
updates:
1580515802
- { key: build_type, value: Debug }
1580615803
- func: setup
15807-
- func: install-valgrind
1580815804
- func: start_mongod
1580915805
vars:
1581015806
TOPOLOGY: replica_set
@@ -15834,7 +15830,6 @@ tasks:
1583415830
updates:
1583515831
- { key: build_type, value: Debug }
1583615832
- func: setup
15837-
- func: install-valgrind
1583815833
- func: start_mongod
1583915834
vars:
1584015835
TOPOLOGY: sharded_cluster
@@ -15864,7 +15859,6 @@ tasks:
1586415859
updates:
1586515860
- { key: build_type, value: Debug }
1586615861
- func: setup
15867-
- func: install-valgrind
1586815862
- func: start_mongod
1586915863
vars:
1587015864
mongodb_version: "8.0"
@@ -15893,7 +15887,6 @@ tasks:
1589315887
updates:
1589415888
- { key: build_type, value: Debug }
1589515889
- func: setup
15896-
- func: install-valgrind
1589715890
- func: start_mongod
1589815891
vars:
1589915892
TOPOLOGY: replica_set
@@ -15923,7 +15916,6 @@ tasks:
1592315916
updates:
1592415917
- { key: build_type, value: Debug }
1592515918
- func: setup
15926-
- func: install-valgrind
1592715919
- func: start_mongod
1592815920
vars:
1592915921
TOPOLOGY: sharded_cluster
@@ -15953,7 +15945,6 @@ tasks:
1595315945
updates:
1595415946
- { key: build_type, value: Debug }
1595515947
- func: setup
15956-
- func: install-valgrind
1595715948
- func: start_mongod
1595815949
vars:
1595915950
mongodb_version: latest

.evergreen/scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ else
283283
export UBSAN_OPTIONS="print_stacktrace=1"
284284
export PATH="/opt/mongodbtoolchain/v4/bin:${PATH:-}" # llvm-symbolizer
285285
elif [[ "${TEST_WITH_VALGRIND:-}" == "ON" ]]; then
286-
PATH="${VALGRIND_INSTALL_DIR:?}:${PATH:-}"
286+
command -V valgrind
287287
valgrind --version
288288
run_test() {
289289
valgrind --leak-check=full --track-origins=yes --num-callers=50 --error-exitcode=1 --error-limit=no --read-var-info=yes --suppressions=../etc/memcheck.suppressions "$@" "${test_args[@]:?}"

.evergreen/scripts/valgrind-installer.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)