Skip to content

Commit ea6c048

Browse files
authored
RUST-1951 Move spec test files outside of driver source tree (#1526)
1 parent 7ce1b7a commit ea6c048

File tree

2,601 files changed

+20
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,601 files changed

+20
-21
lines changed

.evergreen/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ tasks:
11861186
- func: "build static test tarball"
11871187
vars:
11881188
BUILD_FEATURES: "--features azure-oidc"
1189-
TEST_FILES: "${PROJECT_DIRECTORY}/src/test/spec/json/auth/unified"
1189+
TEST_FILES: "${PROJECT_DIRECTORY}/spec/auth/unified"
11901190
- command: subprocess.exec
11911191
type: test
11921192
params:
@@ -1203,7 +1203,7 @@ tasks:
12031203
- func: "build static test tarball"
12041204
vars:
12051205
BUILD_FEATURES: "--features gcp-oidc"
1206-
TEST_FILES: "${PROJECT_DIRECTORY}/src/test/spec/json/auth/unified"
1206+
TEST_FILES: "${PROJECT_DIRECTORY}/spec/auth/unified"
12071207
- command: subprocess.exec
12081208
type: test
12091209
params:
@@ -1219,7 +1219,7 @@ tasks:
12191219
commands:
12201220
- func: "build static test tarball"
12211221
vars:
1222-
TEST_FILES: "${PROJECT_DIRECTORY}/src/test/spec/json/auth/unified"
1222+
TEST_FILES: "${PROJECT_DIRECTORY}/spec/auth/unified"
12231223
- command: ec2.assume_role
12241224
params:
12251225
role_arn: ${aws_test_secrets_role}

etc/update-spec-tests.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# The second argument is the branch/commit hash that the tests should be synced to. If it
66
# is omitted, it will default to "master".
77
#
8-
# This script puts the tests in the directory $reporoot/src/test/spec/json/$specname. It
8+
# This script puts the tests in the directory $reporoot/spec/$specname. It
99
# must be run from the root of the repository.
1010

1111
set -o errexit
@@ -22,22 +22,23 @@ if [ "$#" -eq 0 ]; then
2222
fi
2323

2424
REF="${2:-master}"
25+
DEST="spec"
2526

2627
tmpdir=`perl -MFile::Temp=tempdir -wle 'print tempdir(TMPDIR => 1, CLEANUP => 0)'`
2728
curl -sL "https://github.com/mongodb/specifications/archive/$REF.zip" -o "$tmpdir/specs.zip"
2829
unzip -q -d "$tmpdir" "$tmpdir/specs.zip"
29-
mkdir -p "src/test/spec/json/$1"
30-
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/tests/" "src/test/spec/json/$1" --delete
30+
mkdir -p "${DEST}/$1"
31+
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/tests/" "${DEST}/$1" --delete
3132

3233
if [ "$1" = "client-side-encryption" ]; then
33-
mkdir -p "src/test/spec/json/testdata/$1/data"
34-
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/etc/data/" "src/test/spec/json/testdata/$1/data" --delete
35-
mkdir -p "src/test/spec/json/testdata/$1/corpus"
36-
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/corpus/" "src/test/spec/json/testdata/$1/corpus" --delete
37-
mkdir -p "src/test/spec/json/testdata/$1/external"
38-
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/external/" "src/test/spec/json/testdata/$1/external" --delete
39-
mkdir -p "src/test/spec/json/testdata/$1/limits"
40-
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/limits/" "src/test/spec/json/testdata/$1/limits" --delete
34+
mkdir -p "${DEST}/testdata/$1/data"
35+
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/etc/data/" "${DEST}/testdata/$1/data" --delete
36+
mkdir -p "${DEST}/testdata/$1/corpus"
37+
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/corpus/" "${DEST}/testdata/$1/corpus" --delete
38+
mkdir -p "${DEST}/testdata/$1/external"
39+
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/external/" "${DEST}/testdata/$1/external" --delete
40+
mkdir -p "${DEST}/testdata/$1/limits"
41+
rsync -ah "$tmpdir/specifications-$REF"*"/source/$1/limits/" "${DEST}/testdata/$1/limits" --delete
4142
fi
4243

4344
rm -rf "$tmpdir"

0 commit comments

Comments
 (0)