From 186925292b4a8bf7768b5d85804c68108c5650ae Mon Sep 17 00:00:00 2001 From: "robert.tomczyk" Date: Fri, 27 Nov 2020 07:08:24 +0000 Subject: [PATCH] GEODE: Add test loop for geode-native on Windows Change-Id: Iabfe97efdbd029f5217fe2cf535db9a9abdb97cb --- .../apache-geode-native-win-macros.yaml | 56 +++++++ .../apache-geode-native-win-slave-setup.yaml | 61 ++++++++ .../slave-win-setup.ps1 | 111 ++++++++++++++ ...e-native-win-cli-new-integration-test.yaml | 27 ++++ ...e-native-win-cli-old-integration-test.yaml | 27 ++++ ...apache-geode-native-win-cli-unit-test.yaml | 27 ++++ ...geode-native-win-new-integration-test.yaml | 27 ++++ ...geode-native-win-old-integration-test.yaml | 27 ++++ .../apache-geode-native-win-unit-test.yaml | 27 ++++ .../win-cli-new-integration-test.ps1 | 29 ++++ .../win-cli-old-integration-test.ps1 | 30 ++++ .../win-cli-unit-test.ps1 | 28 ++++ .../win-new-integration-test.ps1 | 30 ++++ .../win-old-integration-test.ps1 | 31 ++++ .../win-unit-test.ps1 | 28 ++++ .../apache-geode-native-win-verify.yaml | 145 ++++++++++++++++++ ...emplate-apache-geode-native-win-tests.yaml | 78 ++++++++++ 17 files changed, 789 insertions(+) create mode 100644 jjb/geode-native-win/apache-geode-native-win-macros.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-slave/apache-geode-native-win-slave-setup.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-slave/slave-win-setup.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-new-integration-test.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-old-integration-test.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-unit-test.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-new-integration-test.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-old-integration-test.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-unit-test.yaml create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/win-cli-new-integration-test.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/win-cli-old-integration-test.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/win-cli-unit-test.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/win-new-integration-test.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/win-old-integration-test.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-tests/win-unit-test.ps1 create mode 100644 jjb/geode-native-win/apache-geode-native-win-verify.yaml create mode 100644 jjb/geode-native-win/global-template-apache-geode-native-win-tests.yaml diff --git a/jjb/geode-native-win/apache-geode-native-win-macros.yaml b/jjb/geode-native-win/apache-geode-native-win-macros.yaml new file mode 100644 index 00000000..dda67a40 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-macros.yaml @@ -0,0 +1,56 @@ +--- +# +# ============LICENSE_START===================================================== +# Copyright (C) 2020 Nordix Foundation. +# ============================================================================== +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END======================================================= +# +# macros used by Windows geode-native job types +- builder: + name: 'apache-geode-native-win-setup-slave-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-slave/slave-win-setup.ps1 +- builder: + name: 'apache-geode-native-win-unit-test-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-tests/win-unit-test.ps1 +- builder: + name: 'apache-geode-native-win-new-integration-test-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-tests/win-new-integration-test.ps1 +- builder: + name: 'apache-geode-native-win-old-integration-test-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-tests/win-old-integration-test.ps1 +- builder: + name: 'apache-geode-native-win-cli-unit-test-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-tests/win-cli-unit-test.ps1 +- builder: + name: 'apache-geode-native-win-cli-new-integration-test-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-tests/win-cli-new-integration-test.ps1 +- builder: + name: 'apache-geode-native-win-cli-old-integration-test-macro' + builders: + - powershell: + !include-raw: ./apache-geode-native-win-tests/win-cli-old-integration-test.ps1 \ No newline at end of file diff --git a/jjb/geode-native-win/apache-geode-native-win-slave/apache-geode-native-win-slave-setup.yaml b/jjb/geode-native-win/apache-geode-native-win-slave/apache-geode-native-win-slave-setup.yaml new file mode 100644 index 00000000..896e8ddf --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-slave/apache-geode-native-win-slave-setup.yaml @@ -0,0 +1,61 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +- job: + name: 'win-geode-native-SlaveSetup' + + node: geode-windows2019 + disabled: false + concurrent: true + + properties: + - logrotate + + parameters: + - string: + name: GEODE_SERVER_VERSION + default: '1.13.1' + description: Version of Geode Server required to test geode-native client on Windows + - string: + name: NUNIT_VERSION + default: '2.6.4' + description: Version of NUnit .Net test framework for geode-native tests on Windows + - string: + name: DOTNET_VERSION + default: '4.5.2' + description: Version of .NET Framework development platform for geode-native on Windows + - string: + name: DOGTAIL_DOTNET_VERSION + default: '3.5sp1' + description: Version of Dogtail .NET Framework development platform for geode-native on Windows + - string: + name: GEODE_SERVER_PATH + default: 'C:\GeodeServer' + description: Location of Geode Server on the Windows test instance + + builders: + - 'apache-geode-native-win-setup-slave-macro' + + publishers: + - notify-slack: + slack-channel: '#geode-ci' + notify-start: true + notify-success: true + notify-failure: true + notify-back-to-normal: true diff --git a/jjb/geode-native-win/apache-geode-native-win-slave/slave-win-setup.ps1 b/jjb/geode-native-win/apache-geode-native-win-slave/slave-win-setup.ps1 new file mode 100644 index 00000000..754d8ad6 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-slave/slave-win-setup.ps1 @@ -0,0 +1,111 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +# Wrapper function for choco (Software management automation for Windows) +function Install-Choco { + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [string] $PackageName, + [string[]] $ArgumentList + ) + + process { + $count = 1 + while($true) + { + Write-Host "Running [#$count]: choco install $packageName -y $ArgumentList" + choco install $packageName -y @ArgumentList + + $pkg = choco list --localonly $packageName --exact --all --limitoutput + if ($pkg) { + Write-Host "Package installed: $pkg" + break + } + else { + $count++ + if ($count -ge 5) { + Write-Host "Could not install $packageName after $count attempts" + exit 1 + } + Start-Sleep -Seconds 30 + } + } + } +} + +# Get required version of geode server to execute geode-native (client) tests +function Get-GeodeServer { + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [string] $GeodeVersion, + [Parameter(Mandatory)] + [string] $LocationPath + ) + process { + $GeodeURL = "https://downloads.apache.org/geode/" + $GeodeVersion + "/apache-geode-" + $GeodeVersion + ".tgz" + $GeodePackage = "apache-geode-" + $GeodeVersion + ".tgz" + Write-Host "`nDownloading Geode Server version: $GeodeVersion" + Write-Host "from URL: $GeodeURL `n" + wget -Verbose $GeodeURL -OutFile $GeodePackage + If(!(test-path $LocationPath)) + { + New-Item -ItemType Directory -Force -Path $LocationPath + } + Write-Host "`nExtracting Geode Server to: ${LocationPath}apache-geode-${GeodeVersion} `n" + tar -xzvf $GeodePackage -C $LocationPath + $env:GEODE_HOME = $LocationPath + "\apache-geode-" + $GeodeVersion + } +} + +Write-Host "Install Git, version: latest" +Install-Choco -PackageName git.install + +Write-Host "Install Doxygen, version: latest" +Install-Choco -PackageName doxygen.install + +Write-Host "Install NUnit, version: ${ENV:NUNIT_VERSION}" +Install-Choco -PackageName nunit.install -ArgumentList "--version",${ENV:NUNIT_VERSION},"--allow-downgrade" + +Write-Host "Install OpenSSL, version: latest" +Install-Choco -PackageName openssl + +Write-Host "Install CMake, version: latest" +Install-Choco -PackageName cmake.portable + +Write-Host "Install Dogtail, version: ${ENV:DOGTAIL_DOTNET_VERSION}" +Install-Choco -PackageName dogtail.dotnet${ENV:DOGTAIL_DOTNET_VERSION} + +Write-Host "Install .NET Framework and DevPack, version: ${ENV:DOTNET_VERSION}" +Install-Choco -PackageName "dotnet${ENV:DOTNET_VERSION}" +Install-Choco -PackageName "netfx-${ENV:DOTNET_VERSION}-devpack" -ArgumentList "--allowEmptyChecksums","-confirm" + +Write-Host "Install GNU Win32 Core utilities, version: latest" +Install-Choco -PackageName gnuwin32-coreutils.portable + +Write-Host "Install NSIS, version: latest" +Install-Choco -PackageName nsis + +Write-Host "Install patch, version: latest" +Install-Choco -PackageName patch + +Write-Host "Install NuGet, version: latest" +Install-Choco -PackageName nuget.commandline + +Get-GeodeServer -GeodeVersion ${ENV:GEODE_SERVER_VERSION} -LocationPath ${ENV:GEODE_SERVER_PATH} \ No newline at end of file diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-new-integration-test.yaml b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-new-integration-test.yaml new file mode 100644 index 00000000..e840fcbd --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-new-integration-test.yaml @@ -0,0 +1,27 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- project: + name: 'win-geode-native-CLI-New-Integration-Test' + test-type: 'CLINewIntTest' + build-executor: 'apache-geode-native-win-cli-new-integration-test-macro' + + jobs: + - 'win-geode-native-{test-type}' diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-old-integration-test.yaml b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-old-integration-test.yaml new file mode 100644 index 00000000..0bd05638 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-old-integration-test.yaml @@ -0,0 +1,27 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- project: + name: 'win-geode-native-CLI-Old-Integration-Test' + test-type: 'CLIOldIntTest' + build-executor: 'apache-geode-native-win-cli-old-integration-test-macro' + + jobs: + - 'win-geode-native-{test-type}' diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-unit-test.yaml b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-unit-test.yaml new file mode 100644 index 00000000..da18447f --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-cli-unit-test.yaml @@ -0,0 +1,27 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- project: + name: 'win-geode-native-CLI-Unit-Test' + test-type: 'CLIUnitTest' + build-executor: 'apache-geode-native-win-cli-unit-test-macro' + + jobs: + - 'win-geode-native-{test-type}' diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-new-integration-test.yaml b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-new-integration-test.yaml new file mode 100644 index 00000000..25cddb83 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-new-integration-test.yaml @@ -0,0 +1,27 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- project: + name: 'win-geode-native-New-Integration-Test' + test-type: 'NewIntTest' + build-executor: 'apache-geode-native-win-new-integration-test-macro' + + jobs: + - 'win-geode-native-{test-type}' diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-old-integration-test.yaml b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-old-integration-test.yaml new file mode 100644 index 00000000..997e7e69 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-old-integration-test.yaml @@ -0,0 +1,27 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- project: + name: 'win-geode-native-Old-Integration-Test' + test-type: 'OldIntTest' + build-executor: 'apache-geode-native-win-old-integration-test-macro' + + jobs: + - 'win-geode-native-{test-type}' diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-unit-test.yaml b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-unit-test.yaml new file mode 100644 index 00000000..1ddc0b29 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/apache-geode-native-win-unit-test.yaml @@ -0,0 +1,27 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +- project: + name: 'win-geode-native-Unit-Test' + test-type: 'UnitTest' + build-executor: 'apache-geode-native-win-unit-test-macro' + + jobs: + - 'win-geode-native-{test-type}' diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-new-integration-test.ps1 b/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-new-integration-test.ps1 new file mode 100644 index 00000000..a331ef0e --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-new-integration-test.ps1 @@ -0,0 +1,29 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +$env:GEODE_HOME = "${ENV:GEODE_SERVER_PATH}\apache-geode-${ENV:GEODE_SERVER_VERSION}" + +Write-Host "`n*** Generate Visual Studio 2019 geode-natvie project ***`n" +cmake -B geode-native-build -G "Visual Studio 16 2019" -T"host=x64,version=${ENV:MSVC_TOOLSET_VERSION}" geode-native + +Write-Host "`n*** Build the CLI New Integration tests ***`n" +cmake --build geode-native-build --target javaobject -- /m +cmake --build geode-native-build --target Apache.Geode.IntegrationTests2 -- /m + +Write-Host "`n*** Execute CLI New Integration tests ***`n" +geode-native-build\clicache\packages\xunit.runner.console.2.4.0\tools\net47\xunit.console.exe geode-native-build\clicache\integration-test2\Debug\Apache.Geode.IntegrationTests2.dll -parallel all -verbose diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-old-integration-test.ps1 b/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-old-integration-test.ps1 new file mode 100644 index 00000000..696da8d1 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-old-integration-test.ps1 @@ -0,0 +1,30 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +$env:GEODE_HOME = "${ENV:GEODE_SERVER_PATH}\apache-geode-${ENV:GEODE_SERVER_VERSION}" + +Write-Host "`n*** Generate Visual Studio 2019 geode-natvie project ***`n" +cmake -B geode-native-build -G "Visual Studio 16 2019" -T"host=x64,version=${ENV:MSVC_TOOLSET_VERSION}" geode-native + +Write-Host "`n*** Build the CLI Old Integration tests ***`n" +cmake --build geode-native-build --target javaobject -- /m +cmake --build geode-native-build --target UnitTests -- /m + +Write-Host "`n*** Execute CLI Old Integration tests ***`n" +Push-Location geode-native-build\clicache\integration-test\ +ctest --timeout 2000 -L STABLE -C Debug -j1 --output-on-failure --schedule-random --repeat until-pass:3 \ No newline at end of file diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-unit-test.ps1 b/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-unit-test.ps1 new file mode 100644 index 00000000..1948b148 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/win-cli-unit-test.ps1 @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +$env:GEODE_HOME = "${ENV:GEODE_SERVER_PATH}\apache-geode-${ENV:GEODE_SERVER_VERSION}" + +Write-Host "`n*** Generate Visual Studio 2019 geode-natvie project ***`n" +cmake -B geode-native-build -G "Visual Studio 16 2019" -T"host=x64,version=${ENV:MSVC_TOOLSET_VERSION}" geode-native + +Write-Host "`n*** Build the CLI unit tests ***`n" +cmake --build geode-native-build --target Apache.Geode.Tests2 -- /m + +Write-Host "`n*** Execute CLI unit tests ***`n" +geode-native-build\clicache\packages\xunit.runner.console.2.4.0\tools\net47\xunit.console.exe geode-native-build\clicache\test2\Debug\Apache.Geode.Tests2.dll -parallel all -verbose diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/win-new-integration-test.ps1 b/jjb/geode-native-win/apache-geode-native-win-tests/win-new-integration-test.ps1 new file mode 100644 index 00000000..cec92f90 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/win-new-integration-test.ps1 @@ -0,0 +1,30 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +$env:GEODE_HOME = "${ENV:GEODE_SERVER_PATH}\apache-geode-${ENV:GEODE_SERVER_VERSION}" + +Write-Host "`n*** Generate Visual Studio 2019 geode-natvie project ***`n" +cmake -B geode-native-build -G "Visual Studio 16 2019" -T"host=x64,version=${ENV:MSVC_TOOLSET_VERSION}" geode-native + +Write-Host "`n**** Build New Integration tests ****`n" +#cmake --build geode-native-build --target cpp-integration-test -- /m +cmake --build geode-native-build --target cpp-integration-test -- /m + +Write-Host "`n**** Execute New Integration tests ****`n" +Push-Location geode-native-build\cppcache\integration\test\ +ctest -E BasicIPv6Test -j1 --output-on-failure --schedule-random --repeat until-pass:3 \ No newline at end of file diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/win-old-integration-test.ps1 b/jjb/geode-native-win/apache-geode-native-win-tests/win-old-integration-test.ps1 new file mode 100644 index 00000000..f0cbdb4c --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/win-old-integration-test.ps1 @@ -0,0 +1,31 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +$env:GEODE_HOME = "${ENV:GEODE_SERVER_PATH}\apache-geode-${ENV:GEODE_SERVER_VERSION}" + +Write-Host "`n*** Generate Visual Studio 2019 geode-natvie project ***`n" +cmake -B geode-native-build -G "Visual Studio 16 2019" -T"host=x64,version=${ENV:MSVC_TOOLSET_VERSION}" geode-native + +Write-Host "`n**** Build Old Integration tests ****`n" +cmake --build geode-native-build --target javaobject -- /m +cmake --build geode-native-build --target unit_test_callbacks -- /m +cmake --build geode-native-build --target cppcache-integration-tests -- /m + +Write-Host "`n**** Execute Old Integration tests ****`n" +Push-Location geode-native-build\cppcache\integration-test\ +ctest --timeout 1000 -L STABLE -C Debug -j1 --output-on-failure --schedule-random --repeat until-pass:3 \ No newline at end of file diff --git a/jjb/geode-native-win/apache-geode-native-win-tests/win-unit-test.ps1 b/jjb/geode-native-win/apache-geode-native-win-tests/win-unit-test.ps1 new file mode 100644 index 00000000..d055f794 --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-tests/win-unit-test.ps1 @@ -0,0 +1,28 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +$env:GEODE_HOME = "${ENV:GEODE_SERVER_PATH}\apache-geode-${ENV:GEODE_SERVER_VERSION}" + +Write-Host "`n*** Generate Visual Studio 2019 geode-natvie project ***`n" +cmake -B geode-native-build -G "Visual Studio 16 2019" -T"host=x64,version=${ENV:MSVC_TOOLSET_VERSION}" geode-native + +Write-Host "`n*** Build the unit tests ***`n" +cmake --build geode-native-build --target apache-geode_unittests -- /m + +Write-Host "`n*** Execute unit tests ***`n" +geode-native-build\cppcache\test\Debug\apache-geode_unittests.exe --gtest_shuffle \ No newline at end of file diff --git a/jjb/geode-native-win/apache-geode-native-win-verify.yaml b/jjb/geode-native-win/apache-geode-native-win-verify.yaml new file mode 100644 index 00000000..57a9551a --- /dev/null +++ b/jjb/geode-native-win/apache-geode-native-win-verify.yaml @@ -0,0 +1,145 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +- project: + name: 'apache-geode-native-windows-verify' + project: 'Nordix/geode-native' + + stream: + - 'release-nordix-1.13.0': + branch: 'release-nordix/1.13.0' + jobs: + - 'win-geode-native-{stream}-verify' + +- job-template: + name: 'win-geode-native-{stream}-verify' + project-type: multijob + disabled: false + concurrent: true + node: geode-windows2019 + + parameters: + - string: + name: PROJECT + default: '{project}' + description: JJB configured PROJECT parameter to identify a Nordix GitHub project + - string: + name: BRANCH + default: '{branch}' + description: JJB configured BRANCH parameter for Nordix GitHub project + - string: + name: GEODE_SERVER_VERSION + default: '1.13.1' + description: Version of Geode Server required to test geode-native client on Windows + - string: + name: NUNIT_VERSION + default: '2.6.4' + description: Version of NUnit .Net test framework for geode-native tests on Windows + - string: + name: DOTNET_VERSION + default: '4.5.2' + description: Version of .NET Framework development platform for geode-native on Windows + - string: + name: DOGTAIL_DOTNET_VERSION + default: '3.5sp1' + description: Version of Dogtail .NET Framework development platform for geode-native on Windows + - string: + name: MSVC_TOOLSET_VERSION + default: '14.25' + description: MS Visual Studio build toolset version + - string: + name: GEODE_SERVER_PATH + default: 'C:\GeodeServer' + description: Location of Geode Server on the Windows test instance + + + properties: + - logrotate + - github: + url: 'https://github.com/Nordix/geode-native.git/' + - throttle: + max-per-node: 1 + max-total: 3 + option: project + + scm: + - git-scm-github: + branch: '$BRANCH' + refspec: '' + wipe_workspace: true + clean_before: false + base_dir: 'geode-native' + + triggers: + - github + + builders: + - multijob: + name: WinSlaveSetup + condition: SUCCESSFUL + execution-type: SEQUENTIALLY + projects: + - name: 'win-geode-native-SlaveSetup' + current-parameters: true + git-revision: false + abort-all-job: true + node-parameters: true + - multijob: + name: Verification + condition: SUCCESSFUL + execution-type: SEQUENTIALLY + projects: + - name: 'win-geode-native-UnitTest' + current-parameters: true + git-revision: true + abort-all-job: false + node-parameters: true + - name: 'win-geode-native-NewIntTest' + current-parameters: true + git-revision: true + abort-all-job: false + node-parameters: true + - name: 'win-geode-native-OldIntTest' + current-parameters: true + git-revision: true + abort-all-job: false + node-parameters: true + - name: 'win-geode-native-CLIUnitTest' + current-parameters: true + git-revision: true + abort-all-job: false + node-parameters: true + - name: 'win-geode-native-CLINewIntTest' + current-parameters: true + git-revision: true + abort-all-job: false + node-parameters: true + - name: 'win-geode-native-CLIOldIntTest' + current-parameters: true + git-revision: true + abort-all-job: false + node-parameters: true + + publishers: + - notify-slack: + slack-channel: '#geode-ci' + notify-start: true + notify-success: true + notify-failure: true + notify-back-to-normal: true \ No newline at end of file diff --git a/jjb/geode-native-win/global-template-apache-geode-native-win-tests.yaml b/jjb/geode-native-win/global-template-apache-geode-native-win-tests.yaml new file mode 100644 index 00000000..cd63d2b7 --- /dev/null +++ b/jjb/geode-native-win/global-template-apache-geode-native-win-tests.yaml @@ -0,0 +1,78 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2018-2020 Nordix Foundation. +# ================================================================================ +# Licensed 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +- job-template: + name: 'win-geode-native-{test-type}' + + node: geode-windows2019 + disabled: false + concurrent: true + + properties: + - logrotate + - github: + url: 'https://github.com/Nordix/geode-native.git/' + + parameters: + - string: + name: PROJECT + default: 'Nordix/geode-native' + description: JJB configured PROJECT parameter to identify a Nordix GitHub project + - string: + name: BRANCH + default: 'release-nordix/1.13.0' + description: JJB configured BRANCH parameter for Nordix GitHub project + - string: + name: GEODE_SERVER_VERSION + default: '1.13.1' + description: Version of Geode Server required to test geode-native client on Windows + - string: + name: GEODE_SERVER_PATH + default: 'C:\GeodeServer' + description: Location of Geode Server on the Windows test instance + - string: + name: MSVC_TOOLSET_VERSION + default: '14.25' + description: MS Visual Studio build toolset version + + scm: + - git-scm-github: + branch: '$BRANCH' + refspec: '' + wipe_workspace: true + clean_before: false + base_dir: 'geode-native' + + wrappers: + - workspace-cleanup: + disable-deferred-wipeout: true + + builders: + - '{build-executor}' + + publishers: + - workspace-cleanup: + clean-if: + - failure: false + - notify-slack: + slack-channel: '#geode-ci' + notify-start: true + notify-success: true + notify-failure: true + notify-back-to-normal: true -- 2.25.1