[ros-users] using ROS_BUILD_TEST_LABEL with Hudson?
Brian Gerkey
gerkey at willowgarage.com
Mon Dec 6 16:30:43 UTC 2010
On Mon, Dec 6, 2010 at 8:12 AM, Jack O'Quin <jack.oquin at gmail.com> wrote:
> I'm creating some rostest files for camera1394, but most of them
> require the presence of a real device. I don't want these tests run on
> the Hudson build farm, because it lacks the requisite cameras.
>
> I can define them using `rosbuild_add_rostest_labeled(device
> tests/camera_hz.test)`, so they will run if $ROS_BUILD_TEST_LABEL is
> set to `device`. But, they also run if ROS_BUILD_TEST_LABEL is unset.
Yes, that's the intended behavior. The idea is that 'make test' with
no environment setup should run all the tests. That way, developers
don't have to set ROS_BUILD_TEST_LABEL.
> Can I control how the test label is defined for Hudson builds?
If the build uses hudson_helper (which I think the builds still do),
it takes a command-line option --test-label <label>, which in turn is
assigned to ROS_BUILD_TEST_LABEL. If it's not provided, then
hudson_helper sets the label to 'hudson'. That way, tests that have
special needs, as indicated by being labeled, won't be run.
> Is there a different method recommended for managing these kinds of tests?
No, you're doing the right thing. If you label your tests, then
they'll run when you do 'make test', and they won't run in the usual
Hudson builds. In some cases, we create special Hudson jobs that use
--test-label to set a particular label, to run special tests. E.g.,
we use the 'gazebo' label on Gazebo-based regression tests that need a
GPU (and significant CPU resources); those tests run in special jobs
that are bound to GPU-equipped machines (most of the build farm
doesn't have graphics hardware). We could do something similar for
tests that require peripherals to be attached, like your camera tests.
brian.
More information about the ros-users
mailing list