有没有办法获取裤子代码覆盖率结果?
Is there a way to grab pants code coverage results?
我想查看脚本中代码覆盖率的结果,然后决定用户是否可以继续。裤子有这个功能吗?除了将其通过管道传输到外部文件并进行解析之外,还有其他方法可以做到这一点吗?
现在它会将所有内容打印到标准输出,这对于我正在尝试做的事情来说并不是最好的。最重要的是,当我通过管道传输到另一个文件时,我没有得到实际的代码覆盖率,只是编译裤完成了它,就像这样
09:55:36 00:00 [main]
(To run a reporting server: ./pants server)
09:55:36 00:00 [setup]
09:55:37 00:01 [parse]
Executing tasks in goals: bootstrap -> imports -> unpack-jars -> jvm-platform-validate -> deferred-sources -> gen -> resolve -> resources -> pyprep -> compile -> test
09:55:37 00:01 [bootstrap]
09:55:37 00:01 [substitute-aliased-targets]
09:55:37 00:01 [jar-dependency-management]
09:55:37 00:01 [bootstrap-jvm-tools]
09:55:37 00:01 [provide-tools-jar]
09:55:37 00:01 [imports]
09:55:37 00:01 [ivy-imports]
09:55:37 00:01 [unpack-jars]
09:55:37 00:01 [unpack-jars]
09:55:37 00:01 [jvm-platform-validate]
09:55:37 00:01 [jvm-platform-validate]
09:55:37 00:01 [deferred-sources]
09:55:37 00:01 [deferred-sources]
09:55:37 00:01 [gen]
09:55:37 00:01 [antlr-java]
09:55:37 00:01 [antlr-py]
09:55:37 00:01 [jaxb]
09:55:37 00:01 [protoc]
09:55:37 00:01 [ragel]
09:55:37 00:01 [thrift-java]
09:55:37 00:01 [thrift-py]
09:55:37 00:01 [wire]
09:55:37 00:01 [go-thrift]
09:55:37 00:01 [resolve]
09:55:37 00:01 [ivy]
09:55:37 00:01 [coursier]
09:55:37 00:01 [go]
09:55:37 00:01 [resources]
09:55:37 00:01 [prepare]
09:55:37 00:01 [services]
09:55:37 00:01 [pyprep]
09:55:37 00:01 [interpreter]
09:55:37 00:01 [build-local-dists]
09:55:37 00:01 [requirements]
09:55:37 00:01 [sources]
09:55:37 00:01 [compile]
09:55:37 00:01 [compile-jvm-prep-command]
09:55:37 00:01 [jvm_prep_command]
09:55:37 00:01 [compile-prep-command]
09:55:37 00:01 [compile]
09:55:37 00:01 [zinc]
09:55:37 00:01 [jvm-dep-check]
09:55:37 00:01 [go]
09:55:37 00:01 [test]
09:55:37 00:01 [test-jvm-prep-command]
09:55:37 00:01 [jvm_prep_command]
09:55:37 00:01 [test-prep-command]
09:55:37 00:01 [test]
09:55:37 00:01 [pytest-prep]
09:55:38 00:02 [pytest]
tests/python/pom_manager:all ..... SUCCESS
tests/python/pom_manager:pom_util_test ..... SUCCESS
tests/python/pom_manager:pom_manager_test ..... SUCCESS
tests/python/pom_manager:pom_worker_test ..... SUCCESS
tests/python/pom_manager:pom_validator_test ..... SUCCESS
tests/python/pom_manager:lc_util_test ..... SUCCESS
09:55:38 00:02 [junit]
09:55:38 00:02 [go]
Waiting for background workers to finish.
09:55:38 00:02 [complete]
SUCCESS
对于后来遇到这个问题的任何人,我发现裤子存储了一个 html 文件,其中包含所有代码覆盖率,很容易解析。
我想查看脚本中代码覆盖率的结果,然后决定用户是否可以继续。裤子有这个功能吗?除了将其通过管道传输到外部文件并进行解析之外,还有其他方法可以做到这一点吗?
现在它会将所有内容打印到标准输出,这对于我正在尝试做的事情来说并不是最好的。最重要的是,当我通过管道传输到另一个文件时,我没有得到实际的代码覆盖率,只是编译裤完成了它,就像这样
09:55:36 00:00 [main]
(To run a reporting server: ./pants server)
09:55:36 00:00 [setup]
09:55:37 00:01 [parse]
Executing tasks in goals: bootstrap -> imports -> unpack-jars -> jvm-platform-validate -> deferred-sources -> gen -> resolve -> resources -> pyprep -> compile -> test
09:55:37 00:01 [bootstrap]
09:55:37 00:01 [substitute-aliased-targets]
09:55:37 00:01 [jar-dependency-management]
09:55:37 00:01 [bootstrap-jvm-tools]
09:55:37 00:01 [provide-tools-jar]
09:55:37 00:01 [imports]
09:55:37 00:01 [ivy-imports]
09:55:37 00:01 [unpack-jars]
09:55:37 00:01 [unpack-jars]
09:55:37 00:01 [jvm-platform-validate]
09:55:37 00:01 [jvm-platform-validate]
09:55:37 00:01 [deferred-sources]
09:55:37 00:01 [deferred-sources]
09:55:37 00:01 [gen]
09:55:37 00:01 [antlr-java]
09:55:37 00:01 [antlr-py]
09:55:37 00:01 [jaxb]
09:55:37 00:01 [protoc]
09:55:37 00:01 [ragel]
09:55:37 00:01 [thrift-java]
09:55:37 00:01 [thrift-py]
09:55:37 00:01 [wire]
09:55:37 00:01 [go-thrift]
09:55:37 00:01 [resolve]
09:55:37 00:01 [ivy]
09:55:37 00:01 [coursier]
09:55:37 00:01 [go]
09:55:37 00:01 [resources]
09:55:37 00:01 [prepare]
09:55:37 00:01 [services]
09:55:37 00:01 [pyprep]
09:55:37 00:01 [interpreter]
09:55:37 00:01 [build-local-dists]
09:55:37 00:01 [requirements]
09:55:37 00:01 [sources]
09:55:37 00:01 [compile]
09:55:37 00:01 [compile-jvm-prep-command]
09:55:37 00:01 [jvm_prep_command]
09:55:37 00:01 [compile-prep-command]
09:55:37 00:01 [compile]
09:55:37 00:01 [zinc]
09:55:37 00:01 [jvm-dep-check]
09:55:37 00:01 [go]
09:55:37 00:01 [test]
09:55:37 00:01 [test-jvm-prep-command]
09:55:37 00:01 [jvm_prep_command]
09:55:37 00:01 [test-prep-command]
09:55:37 00:01 [test]
09:55:37 00:01 [pytest-prep]
09:55:38 00:02 [pytest]
tests/python/pom_manager:all ..... SUCCESS
tests/python/pom_manager:pom_util_test ..... SUCCESS
tests/python/pom_manager:pom_manager_test ..... SUCCESS
tests/python/pom_manager:pom_worker_test ..... SUCCESS
tests/python/pom_manager:pom_validator_test ..... SUCCESS
tests/python/pom_manager:lc_util_test ..... SUCCESS
09:55:38 00:02 [junit]
09:55:38 00:02 [go]
Waiting for background workers to finish.
09:55:38 00:02 [complete]
SUCCESS
对于后来遇到这个问题的任何人,我发现裤子存储了一个 html 文件,其中包含所有代码覆盖率,很容易解析。