forked from apache/geode-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEODE-9549: enable netcore tests in CI (apache#867)
* GEODE-9549: Enable .net core tests in CI - Enable test running job in yml * GEODE-9549: Build NetCore and NetCore.Test projects individually - This simplifies the cmake config, and makes the post-build file copy steps more reliable * GEODE-9549: Copy C bindings lib to binary dir for tests - Give Java project a reasonable name * GEODE-9549: Use ctest to run netcore tests - Eliminates need for start/stop scripts, all done via ctest now * GEODE-9549: Make .net core project build in sequence - Still getting sharing violations on parallel builds, so need to ensure none of these build at the same time. Co-authored-by: Jacob Barrett <[email protected]>
- Loading branch information
1 parent
1f9dd5b
commit e0a0748
Showing
70 changed files
with
158 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM alpine:latest | ||
FROM alpine:3.13 | ||
LABEL maintainer="Apache Geode <[email protected]>" | ||
LABEL description="Minimal image for executing CI tasks." | ||
RUN apk add --no-cache bash git openssh-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ configs: | |
#@overlay/append | ||
- name: release | ||
config: RelWithDebInfo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
## | ||
# FindGeode CMake find module. | ||
## | ||
file(REMOVE_RECURSE locator server auth_locator auth_server) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
project(netcore-test LANGUAGES NONE) | ||
|
||
add_custom_target(netcore-integration-test ALL | ||
COMMAND ${DOTNET} build netcore-integration-test.csproj --configuration $<CONFIG> | ||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:apache-geode-c> ${CMAKE_CURRENT_SOURCE_DIR}/bin/$<CONFIG>/netcoreapp3.1/ | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS apache-geode-c netcore-lib netcore-utility VERBATIM) | ||
|
||
enable_testing() | ||
|
||
set(AUTH_OPTS "--J=-Dgemfire.security-username=server --J=-Dgemfire.security-password=server --classpath=$<SHELL_PATH:${CMAKE_CURRENT_BINARY_DIR}/../utility/netcore-utility.jar>") | ||
set(AUTH_LOCATOR_OPTS "${AUTH_OPTS} --J=-Dgemfire.security-manager=javaobject.SimpleSecurityManager") | ||
|
||
add_test(NAME startclusters COMMAND ${Geode_gfsh_EXECUTABLE} | ||
-e "start locator --name=locator --port=10334 --http-service-port=6060 --J=-Dgemfire.jmx-manager-port=1099" | ||
-e "start server --name=server --server-port=0" | ||
-e "create region --name=exampleRegion --type=PARTITION" | ||
-e "create region --name=geodeSessionState --type=PARTITION" | ||
-e "disconnect" | ||
-e "start locator --name=auth_locator ${AUTH_LOCATOR_OPTS} --port=10335 --http-service-port=7070 --J=-Dgemfire.jmx-manager-port=2099" | ||
-e "connect --locator=localhost[10335] --user=server --password=server" | ||
-e "start server --name=auth_server ${AUTH_OPTS} --server-port=0" | ||
-e "create region --name=authExampleRegion --type=PARTITION" | ||
-e "create region --name=authGeodeSessionState --type=PARTITION") | ||
add_test(NAME stopclusters | ||
COMMAND ${Geode_gfsh_EXECUTABLE} | ||
-e "connect --locator=localhost[10335] --user=server --password=server" | ||
-e "stop server --name=auth_server" | ||
-e "stop locator --name=auth_locator" | ||
-e "connect --locator=localhost[10334]" | ||
-e "stop server --name=server" | ||
-e "stop locator --name=locator") | ||
add_test(NAME remove_dirs | ||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/remove_dirs.cmake) | ||
|
||
add_test(NAME netcore-test | ||
COMMAND dotnet test -c $<CONFIG> | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
set_tests_properties(startclusters PROPERTIES FIXTURES_SETUP geode) | ||
set_tests_properties(netcore-test PROPERTIES FIXTURES_REQUIRED geode) | ||
set_tests_properties(stopclusters PROPERTIES FIXTURES_CLEANUP geode) | ||
set_tests_properties(remove_dirs PROPERTIES DEPENDS stopclusters) | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
project(netcore-session-integrationtest LANGUAGES NONE) | ||
|
||
add_custom_target(netcore-session-integration-test ALL | ||
COMMAND ${DOTNET} build netcore-session-integration-test.csproj --configuration $<CONFIG> | ||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:apache-geode-c> ${CMAKE_CURRENT_SOURCE_DIR}/bin/$<CONFIG>/netcoreapp3.1/ | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS apache-geode-c netcore-session VERBATIM) | ||
|
||
enable_testing() | ||
|
||
add_test(NAME startclusters COMMAND ${Geode_gfsh_EXECUTABLE} | ||
-e "start locator --name=locator --port=10334 --http-service-port=6060 --J=-Dgemfire.jmx-manager-port=1099" | ||
-e "start server --name=server --server-port=0" | ||
-e "create region --name=exampleRegion --type=PARTITION" | ||
-e "create region --name=geodeSessionState --type=PARTITION" | ||
-e "disconnect" | ||
-e "start locator --name=auth_locator ${AUTH_LOCATOR_OPTS} --port=10335 --http-service-port=7070 --J=-Dgemfire.jmx-manager-port=2099" | ||
-e "connect --locator=localhost[10335] --user=server --password=server" | ||
-e "start server --name=auth_server ${AUTH_OPTS} --server-port=0" | ||
-e "create region --name=authExampleRegion --type=PARTITION" | ||
-e "create region --name=authGeodeSessionState --type=PARTITION") | ||
add_test(NAME stopclusters | ||
COMMAND ${Geode_gfsh_EXECUTABLE} | ||
-e "connect --locator=localhost[10335] --user=server --password=server" | ||
-e "stop server --name=auth_server" | ||
-e "stop locator --name=auth_locator" | ||
-e "connect --locator=localhost[10334]" | ||
-e "stop server --name=server" | ||
-e "stop locator --name=locator") | ||
add_test(NAME remove_dirs | ||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/remove_dirs.cmake) | ||
|
||
add_test(NAME netcore-session-test | ||
COMMAND dotnet test -c $<CONFIG> | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
set_tests_properties(startclusters PROPERTIES FIXTURES_SETUP geode) | ||
set_tests_properties(netcore-session-test PROPERTIES FIXTURES_REQUIRED geode) | ||
set_tests_properties(stopclusters PROPERTIES FIXTURES_CLEANUP geode) | ||
set_tests_properties(remove_dirs PROPERTIES DEPENDS stopclusters) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.