ros-infrastructure / jenkins_scripts

Scripts used on the build farm
5 stars 9 forks source link

Doc indexing fail - trying to delete run_tests folder #40

Closed stonier closed 11 years ago

stonier commented 11 years ago

I'm getting doc indexing fails on packages which have no tests. This seems to be happening to ros packages as well:

with error:

Traceback (most recent call last):
  File "/home/rosbuild/hudson/workspace/doc-groovy-std_msgs/jenkins_scripts/doc", line 182, in <module>
    main()
  File "/home/rosbuild/hudson/workspace/doc-groovy-std_msgs/jenkins_scripts/doc", line 99, in main
    doit(ros_distro, stack, workspace, docspace)
  File "/home/rosbuild/hudson/workspace/doc-groovy-std_msgs/jenkins_scripts/doc", line 131, in doit
    shutil.rmtree(os.path.join(workspace, 'test_results'))
  File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 235, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/home/rosbuild/hudson/workspace/doc-groovy-std_msgs/test_results'

Needs to quietly catch the exception if no directory exists?

stonier commented 11 years ago

Actually happening on stacks with tests too.

Perhaps the following is the problem:

-- Using CATKIN_TEST_RESULTS_DIR: /home/rosbuild/hudson/workspace/doc-hydro-ecl_core/rosdoc_lite/build/test_results
OSError: [Errno 2] No such file or directory: '/home/rosbuild/hudson/workspace/doc-hydro-ecl_core/test_results'

Trying to delete the wrong directory?

dirk-thomas commented 11 years ago

It was not checking if the folder actually exists before removing it. Fixed in 350af04d6ece6f275afcd2b041b39a33e658854e.