From: j vickroy on 7 May 2010 14:44 Hello, 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. I'm attempting to use Hudson to run nose (http://somethingaboutorange.com/mrl/projects/nose/0.11.3/) unit tests but without success. The Hudson job configuration contains the following entry in the **Source Code Management** section: svn://vm-svn/GOES data processing/trunk/GOES/13,14,15/SXI/level-1 which successfully retrieves the desired project code from the subversion repository. The *Build* section, of the job configuration page, contains the following entry: "C:\Python26\Scripts\nosetests.exe --with-xunit --verbose" in the *Execute Python Script* subsection. Note, the above nose command runs as expected from a command shell prompt on my computer. As an additional check, I added the following command: #!python.exe print 'FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO' in the *Execute shell* subsection of the job configuration *Build* section. The Hudson console output for this job after a *Build Now* request is: Started by user anonymous Updating svn://vm-svn/GOES data processing/trunk/GOES/13,14,15/SXI/level-1 At revision 3379 no change for svn://vm-svn/GOES data processing/trunk/GOES/13,14,15/SXI/level-1 since the previous build [workspace] $ python C:\DOCUME~1\JIM~1.VIC\LOCALS~1\Temp\hudson6901585295620519415.py [workspace] $ python.exe C:\DOCUME~1\JIM~1.VIC\LOCALS~1\Temp\hudson851004747320097491.sh FOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO 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 20 min old Finished: FAILURE which seems to indicate the unit tests were not run since nosetests.xml was generated by a previous execution of nose from a command shell. I have been unable to get this to work (after trying many permutations in the Hudson job configuration section) and would appreciate your guidance. Thanks, -- jv P.S. My system particulars are: Microsoft Windows XP Professional (Service Pack 3) Python 2.6.4 nose 0.11.3 Hudson 1.355
From: Stefan Behnel on 8 May 2010 00:27 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
From: Jean-Michel Pichavant on 10 May 2010 05:26 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. > We use it, but this is a python list that's why there's few topics about it. :) Speaking for myself, I use it to execute the linter (pylint) on the code and run unitary tests. Great tool for sure. JM
From: j vickroy on 10 May 2010 09:30 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
From: Jean-Michel Pichavant on 10 May 2010 10:26
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 |