Skip to content

Commit 3e27d48

Browse files
rcsanchez97kevinAlbs
authored andcommitted
CDRIVER-2505 make libmongoc a sub-project
1 parent 3b34795 commit 3e27d48

File tree

1,232 files changed

+1166
-1305
lines changed

Some content is hidden

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

1,232 files changed

+1166
-1305
lines changed

.evergreen/check-public-headers.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
set -o xtrace # print commands to stderr.
33

44
# regex to match public headers.
5-
pattern="\.\/src\/mongoc\/mongoc.*[^private]\.h$"
5+
pattern="\.\/src\/libmongoc\/src\/mongoc\/mongoc.*[^private]\.h$"
66

77
# public headers we expect not to have BSON_BEGIN_DECLS and BSON_END_DECLS.
8-
exclude="\.\/src\/mongoc\/mongoc-macros.h|.\/src\/mongoc\/mongoc.h"
8+
exclude="\.\/src\/libmongoc\/src\/mongoc\/mongoc-macros.h|.\/src\/libmongoc\/src\/mongoc\/mongoc.h"
99

1010
# get all public headers.
11-
find ./src/mongoc -regex $pattern -regextype posix-extended -not -regex $exclude | sort > /tmp/public_headers.txt
11+
find ./src/libmongoc/src/mongoc -regex $pattern -regextype posix-extended -not -regex $exclude | sort > /tmp/public_headers.txt
1212

1313
# get all public headers with BSON_BEGIN_DECLS.
14-
find ./src/mongoc -regextype posix-extended -regex $pattern -not -regex $exclude | xargs grep -l "BSON_BEGIN_DECLS" | sort > /tmp/public_headers_with_extern_c.txt
14+
find ./src/libmongoc/src/mongoc -regextype posix-extended -regex $pattern -not -regex $exclude | xargs grep -l "BSON_BEGIN_DECLS" | sort > /tmp/public_headers_with_extern_c.txt
1515

1616
echo "checking if any public headers are missing 'extern C' declaration"
1717

1818
# check if there's any diff.
1919
diff -y /tmp/public_headers.txt /tmp/public_headers_with_extern_c.txt
2020

2121
# use return status of diff
22-
exit $?
22+
exit $?

.evergreen/check-release-archive.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ fi
5151

5252
echo "Checking that all C files are included in tarball"
5353
# Check that all C files were included.
54-
TAR_CFILES=`tar --wildcards -tf mongo-c-driver-*.tar.gz 'mongo-c-driver-*/src/mongoc/*.c' | cut -d / -f 4 | sort`
55-
SRC_CFILES=`echo src/mongoc/*.c | xargs -n 1 | cut -d / -f 3 | sort`
54+
TAR_CFILES=`tar --wildcards -tf mongo-c-driver-*.tar.gz 'mongo-c-driver-*/src/libmongoc/src/mongoc/*.c' | cut -d / -f 4 | sort`
55+
SRC_CFILES=`echo src/libmongoc/src/mongoc/*.c | xargs -n 1 | cut -d / -f 3 | sort`
5656
if [ "$TAR_CFILES" != "$SRC_CFILES" ]; then
5757
echo "Not all C files are in the release archive"
5858
echo $TAR_CFILES > tar_cfiles.txt

.evergreen/compile-unix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ ulimit -c unlimited || true
194194
mkfifo pipe || true
195195
if [ -e pipe ]; then
196196
tee error.log < pipe &
197-
./test-libmongoc -d -F test-results.json 2>pipe
197+
./src/libmongoc/test-libmongoc -d -F test-results.json 2>pipe
198198
rm pipe
199199
else
200-
./test-libmongoc -d -F test-results.json
200+
./src/libmongoc/test-libmongoc -d -F test-results.json
201201
fi
202202

203203
# Check if the error.log exists, and is more than 0 byte

.evergreen/compile-windows-mingw.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rem Ensure Cygwin executables like sh.exe are not in PATH
2-
set PATH=C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson
2+
set PATH=C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson;src\libmongoc
33

44
echo CONFIGURE_FLAGS %CONFIGURE_FLAGS%
55

@@ -12,4 +12,4 @@ set CC=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin\gcc.exe
1212
%CMAKE_MAKE_PROGRAM%
1313

1414
set MONGOC_TEST_SKIP_LIVE=on
15-
test-libmongoc.exe --no-fork -d -F test-results.json
15+
.\src\libmongoc\test-libmongoc.exe --no-fork -d -F test-results.json

.evergreen/compile-windows.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ esac
114114
if [ "$RELEASE" ]; then
115115
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DCMAKE_BUILD_TYPE=Release"
116116
BUILD_FLAGS="$BUILD_FLAGS /p:Configuration=Release"
117-
TEST_PATH="./Release/test-libmongoc.exe"
118-
export PATH=$PATH:`pwd`/tests:`pwd`/Release:`pwd`/src/libbson/Release
117+
TEST_PATH="./Release/src/libmongoc/test-libmongoc.exe"
118+
export PATH=$PATH:`pwd`/tests:`pwd`/Release:`pwd`/src/libbson/Release:`pwd`/src/libmongoc/Release
119119
else
120120
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DCMAKE_BUILD_TYPE=Debug"
121121
BUILD_FLAGS="$BUILD_FLAGS /p:Configuration=Debug"
122-
TEST_PATH="./Debug/test-libmongoc.exe"
123-
export PATH=$PATH:`pwd`/tests:`pwd`/Debug:`pwd`/src/libbson/Debug
122+
TEST_PATH="./Debug/src/libmongoc/test-libmongoc.exe"
123+
export PATH=$PATH:`pwd`/tests:`pwd`/Debug:`pwd`/src/libbson/Debug:`pwd`/src/libmongoc/Debug
124124
fi
125125

126126
"$CMAKE" -G "$CC" "-DCMAKE_PREFIX_PATH=${INSTALL_DIR}/lib/cmake" $CONFIGURE_FLAGS

.evergreen/debug-core-evergreen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ echo "Debugging core files"
55
shopt -s nullglob
66
for i in *.core; do
77
echo $i
8-
echo "backtrace full" | gdb -q test-libmongoc $i
8+
echo "backtrace full" | gdb -q ./src/libmongoc/test-libmongoc $i
99
done

.evergreen/link-sample-program-mingw-bson.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set CMAKE=C:\cmake\bin\cmake
99
set CMAKE_MAKE_PROGRAM=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin\mingw32-make.exe
1010
set CC=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin\gcc.exe
1111
rem Ensure Cygwin executables like sh.exe are not in PATH
12-
set PATH=C:\cygwin\bin;C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson
12+
set PATH=C:\cygwin\bin;C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson;src\libmongoc
1313
set LINK_STATIC=1
1414

1515
set SRCROOT=%CD%

.evergreen/link-sample-program-mingw.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set CMAKE=C:\cmake\bin\cmake
1010
set CMAKE_MAKE_PROGRAM=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin\mingw32-make.exe
1111
set CC=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin\gcc.exe
1212
rem Ensure Cygwin executables like sh.exe are not in PATH
13-
set PATH=C:\cygwin\bin;C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson
13+
set PATH=C:\cygwin\bin;C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson;src\libmongoc
1414

1515
set SRCROOT=%CD%
1616
set BUILD_DIR=%CD%\build-dir

.evergreen/run-auth-tests.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ C_TIMEOUT="connectTimeoutMS=30000&serverSelectionTryOnce=false"
2222

2323

2424
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
25-
if grep -q "#define MONGOC_ENABLE_SASL 1" src/mongoc/mongoc-config.h; then
25+
if grep -q "#define MONGOC_ENABLE_SASL 1" src/libmongoc/src/mongoc/mongoc-config.h; then
2626
SASL=1
2727
else
2828
SASL=0
2929
fi
30-
if grep -q "#define MONGOC_ENABLE_SSL 1" src/mongoc/mongoc-config.h; then
30+
if grep -q "#define MONGOC_ENABLE_SSL 1" src/libmongoc/src/mongoc/mongoc-config.h; then
3131
SSL=1
3232
else
3333
SSL=0
@@ -38,20 +38,20 @@ DIR=$(dirname $0)
3838

3939
case "$OS" in
4040
cygwin*)
41-
PING="./Debug/mongoc-ping.exe"
42-
TEST_GSSAPI="./Debug/test-mongoc-gssapi.exe"
41+
PING="./Debug/src/libmongoc/mongoc-ping.exe"
42+
TEST_GSSAPI="./Debug/src/libmongoc/test-mongoc-gssapi.exe"
4343
IP_ADDR=`getent hosts $AUTH_HOST | head -n 1 | awk '{print $1}'`
4444
;;
4545

4646
darwin)
47-
PING="./mongoc-ping"
48-
TEST_GSSAPI="./test-mongoc-gssapi"
47+
PING="./src/libmongoc/mongoc-ping"
48+
TEST_GSSAPI="./src/libmongoc/test-mongoc-gssapi"
4949
IP_ADDR=`dig $AUTH_HOST +short | tail -1`
5050
;;
5151

5252
*)
53-
PING="./mongoc-ping"
54-
TEST_GSSAPI="./test-mongoc-gssapi"
53+
PING="./src/libmongoc/mongoc-ping"
54+
TEST_GSSAPI="./src/libmongoc/test-mongoc-gssapi"
5555
IP_ADDR=`getent hosts $AUTH_HOST | head -n 1 | awk '{print $1}'`
5656
esac
5757

.evergreen/run-mock-server-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ DIR=$(dirname $0)
2121

2222
case "$OS" in
2323
cygwin*)
24-
test-libmongoc.exe $TEST_ARGS
24+
./src/libmongoc/test-libmongoc.exe $TEST_ARGS
2525
;;
2626

2727
*)
2828
ulimit -c unlimited || true
2929

3030
if [ "$VALGRIND" = "on" ]; then
3131
. $DIR/valgrind.sh
32-
run_valgrind ./test-libmongoc --no-fork $TEST_ARGS
32+
run_valgrind ./src/libmongoc/test-libmongoc --no-fork $TEST_ARGS
3333
else
3434
./test-libmongoc --no-fork $TEST_ARGS
3535
fi

0 commit comments

Comments
 (0)