Skip to content
Snippets Groups Projects
Commit 50a43248 authored by Michael Lumish's avatar Michael Lumish
Browse files

Merge pull request #1361 from jtattermusch/run_tests_fixes

Improve C# support in run_tests.py and run C# on Travis.
parents 924ef9a0 e79e2f54
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,19 @@ language: cpp
before_install:
- sudo add-apt-repository ppa:yjwong/gflags -y
- sudo add-apt-repository ppa:h-rayflood/llvm -y
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
- echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
- sudo apt-get update -qq
- sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv clang-3.5
- sudo pip install cpp-coveralls mako simplejson
- sudo apt-get install -qq mono-devel nunit
- wget www.nuget.org/NuGet.exe -O nuget.exe
env:
global:
- RUBY_VERSION=2.1
- COVERALLS_PARALLEL=true
- NUGET="mono nuget.exe"
matrix:
- CONFIG=opt TEST=sanity
- CONFIG=dbg TEST=c
......@@ -18,6 +24,7 @@ env:
- CONFIG=opt TEST=node
- CONFIG=opt TEST=ruby
- CONFIG=opt TEST=python
- CONFIG=opt TEST=csharp
- CONFIG=gcov TEST=c
- CONFIG=gcov TEST=c++
- USE_GCC=4.4 CONFIG=opt TEST=build
......
......@@ -30,9 +30,21 @@
set -ex
if [ "$CONFIG" = "dbg" ]
then
MSBUILD_CONFIG="Debug"
else
MSBUILD_CONFIG="Release"
fi
# change to gRPC repo root
cd $(dirname $0)/../..
root=`pwd`
xbuild src/csharp/Grpc.sln
if [ -n "$NUGET" ]
then
$NUGET restore src/csharp/Grpc.sln
fi
xbuild /p:Configuration=$MSBUILD_CONFIG src/csharp/Grpc.sln
......@@ -30,17 +30,22 @@
set -ex
CONFIG=${CONFIG:-opt}
if [ "$CONFIG" = "dbg" ]
then
MSBUILD_CONFIG="Debug"
else
MSBUILD_CONFIG="Release"
fi
# change to gRPC repo root
cd $(dirname $0)/../..
root=`pwd`
cd src/csharp
# TODO: All the tests run pretty fast. In the future, we might need to teach
# run_tests.py about separate tests to make them run in parallel.
for assembly_name in Grpc.Core.Tests Grpc.Examples.Tests Grpc.IntegrationTesting
do
LD_LIBRARY_PATH=$root/libs/dbg nunit-console -labels $assembly_name/bin/Debug/$assembly_name.dll
done
export LD_LIBRARY_PATH=$root/libs/$CONFIG
nunit-console -labels "$1/bin/$MSBUILD_CONFIG/$1.dll"
......@@ -61,7 +61,7 @@ class SimpleConfig(object):
self.environ = environ
self.environ['CONFIG'] = config
def job_spec(self, cmdline, hash_targets):
def job_spec(self, cmdline, hash_targets, shortname=None):
"""Construct a jobset.JobSpec for a test under this config
Args:
......@@ -74,6 +74,7 @@ class SimpleConfig(object):
be listed
"""
return jobset.JobSpec(cmdline=cmdline,
shortname=shortname,
environ=self.environ,
hash_targets=hash_targets
if self.allow_hashing else None)
......@@ -218,9 +219,13 @@ class RubyLanguage(object):
class CSharpLanguage(object):
def test_specs(self, config, travis):
return [config.job_spec('tools/run_tests/run_csharp.sh', None)]
assemblies = ['Grpc.Core.Tests',
'Grpc.Examples.Tests',
'Grpc.IntegrationTesting']
return [config.job_spec(['tools/run_tests/run_csharp.sh', assembly],
None, shortname=assembly)
for assembly in assemblies ]
def make_targets(self):
return ['grpc_csharp_ext']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment