diff options
author | sergey.galtsev <sergey.galtsev@mongodb.com> | 2022-05-17 13:22:57 -0700 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-18 19:33:29 +0000 |
commit | 0fdf27b6bb98760750ba41b0c246e04d395f3f2b (patch) | |
tree | 5b56aba7f47734e60a93ec7ab8e13b35c7c29d93 /evergreen/selinux_test_executor.sh | |
parent | 0edcbe9786a9ada4dd98bf158c9f5c31e9354612 (diff) | |
download | mongo-0fdf27b6bb98760750ba41b0c246e04d395f3f2b.tar.gz |
SERVER-66488 Update selinux tests to use shell from archive_dist_test
Diffstat (limited to 'evergreen/selinux_test_executor.sh')
-rwxr-xr-x | evergreen/selinux_test_executor.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/evergreen/selinux_test_executor.sh b/evergreen/selinux_test_executor.sh index 1ba889a1c80..a0616d314d6 100755 --- a/evergreen/selinux_test_executor.sh +++ b/evergreen/selinux_test_executor.sh @@ -3,6 +3,13 @@ set -o errexit set -o xtrace +mongo="$(pwd)/dist-test/bin/mongo" +export PATH="$(dirname "$mongo"):$PATH" +if [ ! -f "$mongo" ]; then + echo "Mongo shell at $mongo is missing" + exit 1 +fi + function print() { echo "$@" >&2 } @@ -19,7 +26,7 @@ if [ ! -f "$TEST_PATH" ]; then fi # test file is even good before going on -if ! mongo --nodb --norc --quiet "$TEST_PATH"; then +if ! "$mongo" --nodb --norc --quiet "$TEST_PATH"; then print "File $TEST_PATH has syntax errors" exit 1 fi @@ -42,14 +49,14 @@ sudo --non-interactive bash -c ' ' # create mongo config -mongo --nodb --norc --quiet --eval=' +"$mongo" --nodb --norc --quiet --eval=' assert(load("'"$TEST_PATH"'")); const test = new TestDefinition(); print(typeof(test.config) === "string" ? test.config : JSON.stringify(test.config, null, 2)); ' | sudo --non-interactive tee /etc/mongod.conf # setup -mongo --nodb --norc --quiet --eval=' +"$mongo" --nodb --norc --quiet --eval=' assert(load("'"$TEST_PATH"'")); const test = new TestDefinition(); jsTest.log("Running setup()"); @@ -78,7 +85,7 @@ sudo --non-interactive systemctl start mongod \ ) # run test and teardown -mongo --norc --gssapiServiceName=mockservice --eval=' +"$mongo" --norc --gssapiServiceName=mockservice --eval=' assert(load("'"$TEST_PATH"'")); // name is such to prevent collisions const test_812de7ce = new TestDefinition(); |