post_tests_csharp.bat 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. @rem Copyright 2016 gRPC authors.
  2. @rem
  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
  6. @rem
  7. @rem http://www.apache.org/licenses/LICENSE-2.0
  8. @rem
  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.
  14. @rem Runs C# tests for given assembly from command line. The Grpc.sln solution needs to be built before running the tests.
  15. setlocal
  16. if not "%CONFIG%" == "gcov" (
  17. goto :EOF
  18. )
  19. @rem enter src/csharp directory
  20. cd /d %~dp0\..\..\..\src\csharp
  21. @rem Generate code coverage report
  22. @rem TODO(jtattermusch): currently the report list is hardcoded
  23. packages\ReportGenerator.2.4.4.0\tools\ReportGenerator.exe -reports:"coverage_csharp_*.xml" -targetdir:"..\..\reports\csharp_coverage" -reporttypes:"Html;TextSummary" || goto :error
  24. @rem Generate the index.html file
  25. echo ^<html^>^<head^>^</head^>^<body^>^<a href='csharp_coverage/index.htm'^>csharp coverage^</a^>^<br/^>^</body^>^</html^> >..\..\reports\index.html
  26. endlocal
  27. goto :EOF
  28. :error
  29. echo Failed!
  30. exit /b %errorlevel%