Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 1 | @rem Copyright 2016 gRPC authors. |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 2 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 3 | @rem Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | @rem you may not use this file except in compliance with the License. |
| 5 | @rem You may obtain a copy of the License at |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 6 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 7 | @rem http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 8 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 9 | @rem Unless required by applicable law or agreed to in writing, software |
| 10 | @rem distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | @rem See the License for the specific language governing permissions and |
| 13 | @rem limitations under the License. |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 14 | |
Jan Tattermusch | 38ed2cf | 2016-04-09 16:24:16 -0700 | [diff] [blame] | 15 | @rem Runs C# tests for given assembly from command line. The Grpc.sln solution needs to be built before running the tests. |
| 16 | |
| 17 | setlocal |
| 18 | |
Jan Tattermusch | 67306da | 2016-04-09 16:52:38 -0700 | [diff] [blame] | 19 | if not "%CONFIG%" == "gcov" ( |
| 20 | goto :EOF |
| 21 | ) |
| 22 | |
Jan Tattermusch | 38ed2cf | 2016-04-09 16:24:16 -0700 | [diff] [blame] | 23 | @rem enter src/csharp directory |
Jan Tattermusch | 5c79a31 | 2016-12-20 11:02:50 +0100 | [diff] [blame] | 24 | cd /d %~dp0\..\..\..\src\csharp |
Jan Tattermusch | 38ed2cf | 2016-04-09 16:24:16 -0700 | [diff] [blame] | 25 | |
| 26 | @rem Generate code coverage report |
| 27 | @rem TODO(jtattermusch): currently the report list is hardcoded |
| 28 | packages\ReportGenerator.2.4.4.0\tools\ReportGenerator.exe -reports:"coverage_csharp_*.xml" -targetdir:"..\..\reports\csharp_coverage" -reporttypes:"Html;TextSummary" || goto :error |
| 29 | |
| 30 | @rem Generate the index.html file |
| 31 | echo ^<html^>^<head^>^</head^>^<body^>^<a href='csharp_coverage/index.htm'^>csharp coverage^</a^>^<br/^>^</body^>^</html^> >..\..\reports\index.html |
| 32 | |
| 33 | endlocal |
| 34 | |
| 35 | goto :EOF |
| 36 | |
| 37 | :error |
| 38 | echo Failed! |
| 39 | exit /b %errorlevel% |