This file is indexed.

/usr/share/roslaunch/cmake/roslaunch-extras.cmake is in python-roslaunch 1.13.5+ds1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# generated from ros_comm/tools/roslaunch/cmake/roslaunch-extras.cmake.em

# set path to roslaunch-check script installspace
set(roslaunch_check_script ${roslaunch_DIR}/../scripts/roslaunch-check)

#
# Check ROS launch files for validity as part of the unit tests.
#
# :param path: the path to a launch file or a directory containing launch files
#   either relative to th current CMakeLists file or absolute
# :type url: string
# :param DEPENDENCIES: the targets which must be built before executing
#   the test
# :type DEPENDENCIES: list of strings
# :param USE_TEST_DEPENDENCIES: beside run dependencies also consider test
#   dependencies when checking if all dependencies of a launch file are present
# :type USE_TEST_DEPENDENCIES: option
# :param ARGV: arbitrary arguments in the form 'key=value'
#   which will be set as environment variables
# :type ARGV: string
#
function(roslaunch_add_file_check path)
  cmake_parse_arguments(_roslaunch "USE_TEST_DEPENDENCIES" "" "DEPENDENCIES" ${ARGN})
  if(IS_ABSOLUTE ${path})
    set(abspath ${path})
  else()
    set(abspath "${CMAKE_CURRENT_SOURCE_DIR}/${path}")
  endif()
  if(NOT EXISTS ${abspath})
    message(FATAL_ERROR "roslaunch_add_file_check() path '${abspath}' was not found")
  endif()

  set(testname ${path})

  # to support registering the same test with different ARGS
  # append the args to the test name
  if(_roslaunch_UNPARSED_ARGUMENTS)
    get_filename_component(_ext ${testname} EXT)
    get_filename_component(testname ${testname} NAME_WE)
    foreach(arg ${_roslaunch_UNPARSED_ARGUMENTS})
      string(REPLACE ":=" "_" arg_string "${arg}")
      string(REPLACE "=" "_" arg_string "${arg_string}")
      set(testname "${testname}__${arg_string}")
    endforeach()
    set(testname "${testname}${_ext}")
  endif()

  string(REPLACE "/" "_" testname ${testname})
  set(output_path ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
  set(cmd "${CMAKE_COMMAND} -E make_directory ${output_path}")
  set(output_file_name "roslaunch-check_${testname}.xml")
  string(REPLACE ";" " " _roslaunch_UNPARSED_ARGUMENTS "${_roslaunch_UNPARSED_ARGUMENTS}")
  set(use_test_dependencies "")
  if(${_roslaunch_USE_TEST_DEPENDENCIES})
    set(use_test_dependencies " -t")
  endif()
  set(cmd ${cmd} "${roslaunch_check_script} -o '${output_path}/${output_file_name}'${use_test_dependencies} '${abspath}' ${_roslaunch_UNPARSED_ARGUMENTS}")
  catkin_run_tests_target("roslaunch-check" ${testname} "${output_file_name}" COMMAND ${cmd} DEPENDENCIES ${_roslaunch_DEPENDENCIES})
endfunction()