Я пытаюсь создать комбинированный отчет о покрытии для моих golang файлов, используя
bazel coverage --combined_report=lcov //...
, но всегда происходит сбой при одном и том же сообщении:
Executed 0 out of 11 tests: 11 tests pass.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
Естественно, я использовал флаг --test_verbose_timeout_warnings
и я получаю ошибку
//pkg/util:go_default_test (cached) PASSED in 4.4s
WARNING: //pkg/util:go_default_test: Test execution time (4.4s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="short" or size="small".
Затем я попробовал его с --nocache_test_results
, но ничем не отличается.
Я пробовал с
bazel coverage --combined_report=lcov --test_size_filters=small //...
Вот что я получаю:
WARNING: All specified test targets were excluded by filters
INFO: Build option --instrumentation_filter has changed, discarding analysis cache.
INFO: Analyzed 52 targets (0 packages loaded, 8254 targets configured).
INFO: Found 52 targets and 0 test targets...
Использование bazel coverage --combined_report=lcov --test_size_filters=small,medium --nocache_test_results //...
результатов в этом
INFO: Using default value for --instrumentation_filter: "//internal[/:],//pkg[/:]".
INFO: Override the above default with --instrumentation_filter
INFO: Build option --instrumentation_filter has changed, discarding analysis cache.
INFO: Analyzed 52 targets (0 packages loaded, 8254 targets configured).
INFO: Found 41 targets and 11 test targets...
INFO: LCOV coverage report is located at /path/to/bazel-out/_coverage/_coverage_report.dat
and execpath is bazel-out/_coverage/_coverage_report.dat
INFO: From CoverageReport _coverage/_coverage_report.dat:
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main getTracefiles
INFORMATION: Found 11 tracefiles.
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/pkg/logger/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/pkg/util/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/company/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/video/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/person/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/db/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/movie/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/game/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/mapper/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/shared/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main parseFiles
SCHWERWIEGEND: Parsing file bazel-out/darwin-fastbuild/testlogs/internal/music/go_default_test/coverage.dat
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main getGcovInfoFiles
INFORMATION: No gcov info file found.
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main getProfdataFileOrNull
INFORMATION: No .profdata file found.
März 31, 2020 11:05:17 VORM. com.google.devtools.coverageoutputgenerator.Main main
WARNUNG: There was no coverage found.
ERROR: output '_coverage/_coverage_report.dat' was not created
ERROR: not all outputs were created or valid
INFO: Elapsed time: 33.842s, Critical Path: 32.39s
INFO: 196 processes: 196 darwin-sandbox.
FAILED: Build did NOT complete successfully
//internal/company:go_default_test PASSED in 5.6s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/company/go_default_test/coverage.dat
//internal/db:go_default_test PASSED in 1.5s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/db/go_default_test/coverage.dat
//internal/game:go_default_test PASSED in 8.5s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/game/go_default_test/coverage.dat
//internal/mapper:go_default_test PASSED in 1.3s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/mapper/go_default_test/coverage.dat
//internal/movie:go_default_test PASSED in 24.8s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/movie/go_default_test/coverage.dat
//internal/music:go_default_test PASSED in 10.0s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/music/go_default_test/coverage.dat
//internal/person:go_default_test PASSED in 6.6s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/person/go_default_test/coverage.dat
//internal/shared:go_default_test PASSED in 3.0s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/shared/go_default_test/coverage.dat
//internal/video:go_default_test PASSED in 8.9s
/path/to/bazel-out/darwin-fastbuild/testlogs/internal/video/go_default_test/coverage.dat
//pkg/logger:go_default_test PASSED in 0.8s
/path/to/bazel-out/darwin-fastbuild/testlogs/pkg/logger/go_default_test/coverage.dat
//pkg/util:go_default_test PASSED in 0.9s
/path/to/bazel-out/darwin-fastbuild/testlogs/pkg/util/go_default_test/coverage.dat
Executed 11 out of 11 tests: 11 tests pass.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
All tests passed but there were other errors during the build.
FAILED: Build did NOT complete successfully
Не получается получить комбинированный отчет о покрытии.