aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2017-04-11 17:24:04 +0200
committerGravatar GitHub <noreply@github.com>2017-04-11 17:24:04 +0200
commit498e2b350aec3d358b3ec505fa800194778cd8e4 (patch)
tree4515f51d65fc3c8d6132dffee3c4eae677428eb8 /tools/run_tests
parent830cfd4c585f9441f40f0f791ef41ad6fdbf8c3e (diff)
parent78cb931afd9bf4ae33ecaf26dbd498cff41d6b52 (diff)
Merge pull request #10480 from jtattermusch/csharp_new_projects
C# new .csproj projects
Diffstat (limited to 'tools/run_tests')
-rw-r--r--tools/run_tests/helper_scripts/build_csharp.bat (renamed from tools/run_tests/helper_scripts/build_csharp_coreclr.bat)4
-rwxr-xr-xtools/run_tests/helper_scripts/build_csharp.sh9
-rwxr-xr-xtools/run_tests/helper_scripts/build_csharp_coreclr.sh38
-rw-r--r--tools/run_tests/helper_scripts/pre_build_csharp.bat50
-rwxr-xr-xtools/run_tests/helper_scripts/pre_build_csharp.sh45
-rwxr-xr-xtools/run_tests/run_interop_tests.py4
-rwxr-xr-xtools/run_tests/run_tests.py25
7 files changed, 20 insertions, 155 deletions
diff --git a/tools/run_tests/helper_scripts/build_csharp_coreclr.bat b/tools/run_tests/helper_scripts/build_csharp.bat
index 78e5f5998b..05ea78564c 100644
--- a/tools/run_tests/helper_scripts/build_csharp_coreclr.bat
+++ b/tools/run_tests/helper_scripts/build_csharp.bat
@@ -31,9 +31,7 @@ setlocal
cd /d %~dp0\..\..\..\src\csharp
-dotnet restore . || goto :error
-
-dotnet build --configuration %MSBUILD_CONFIG% "**/project.json" || goto :error
+dotnet build --configuration %MSBUILD_CONFIG% Grpc.sln || goto :error
endlocal
diff --git a/tools/run_tests/helper_scripts/build_csharp.sh b/tools/run_tests/helper_scripts/build_csharp.sh
index 84c5b1c777..a7562a7f4a 100755
--- a/tools/run_tests/helper_scripts/build_csharp.sh
+++ b/tools/run_tests/helper_scripts/build_csharp.sh
@@ -32,5 +32,10 @@ set -ex
cd $(dirname $0)/../../../src/csharp
-# overriding NativeDependenciesConfigurationUnix is needed to make gcov code coverage work.
-xbuild /p:Configuration=$MSBUILD_CONFIG /p:NativeDependenciesConfigurationUnix=$CONFIG Grpc.sln
+if [ "$CONFIG" == "gcov" ]
+then
+ # overriding NativeDependenciesConfigurationUnix makes C# project pick up the gcov flavor of grpc_csharp_ext
+ dotnet build --configuration $MSBUILD_CONFIG /p:NativeDependenciesConfigurationUnix=gcov Grpc.sln
+else
+ dotnet build --configuration $MSBUILD_CONFIG Grpc.sln
+fi
diff --git a/tools/run_tests/helper_scripts/build_csharp_coreclr.sh b/tools/run_tests/helper_scripts/build_csharp_coreclr.sh
deleted file mode 100755
index dd5fd31c75..0000000000
--- a/tools/run_tests/helper_scripts/build_csharp_coreclr.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-set -ex
-
-cd $(dirname $0)/../../../src/csharp
-
-# TODO(jtattermusch): introduce caching
-dotnet restore .
-
-dotnet build --configuration $MSBUILD_CONFIG '**/project.json'
diff --git a/tools/run_tests/helper_scripts/pre_build_csharp.bat b/tools/run_tests/helper_scripts/pre_build_csharp.bat
index bee430ac86..e59dac4edc 100644
--- a/tools/run_tests/helper_scripts/pre_build_csharp.bat
+++ b/tools/run_tests/helper_scripts/pre_build_csharp.bat
@@ -44,56 +44,10 @@ mkdir %ARCHITECTURE%
cd %ARCHITECTURE%
@rem TODO(jtattermusch): Stop hardcoding path to yasm once Jenkins workers can locate yasm correctly
cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe" ../../.. || goto :error
-cd ..\..\..
-@rem Location of nuget.exe
-set NUGET=C:\nuget\nuget.exe
+cd ..\..\..\src\csharp
-if exist %NUGET% (
- @rem TODO(jtattermusch): Get rid of this hack. See #8034
- @rem Restore Grpc packages by packages since Nuget client 3.4.4 doesnt support restore
- @rem by solution
- @rem Moving into each directory to let the restores work based on per-project packages.config files
-
- cd src/csharp
-
- cd Grpc.Auth || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.Core || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.Core.Tests || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.Examples.MathClient || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.Examples.MathServer || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.Examples || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.HealthCheck.Tests || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.HealthCheck || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
- cd ..
-
- cd Grpc.IntegrationTesting || goto :error
- %NUGET% restore -PackagesDirectory ../packages || goto :error
-
- cd /d %~dp0\..\.. || goto :error
-)
+dotnet restore Grpc.sln || goto :error
endlocal
diff --git a/tools/run_tests/helper_scripts/pre_build_csharp.sh b/tools/run_tests/helper_scripts/pre_build_csharp.sh
index d7665e15af..40be1b6b64 100755
--- a/tools/run_tests/helper_scripts/pre_build_csharp.sh
+++ b/tools/run_tests/helper_scripts/pre_build_csharp.sh
@@ -33,47 +33,4 @@ set -ex
# cd to gRPC csharp directory
cd $(dirname $0)/../../../src/csharp
-root=`pwd`
-
-if [ -x "$(command -v nuget)" ]
-then
- # TODO(jtattermusch): Get rid of this hack. See #8034
- # Restoring Nuget packages by packages rather than by solution because of
- # inability to restore by solution with Nuget client 3.4.4
- # Moving into each directory to let the restores work based on per-project packages.config files
- cd Grpc.Auth
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.Core.Tests
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.Core
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.Examples.MathClient
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.Examples.MathServer
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.Examples
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.HealthCheck.Tests
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.HealthCheck
- nuget restore -PackagesDirectory ../packages
- cd ..
-
- cd Grpc.IntegrationTesting
- nuget restore -PackagesDirectory ../packages
- cd ..
-fi
+dotnet restore Grpc.sln
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index 2d7f4a625d..d2bf529fef 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -114,8 +114,8 @@ class CXXLanguage:
class CSharpLanguage:
def __init__(self):
- self.client_cwd = 'src/csharp/Grpc.IntegrationTesting.Client/bin/Debug'
- self.server_cwd = 'src/csharp/Grpc.IntegrationTesting.Server/bin/Debug'
+ self.client_cwd = 'src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45'
+ self.server_cwd = 'src/csharp/Grpc.IntegrationTesting.Server/bin/Debug/net45'
self.safename = str(self)
def client_cmd(self, args):
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 46411691e6..cfa7071e00 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -752,14 +752,11 @@ class CSharpLanguage(object):
if self.platform == 'windows':
_check_compiler(self.args.compiler, ['coreclr', 'default'])
_check_arch(self.args.arch, ['default'])
- self._cmake_arch_option = 'x64' if self.args.compiler == 'coreclr' else 'Win32'
+ self._cmake_arch_option = 'x64'
self._make_options = []
else:
_check_compiler(self.args.compiler, ['default', 'coreclr'])
- if self.platform == 'linux' and self.args.compiler == 'coreclr':
- self._docker_distro = 'coreclr'
- else:
- self._docker_distro = 'jessie'
+ self._docker_distro = 'jessie'
if self.platform == 'mac':
# TODO(jtattermusch): EMBED_ZLIB=true currently breaks the mac build
@@ -775,7 +772,7 @@ class CSharpLanguage(object):
tests_by_assembly = json.load(f)
msbuild_config = _MSBUILD_CONFIG[self.config.build_config]
- nunit_args = ['--labels=All']
+ nunit_args = ['--labels=All', '--noresult', '--workers=1']
assembly_subdir = 'bin/%s' % msbuild_config
assembly_extension = '.exe'
@@ -784,7 +781,7 @@ class CSharpLanguage(object):
runtime_cmd = ['dotnet', 'exec']
assembly_extension = '.dll'
else:
- nunit_args += ['--noresult', '--workers=1']
+ assembly_subdir += '/net45'
if self.platform == 'windows':
runtime_cmd = []
else:
@@ -836,18 +833,10 @@ class CSharpLanguage(object):
return self._make_options;
def build_steps(self):
- if self.args.compiler == 'coreclr':
- if self.platform == 'windows':
- return [['tools\\run_tests\\helper_scripts\\build_csharp_coreclr.bat']]
- else:
- return [['tools/run_tests/helper_scripts/build_csharp_coreclr.sh']]
+ if self.platform == 'windows':
+ return [['tools\\run_tests\\helper_scripts\\build_csharp.bat']]
else:
- if self.platform == 'windows':
- return [['vsprojects\\build_vs2015.bat',
- 'src/csharp/Grpc.sln',
- '/p:Configuration=%s' % _MSBUILD_CONFIG[self.config.build_config]]]
- else:
- return [['tools/run_tests/helper_scripts/build_csharp.sh']]
+ return [['tools/run_tests/helper_scripts/build_csharp.sh']]
def post_tests_steps(self):
if self.platform == 'windows':