是否可以在 Hudson 运行 GAE 测试?

发布于 2024-10-07 19:47:37 字数 1502 浏览 6 评论 0原文

我有一套使用 nose 调用的 App Engine 测试。当我从终端运行它们时,每个测试都会成功完成,并生成所有报告,例如覆盖率

但是,如果我尝试从 Hudson 调用相同的命令,我会从覆盖范围中得到以下失败信息:

nose.failure.Failure.runTest (from Failure)

Parent module 'coverage' not loaded
-------------------- >> begin captured logging << --------------------
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/NoseGAE-0.1.7-py2.5.egg', '')
root: WARNING: Could not read datastore data from /tmp/nosegae.datastore
root: WARNING: Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named Image
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/gaetestbed-0.12dev_r30-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/WebTest-1.2.1-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/WebOb-0.9.8-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/PyYAML-3.09-py2.5-linux-x86_64.egg', '')
root: DEBUG: Could not import "strop": Disallowed C-extension or built-in module
--------------------- >> end captured logging << ---------------------

但是,如果我删除对覆盖范围的调用,我的测试仍然会失败。

我已成功使用 Hudson 运行 Python 项目。 GAE 有什么细微差别让我困惑吗?

I have a suite of App Engine tests that are called using nose. When I run them from a terminal, every test completes successfully and all reports, like coverage, are generated.

However, if I try to call the same command from Hudson, I get the following failure from coverage:

nose.failure.Failure.runTest (from Failure)

Parent module 'coverage' not loaded
-------------------- >> begin captured logging << --------------------
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/NoseGAE-0.1.7-py2.5.egg', '')
root: WARNING: Could not read datastore data from /tmp/nosegae.datastore
root: WARNING: Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named Image
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/gaetestbed-0.12dev_r30-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/WebTest-1.2.1-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/WebOb-0.9.8-py2.5.egg', '')
root: INFO: zipimporter('/home/wraith/dev/projects/myapp/lib/python2.5/site-packages/PyYAML-3.09-py2.5-linux-x86_64.egg', '')
root: DEBUG: Could not import "strop": Disallowed C-extension or built-in module
--------------------- >> end captured logging << ---------------------

However, if I remove the call to coverage, my tests still fail.

I've succesfully run Python projects with Hudson. Is there a GAE nuance that's tripping me up?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘味果▽酱 2024-10-14 19:47:38

将手动运行它时的环境与使用 hudson 运行它时的环境进行比较。

我怀疑初始化发生在 .profile 文件内。当 Hudson 生成 shell 时不会调用它。因此,要么将此初始化放入环境初始化中,要么在受影响的构建步骤中手动调用 .profile 文件。

Compare the environments when you run it manually to when you run it using hudson.

I suspect that the initialization happens within the .profile file. That is not called when Hudson spawns a shell. So either you put this initialization into the environment initialization or you call the .profile file manually within the effected build steps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文