Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 1 | @rem Copyright 2016, Google Inc. |
| 2 | @rem All rights reserved. |
| 3 | @rem |
| 4 | @rem Redistribution and use in source and binary forms, with or without |
| 5 | @rem modification, are permitted provided that the following conditions are |
| 6 | @rem met: |
| 7 | @rem |
| 8 | @rem * Redistributions of source code must retain the above copyright |
| 9 | @rem notice, this list of conditions and the following disclaimer. |
| 10 | @rem * Redistributions in binary form must reproduce the above |
| 11 | @rem copyright notice, this list of conditions and the following disclaimer |
| 12 | @rem in the documentation and/or other materials provided with the |
| 13 | @rem distribution. |
| 14 | @rem * Neither the name of Google Inc. nor the names of its |
| 15 | @rem contributors may be used to endorse or promote products derived from |
| 16 | @rem this software without specific prior written permission. |
| 17 | @rem |
| 18 | @rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 | @rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 | @rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 | @rem A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 | @rem OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 | @rem SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 | @rem LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 | @rem DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 | @rem THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 | @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 | @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | |
Jan Tattermusch | 38ed2cf | 2016-04-09 16:24:16 -0700 | [diff] [blame] | 30 | @rem Runs C# tests for given assembly from command line. The Grpc.sln solution needs to be built before running the tests. |
| 31 | |
| 32 | setlocal |
| 33 | |
Jan Tattermusch | 67306da | 2016-04-09 16:52:38 -0700 | [diff] [blame] | 34 | if not "%CONFIG%" == "gcov" ( |
| 35 | goto :EOF |
| 36 | ) |
| 37 | |
Jan Tattermusch | 38ed2cf | 2016-04-09 16:24:16 -0700 | [diff] [blame] | 38 | @rem enter src/csharp directory |
| 39 | cd /d %~dp0\..\..\src\csharp |
| 40 | |
| 41 | @rem Generate code coverage report |
| 42 | @rem TODO(jtattermusch): currently the report list is hardcoded |
| 43 | packages\ReportGenerator.2.4.4.0\tools\ReportGenerator.exe -reports:"coverage_csharp_*.xml" -targetdir:"..\..\reports\csharp_coverage" -reporttypes:"Html;TextSummary" || goto :error |
| 44 | |
| 45 | @rem Generate the index.html file |
| 46 | echo ^<html^>^<head^>^</head^>^<body^>^<a href='csharp_coverage/index.htm'^>csharp coverage^</a^>^<br/^>^</body^>^</html^> >..\..\reports\index.html |
| 47 | |
| 48 | endlocal |
| 49 | |
| 50 | goto :EOF |
| 51 | |
| 52 | :error |
| 53 | echo Failed! |
| 54 | exit /b %errorlevel% |