Skip to content

Commit ac44599

Browse files
authored
chore: script populating integration spec topics (#3035)
1 parent 4f368c4 commit ac44599

File tree

14 files changed

+21
-0
lines changed

14 files changed

+21
-0
lines changed

etc/populate_spec_topics.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#! /usr/bin/env bash
2+
3+
if [[ -z $MONGODB_SPECIFICATIONS_DIRECTORY ]]; then
4+
tmpdir=$(mktemp -d -t spec_testsXXXX)
5+
curl -sL "https://github.com/mongodb/specifications/archive/master.zip" -o "$tmpdir/specs.zip"
6+
unzip -d "$tmpdir" "$tmpdir/specs.zip" > /dev/null
7+
MONGODB_SPECIFICATIONS_DIRECTORY="$tmpdir"/specifications-master
8+
fi
9+
10+
# lists only the top level directories
11+
SPEC_TOPICS=$(find "$MONGODB_SPECIFICATIONS_DIRECTORY"/source -maxdepth 1 -type d -exec basename {} + | sort)
12+
13+
for TOPIC in $SPEC_TOPICS; do
14+
if [[ $TOPIC == ".DS_Store" ]]; then continue; fi
15+
if [[ $TOPIC == "Makefile" ]]; then continue; fi
16+
if [[ $TOPIC == "source" ]]; then continue; fi
17+
18+
echo "$TOPIC"
19+
mkdir -p "test/integration/$TOPIC"
20+
touch "test/integration/$TOPIC/.gitkeep"
21+
done

test/integration/benchmarking/.gitkeep

Whitespace-only changes.

test/integration/bson-corpus/.gitkeep

Whitespace-only changes.

test/integration/bson-decimal128/.gitkeep

Whitespace-only changes.

test/integration/causal-consistency/.gitkeep

Whitespace-only changes.

test/integration/collation/.gitkeep

Whitespace-only changes.

test/integration/compression/.gitkeep

Whitespace-only changes.

test/integration/connections-survive-step-down/.gitkeep

Whitespace-only changes.

test/integration/message/.gitkeep

Whitespace-only changes.

test/integration/mongodb-handshake/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)