unable to get Hudson to run unit tests

Jean-Michel Pichavant jeanmichel at sequans.com
Mon May 10 10:26:13 EDT 2010


j vickroy wrote:
> Stefan Behnel wrote:
>> j vickroy, 07.05.2010 20:44:
>>> I apologize if this is not the appropriate forum for a question about
>>> Hudson (http://hudson-ci.org/), but I did not know where else to ask 
>>> and
>>> my web searches have not been fruitful.
>>
>> Certainly nice to read something about Hudson in this forum, which is 
>> rare enough. It's seriously the greatest CI tool I've ever used, and 
>> it works great with Python apps.
>>
>>
>>> "C:\Python26\Scripts\nosetests.exe --with-xunit --verbose"
>>>
>>> in the *Execute Python Script* subsection.
>>
>> The problem is that this isn't a "Python Script". I's a an 
>> executable, native program. Use the "execute shell" build step instead.
>>
>> Stefan
>>
> Thanks for your reply, Stefan.
>
> When the above command
>
> "C:\Python26\Scripts\nosetests.exe --with-xunit --verbose"
>
> is moved to the "Execute shell" section of the job configuration page 
> along with the following "tracer" command:
>
> #!python.exe
> print 'FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO'
>
> their is still no indication the unit tests are run.
>
> Here is the output from the Hudson Console Output page
>
> -------------------------------------------------------------------
> Started by user anonymous
> Updating svn://vm-svn/GOES data 
> processing/trunk/GOES/13,14,15/SXI/level-1
> At revision 3401
> no change for svn://vm-svn/GOES data 
> processing/trunk/GOES/13,14,15/SXI/level-1 since the previous build
> [workspace] $ python.exe 
> C:\DOCUME~1\JIM~1.VIC\LOCALS~1\Temp\hudson2011616575490005324.sh
> FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
> [workspace] $ cmd.exe -xe 
> C:\DOCUME~1\JIM~1.VIC\LOCALS~1\Temp\hudson902246697107326581.sh
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\jim.vickroy\.hudson\jobs\GOES 13-15 SXI 
> Level-1 Products Generation\workspace>Recording test results
> Test reports were found but none of them are new. Did tests run?
> For example, C:\Documents and Settings\jim.vickroy\.hudson\jobs\GOES 
> 13-15 SXI Level-1 Products Generation\workspace\level-1\nosetests.xml 
> is 2 days 19 hr old
>
> Finished: FAILURE
> -------------------------------------------------------------------
>
> As a side note, my Hudson "global" configuration page contains:
>
> cmd.exe
>
> in the "Shell executable" section and
>
> NOSEDIR
> C:\Python26\Scripts
>
> in the "Global properties" section.
>
> -- jv
Maybe something is missing on the machine hosting hudson, did you try to 
execute nosetests.exe on that machine ?
I'm also confused with something, you do not provide nosetests with the 
location of your package, assuming the current directory contains that 
package (my guess).
Instead of printing 'FOOO', try "import os ; print os.getcwd(); print 
os.listdir(os.getcwd())" to know where you are exactly and if this dir 
contains your python package.

JM





More information about the Python-list mailing list