Skip to content

Commit 04765a4

Browse files
committed
Update build and test scripts for latest changes
1 parent a92181b commit 04765a4

9 files changed

+28
-122
lines changed

CMakeCPack.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set(CPACK_PACKAGE_CHECKSUM "SHA256")
2323
set(CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR};/.git/;.gitignore;menu.yml")
2424
set(CPACK_SOURCE_GENERATOR "ZIP;TGZ")
2525
set(CPACK_GENERATOR "ZIP;TGZ")
26-
set(CPACK_PACKAGE_DIRECTORY "${PROJECT_BINARY_DIR}/dist")
26+
set(CPACK_PACKAGE_DIRECTORY "${PROJECT_BINARY_DIR}/dist-package")
2727

2828
if (UNIX)
2929
if (CMAKE_SYSTEM_NAME MATCHES Linux)

CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ else ()
5656
set(LIBDIR_RELATIVE_PKGCONFIGDIR "../../lib")
5757
endif ()
5858

59-
message(STATUS ${CMAKE_INSTALL_LIBDIR})
60-
message(STATUS ${CMAKE_INSTALL_BINDIR})
61-
message(STATUS ${CMAKE_INSTALL_INCLUDEDIR})
62-
6359
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
6460
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
6561
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

COMPATIBILITY

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# This file holds the Neo4j server versions for which this driver is
22
# compatible, one per line. Generally, only the most recent patch of
33
# each version should be listed.
4-
3.3.2
5-
3.2.3
4+
3.5.0-beta02
5+
3.4.9
6+
3.3.7
7+
3.2.13
68

79
# The following older server versions are disabled due to lack of
810
# support for byte arrays.

make.cmd

+5-36
Original file line numberDiff line numberDiff line change
@@ -28,54 +28,23 @@ Set "CMAKE_BUILD=%~2"
2828

2929
If "%~1" == "MSVC" (
3030
Set "CMAKE_GENERATOR=Visual Studio 15 2017 Win64"
31-
Set "VS_TOOLS_ARCH=x64"
32-
Set "VS_TARGET_PLATFORM=x64"
3331

3432
If "%~3" == "x86" (
3533
Set "CMAKE_GENERATOR=Visual Studio 15 2017"
36-
Set "VS_TOOLS_ARCH=x86"
37-
Set "VS_TARGET_PLATFORM=Win32"
3834
)
3935
)
4036

41-
If "%~1" == "MSVC" (
42-
REM Check if in Visual Studio Developer Command Prompt
43-
If Not Defined VCINSTALLDIR (
44-
For %%D In (Enterprise Professional Community BuildTools) Do (
45-
If Exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\%%D\VC\Auxiliary\Build\vcvarsall.bat" (
46-
Pushd %cd%
47-
Call "C:\Program Files (x86)\Microsoft Visual Studio\2017\%%D\VC\Auxiliary\Build\vcvarsall.bat" %VS_TOOLS_ARCH%
48-
If ERRORLEVEL 0 (
49-
Popd
50-
Goto :FoundVS
51-
)
52-
Popd
53-
)
54-
)
55-
)
56-
57-
:FoundVS
58-
If Not Defined VCINSTALLDIR (
59-
Echo "Visual Studio 2017 Installation Location could not be determined."
60-
Echo "Ensure you've it installed and run this script in Visual Studio Developer Command Prompt."
61-
Goto :Failure
62-
)
63-
)
64-
6537
If "%~1" == "MINGW" (
6638
Set "CMAKE_GENERATOR=MinGW Makefiles"
6739
)
6840

6941
Set SEABOLTDIR=%~dp0
70-
Pushd %SEABOLTDIR%
71-
72-
cmake.exe -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CMAKE_BUILD% || Goto :Failure
42+
Set BUILDDIR=%SEABOLTDIR%\build
43+
Mkdir %BUILDDIR%
44+
Pushd %BUILDDIR%
7345

74-
If "%~1" == "MSVC" (
75-
msbuild.exe seabolt-all.sln /p:Platform=%VS_TARGET_PLATFORM% || Goto :Failure
76-
) Else (
77-
mingw32-make.exe || Goto :Failure
78-
)
46+
cmake.exe -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%CMAKE_BUILD% -DCMAKE_INSTALL_PREFIX=dist .. || Goto :Failure
47+
cmake.exe --build . --target install || Goto :Failure
7948

8049
Popd
8150
Exit /b 0

make_debug.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/usr/bin/env bash
22

33
BASE=$(dirname $0)
4+
BUILD=${BASE}/build
45

5-
pushd ${BASE} 1> /dev/null
6-
cmake -DCMAKE_BUILD_TYPE=Debug .
6+
mkdir -p ${BUILD} 1>/dev/null
7+
8+
pushd ${BUILD} 1> /dev/null
9+
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=dist ..
710
EXIT_STATUS=$?
811
if [ "${EXIT_STATUS}" -eq "0" ]
912
then
10-
make
13+
cmake --build . --target install
1114
EXIT_STATUS=$?
1215
fi
1316
popd 1> /dev/null

make_packages.sh

-50
This file was deleted.

make_release.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/usr/bin/env bash
22

33
BASE=$(dirname $0)
4+
BUILD=${BASE}/build
45

5-
pushd ${BASE} 1> /dev/null
6-
cmake -DCMAKE_BUILD_TYPE=Release .
6+
mkdir -p ${BUILD} 1>/dev/null
7+
8+
pushd ${BUILD} 1> /dev/null
9+
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dist ..
710
EXIT_STATUS=$?
811
if [ "${EXIT_STATUS}" -eq "0" ]
912
then
10-
make
13+
cmake --build . --target install
1114
EXIT_STATUS=$?
1215
fi
1316
popd 1> /dev/null

run_tests.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Function RunTests($Version)
150150
Write-Host "-- Checking server"
151151
$env:BOLT_PASSWORD=$Password
152152
$env:BOLT_PORT=$Port
153-
& $BaseDir\build\bin\bolt.exe debug "UNWIND range(1, 10000) AS n RETURN n"
153+
& $BaseDir\build\bin\seabolt-cli.exe debug "UNWIND range(1, 10000) AS n RETURN n"
154154
if ( $LASTEXITCODE -ne 0 )
155155
{
156156
throw @{
@@ -160,7 +160,7 @@ Function RunTests($Version)
160160
}
161161

162162
Write-Host "-- Running tests"
163-
& $BaseDir\build\bin\seabolt-integration-test.exe $TestArgs
163+
& $BaseDir\build\bin\seabolt-test.exe $TestArgs
164164
if ( $LASTEXITCODE -ne 0 )
165165
{
166166
throw @{

run_tests.sh

+4-21
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,8 @@ function check_boltkit
4646

4747
function compile_debug
4848
{
49-
if [ "${OPT_QUICK}" == "0" ]
50-
then
51-
make clean
52-
fi
5349
echo "Compiling for debug"
54-
cmake -DCMAKE_BUILD_TYPE=Debug .
55-
if [ "$?" -ne "0" ]
56-
then
57-
echo "FATAL: Compilation failed."
58-
exit ${COMPILATION_FAILED}
59-
fi
60-
make
50+
${BASE}/make_debug.sh
6151
if [ "$?" -ne "0" ]
6252
then
6353
echo "FATAL: Compilation failed."
@@ -68,14 +58,7 @@ function compile_debug
6858
function compile_release
6959
{
7060
echo "Compiling for release"
71-
make clean
72-
cmake -DCMAKE_BUILD_TYPE=Release .
73-
if [ "$?" -ne "0" ]
74-
then
75-
echo "FATAL: Compilation failed."
76-
exit ${COMPILATION_FAILED}
77-
fi
78-
make
61+
${BASE}/make_release.sh
7962
if [ "$?" -ne "0" ]
8063
then
8164
echo "FATAL: Compilation failed."
@@ -167,7 +150,7 @@ function run_tests
167150
if [ "${OPT_QUICK}" == "0" ]
168151
then
169152
echo "-- Checking server"
170-
BOLT_PASSWORD="${PASSWORD}" BOLT_PORT="${BOLT_PORT}" ${BASE}/build/bin/bolt debug -a "UNWIND range(1, 10000) AS n RETURN n"
153+
BOLT_PASSWORD="${PASSWORD}" BOLT_PORT="${BOLT_PORT}" ${BASE}/build/bin/seabolt-cli debug -a "UNWIND range(1, 10000) AS n RETURN n"
171154
if [ "$?" -ne "0" ]
172155
then
173156
echo "FATAL: Server checks failed."
@@ -176,7 +159,7 @@ function run_tests
176159
fi
177160

178161
echo "-- Running tests"
179-
BOLT_PORT="${BOLT_PORT}" ${BASE}/build/bin/seabolt-integration-test ${TEST_ARGS}
162+
BOLT_PORT="${BOLT_PORT}" ${BASE}/build/bin/seabolt-test ${TEST_ARGS}
180163
if [ "$?" -ne "0" ]
181164
then
182165
echo "FATAL: Test execution failed."

0 commit comments

Comments
 (0)