This file is indexed.

/usr/bin/python3-oslo_debug_helper is in python3-oslotest 1:2.3.0-0ubuntu1.

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

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
#!/bin/bash

# oslo_debug_helper - Script that allows for debugging tests
#
# oslo_debug_helper [-t <test_directory>] [<tests_to_run>]
#
# <tests_to_run> - may be a test suite, class, or function, if no value is
# passed, then all tests are run.
# -t <test_directory> - the name of the directory that houses the tests
# relative to the project directory. If no value is passed, it is assumed
# to be packagename/tests.

TMP_DIR=`mktemp -d debug-$$-XXX` || exit 1
trap "rm -rf $TMP_DIR" EXIT

ALL_TESTS=$TMP_DIR/all_tests
TESTS_TO_RUN=$TMP_DIR/tests_to_run

# Default to packagename/tests, i.e., keystone/tests
PACKAGENAME=$(python3 setup.py --name)
TEST_DIR=./$PACKAGENAME/tests

# If a specific path is passed, use that one
while getopts ":t:" opt; do
    case $opt in
        t) TEST_DIR=$OPTARG;;
    esac
done

python3 -m testtools.run discover -t ./ $TEST_DIR --list > $ALL_TESTS

# getopts friendly way of determining if a positional arg has been passed
ARG1=${@:$OPTIND:1}
if [ "$ARG1" ]; then
    grep "$ARG1" < $ALL_TESTS > $TESTS_TO_RUN
else
    mv $ALL_TESTS $TESTS_TO_RUN
fi

python3 -m testtools.run discover --load-list $TESTS_TO_RUN