diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-04-08 17:18:44 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-04-11 11:09:21 -0700 |
commit | f6824c2685af5a3c55868dc23293d663b5bcb403 (patch) | |
tree | d3452915a66e9706f770bdf35bd2c372df1e05d3 /tools/run_tests | |
parent | b323608b2717ed617edcebfca9ffb1249045e141 (diff) |
fix run_tests scripts
Diffstat (limited to 'tools/run_tests')
-rw-r--r-- | tools/run_tests/run_csharp.bat | 7 | ||||
-rwxr-xr-x | tools/run_tests/run_csharp.sh | 5 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 15 |
3 files changed, 17 insertions, 10 deletions
diff --git a/tools/run_tests/run_csharp.bat b/tools/run_tests/run_csharp.bat index 29c879e23b..025ec03472 100644 --- a/tools/run_tests/run_csharp.bat +++ b/tools/run_tests/run_csharp.bat @@ -5,12 +5,15 @@ setlocal @rem enter src/csharp directory cd /d %~dp0\..\..\src\csharp +rem nunit3-console fails if nunit.framework.dll is not found. +copy packages\NUnit.3.2.0\lib\net45\nunit.framework.dll packages\NUnit.ConsoleRunner.3.2.0\tools\nunit.framework.dll + if not "%CONFIG%" == "gcov" ( - packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe %* || goto :error + packages\NUnit.ConsoleRunner.3.2.0\tools\nunit3-console.exe %* || goto :error ) else ( @rem Run all tests with code coverage - packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe" -targetdir:"." -targetargs:"%*" -filter:"+[Grpc.Core]*" -register:user -output:coverage_results.xml || goto :error + packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"packages\NUnit.ConsoleRunner.3.2.0\tools\nunit3-console.exe" -targetdir:"." -targetargs:"%*" -filter:"+[Grpc.Core]*" -register:user -output:coverage_results.xml || goto :error packages\ReportGenerator.2.4.4.0\tools\ReportGenerator.exe -reports:"coverage_results.xml" -targetdir:"..\..\reports\csharp_coverage" -reporttypes:"Html;TextSummary" || goto :error diff --git a/tools/run_tests/run_csharp.sh b/tools/run_tests/run_csharp.sh index dad44c4e4f..71cd87411f 100755 --- a/tools/run_tests/run_csharp.sh +++ b/tools/run_tests/run_csharp.sh @@ -31,7 +31,10 @@ set -ex CONFIG=${CONFIG:-opt} -NUNIT_CONSOLE="mono packages/NUnit.Runners.2.6.4/tools/nunit-console.exe" +NUNIT_CONSOLE="mono packages/NUnit.ConsoleRunner.3.2.0/tools/nunit3-console.exe" + +# nunit3-console fails if nunit.framework.dll is not found. +cp -u src/csharp/packages/NUnit.3.2.0/lib/net45/nunit.framework.dll src/csharp/packages/NUnit.ConsoleRunner.3.2.0/tools/ # change to gRPC repo root cd $(dirname $0)/../.. diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index dfac94660b..4f3aaca7ec 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -494,11 +494,16 @@ class CSharpLanguage(object): assembly_files = ['%s/bin/%s/%s.dll' % (a, msbuild_config, a) for a in assemblies] - extra_args = ['-labels'] + assembly_files + # TODO(jtattermusch): use --x86 when needed + + extra_args = ['--labels=All', + '--noresult', + '--workers=1', + '--inprocess'] + assembly_files if self.platform == 'windows': script_name = 'tools\\run_tests\\run_csharp.bat' - extra_args += ['-domain=None'] + extra_args += ['--domain=None'] else: script_name = 'tools/run_tests/run_csharp.sh' @@ -512,11 +517,7 @@ class CSharpLanguage(object): else: specs = [] for test in tests: - cmdline = [script_name, '-run=%s' % test] + extra_args - if self.platform == 'windows': - # use different output directory for each test to prevent - # TestResult.xml clash between parallel test runs. - cmdline += ['-work=test-result/%s' % uuid.uuid4()] + cmdline = [script_name, '--test=%s' % test] + extra_args specs.append(self.config.job_spec(cmdline, None, shortname='csharp.%s' % test, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) |