Jean-Michel Pichavant wrote:
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 ?
Hudson is running on my workstation (which also has python and nose
installed).
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).
That is correct but see below ...
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.
great suggestion !
This showed the current working directory to be one level above where I
expected so that was definitely a problem so I changed my nose command,
in the Hudson Job configuration Execute shell box, to be
nosetests.exe --where=level-1 --with-xunit --verbose
and saved the configuration change.
This works as expected when run from a command shell in the Hudson
current working directory for this Hudson job.
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.
Thanks for thinking about this; I realize how difficult it is to
remotely troubleshoot a problem like this.
-- jv
JM
--
http://mail.python.org/mailman/listinfo/python-list