python - hudson "Source code is unavailable."

标签 python continuous-integration hudson code-coverage cobertura

我正在使用 Hudson 持续构建一个 Python 项目。单元测试和代码覆盖效果很好,但是当针对我的不是单元测试的文件深入Cobertura Coverage Report时会出现此消息:

Source code is unavailable.Some possible reasons are:

* This is not the most recent build (to save on disk space, this plugin only keeps the most recent builds source code).
* Cobertura found the source code but did not provide enough information to locate the source code.
* Cobertura could not find the source code, so this plugin has no hope of finding it.

奇怪的是找到并显示了单元测试的源代码。我尝试手动将其他 .py 文件的源文件复制到 ~/.hudson/jobs/<projectname>/cobertura 中(单元测试被复制的地方),但它没有用。

有什么建议吗?

最佳答案

Cobertura 报告文件(此时位于 $HUDSON/jobs/foo/workspace 中的某处)需要在开头包含如下内容:

<sources>
  <source>/path/to/source</source>
  <source>/another/path</source>
</sources>

它有吗?路径是否指向正确的位置?

另一个陷阱:当它说“最近的构建”时,它实际上意味着“最近的稳定构建”(即状态球是蓝色的,而不是黄色)。

关于python - hudson "Source code is unavailable.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2285672/

相关文章:

python - 用 Python 读取 JSON

python - 如何立即删除特定用户的消息?

python - 如何在试运行中运行 boto3 运行作业流程

node.js - CI/CD 的 Gitlab ssh 配置

java - Hudson 和 maven-release-plugin

python - 用于匹配 URL 和失败的非 URL 的正则表达式

linux - 如何将 bamboo 变量从 Bamboo 脚本发送到 docker 容器?

java - 使用 Hudson 在 Eclipse 中编译 Google Web Toolkit 项目

hudson - 如何在Hudson中集成Parasoft(JTest)?

Java Profiler 报告 Hudson