Skip to content

Commit

Permalink
remove unused imports and add comments for catkin test results workar…
Browse files Browse the repository at this point in the history
…ound
  • Loading branch information
wjwwood authored and jbohren committed Jan 6, 2016
1 parent 050de44 commit c5daf4a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions catkin_tools/jobs/catkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import csv
import os
import threading


from catkin_tools.argument_parsing import handle_make_arguments
Expand All @@ -30,10 +28,7 @@
from .commands.cmake import CMakeMakeIOBufferProtocol
from .commands.make import MAKE_EXEC

from .job import create_env_file
from .job import get_env_file_path
from .job import get_env_loader
from .job import get_package_build_space_path
from .job import makedirs


Expand All @@ -45,6 +40,7 @@


def ctr_nuke(logger, event_queue, prefix):
"""Adds a shell script which clears the catkin and ros test results dir."""
ctr_nuke_path = os.path.join(prefix, 'etc', 'catkin', 'profile.d')
ctr_nuke_filename = os.path.join(ctr_nuke_path, '06-ctr-nuke.sh')
mkdir_p(ctr_nuke_path)
Expand Down Expand Up @@ -80,6 +76,10 @@ def create_catkin_build_job(context, package, package_path, dependencies, force_

# Define test results directory
catkin_test_results_dir = os.path.join(build_space, 'test_results')
# Always override the CATKIN and ROS _TEST_RESULTS_DIR environment variables.
# This is in order to avoid cross talk due to parallel builds.
# This is only needed for ROS Hydro and earlier (the problem was addressed upstream in Indigo).
# See: https://github.com/catkin/catkin_tools/issues/139
ctr_env = {
'CATKIN_TEST_RESULTS_DIR': catkin_test_results_dir,
'ROS_TEST_RESULTS_DIR': catkin_test_results_dir
Expand All @@ -88,6 +88,7 @@ def create_catkin_build_job(context, package, package_path, dependencies, force_
# Construct CMake command
makefile_path = os.path.join(build_space, 'Makefile')
if not os.path.isfile(makefile_path) or force_cmake:
# Create a shell script which clears the catkin and ros test results environment variable.
stages.append(FunctionStage(
'ctr-nuke',
ctr_nuke,
Expand Down

0 comments on commit c5daf4a

Please sign in to comment.