开发者

Is it possible to run GAE tests in Hudson?

开发者 https://www.devze.com 2023-01-30 09:50 出处:网络
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.

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.开发者_Python百科 Is there a GAE nuance that's tripping me up?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消