unable to get Hudson to run unit tests
Stefan Behnel
stefan_ml at behnel.de
Tue May 11 02:35:52 EDT 2010
j vickroy, 10.05.2010 17:39:
> Unfortunately, when "Hudson Build now" is performed, the Hudson Console
> output, for this job, is:
>
> ------------------------------------------------------------
> Started by user anonymous
> Updating svn://vm-svn/GOES data processing/trunk/GOES/13,14,15/SXI/level-1
> At revision 3403
> 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\hudson5273111667332806239.sh
> os.getcwd(): C:\Documents and Settings\jim.vickroy\.hudson\jobs\GOES
> 13-15 SXI Level-1 Products Generation\workspace
> os.listdir(os.getcwd()): ['level-1']
> [workspace] $ cmd.exe -xe
> C:\DOCUME~1\JIM~1.VIC\LOCALS~1\Temp\hudson991194264891924641.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
> No test report files were found. Configuration error?
> Finished: FAILURE
> ------------------------------------------------------------
>
> The second [workspace] section output (above) looks like cmd.exe is
> being executed with no parameters (i.e., without the
> "nosetests.exe --where=level-1 --with-xunit --verbose") parameter.
No, what Hudson actually does, is, it writes your command(s) into a text
file and runs it with the system's shell interpreter (which, unless
otherwise configured, is "cmd.exe" on Windows). This assures the highest
possible compatibility with the executed script. You can even use the
shebang in Hudson's scripts that way, so that you can execute scripts in
basically any scripting language.
The likely reason why it doesn't find your test results is that you didn't
tell it where to look. Put a wildcard path into the unit test config box
that finds the XML files that nosetest writes. It's also best to tell
nosetest where to put them explicitly using a command line option.
Stefan
More information about the Python-list
mailing list