Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | @echo off |
| 2 | rem Coverage report for windows builds |
| 3 | rem |
| 4 | rem First general build |
| 5 | echo Building the source |
| 6 | go build |
| 7 | if ERRORLEVEL 1 GOTO buildFaild |
| 8 | |
| 9 | echo Starting unit test coverage |
| 10 | go test . examples/... generated/... -coverprofile=cp.out |
| 11 | |
| 12 | rem Output HTML coverage report (to coverage.html) |
| 13 | echo Creating HTML coverage report (coverage.html) |
| 14 | go tool cover -html=cp.out |
| 15 | |
| 16 | rem Now show in default browser |
| 17 | echo Launching browser with results |
| 18 | rem start coverage.html |
| 19 | |
| 20 | @echo Done |
| 21 | exit /B 0 |
| 22 | |
| 23 | :buildFailed |
| 24 | @echo Build failed |