aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-02 12:56:26 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-02 12:56:26 -0700
commit79e11c6d058f397003c6528f5773c067ccb2fcb7 (patch)
tree2d896256242055a95ff63c5f471fb3518759dc03 /tools
parente398fa2b5264d855ea81c160bf84ec5bd3320237 (diff)
parent19fdb33da268b4ded64c64bd7bde7b75714ab0a0 (diff)
Merge github.com:grpc/grpc into we-dont-need-no-backup
Diffstat (limited to 'tools')
-rw-r--r--tools/run_tests/run_csharp.bat16
-rwxr-xr-xtools/run_tests/run_tests.py21
2 files changed, 35 insertions, 2 deletions
diff --git a/tools/run_tests/run_csharp.bat b/tools/run_tests/run_csharp.bat
new file mode 100644
index 0000000000..17c622cc2d
--- /dev/null
+++ b/tools/run_tests/run_csharp.bat
@@ -0,0 +1,16 @@
+@rem Runs C# tests for given assembly from command line. The Grpc.sln solution needs to be built before running the tests.
+
+setlocal
+
+@rem enter this directory
+cd /d %~dp0\..\..\src\csharp
+
+packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe -labels "%1/bin/Debug/%1.dll" || goto :error
+
+endlocal
+
+goto :EOF
+
+:error
+echo Failed!
+exit /b %errorlevel%
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index cb50e38ca1..74a0c6cea8 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -234,20 +234,36 @@ class RubyLanguage(object):
class CSharpLanguage(object):
+ def __init__(self):
+ if platform.system() == 'Windows':
+ plat = 'windows'
+ else:
+ plat = 'posix'
+ self.platform = plat
+
def test_specs(self, config, travis):
assemblies = ['Grpc.Core.Tests',
'Grpc.Examples.Tests',
'Grpc.IntegrationTesting']
- return [config.job_spec(['tools/run_tests/run_csharp.sh', assembly],
+ if self.platform == 'windows':
+ cmd = 'tools\\run_tests\\run_csharp.bat'
+ else:
+ cmd = 'tools/run_tests/run_csharp.sh'
+ return [config.job_spec([cmd, assembly],
None, shortname=assembly,
environ={'GRPC_TRACE': 'surface,batch'})
for assembly in assemblies ]
def make_targets(self):
+ # For Windows, this target doesn't really build anything,
+ # everything is build by buildall script later.
return ['grpc_csharp_ext']
def build_steps(self):
- return [['tools/run_tests/build_csharp.sh']]
+ if self.platform == 'windows':
+ return [['src\\csharp\\buildall.bat']]
+ else:
+ return [['tools/run_tests/build_csharp.sh']]
def supports_multi_config(self):
return False
@@ -346,6 +362,7 @@ def runs_per_test_type(arg_str):
try:
n = int(arg_str)
if n <= 0: raise ValueError
+ return n
except:
msg = "'{}' isn't a positive integer or 'inf'".format(arg_str)
raise argparse.ArgumentTypeError(msg)