This file is indexed.

/usr/share/pyshared/gluon/tests/test.sh is in python-gluon 1.99.7-1.

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
41
42
43
44
#!/bin/sh
#
#  run unit tests under nose if available,
#  optionally with coverage
#
#  test.sh [cover [gluon.rewrite]]
#
#  easy_install nose
#  easy_install coverage
#
NOSETESTS=nosetests
COVER=gluon		# change to (eg) gluon.rewrite to collect coverage stats on a single module
PROCESSES=4

WHICH=`which $NOSETESTS`
if [ "$WHICH" == "" ]; then
	# if nose isn't available, run the tests directly
	for testmod in test_*.py; do
		python $testmod
	done
else
	if [ "$1" = "cover" ]; then
		# note: coverage doesn't handle multiple processes
		if [ "$2" != "" ]; then
			COVER=$2
		fi
		$NOSETESTS --with-coverage --cover-package=$COVER --cover-erase
	elif [ "$1" = "doctest" ]; then
		# this has to run in gluon's parent; needs work
		#
		# the problem is that doctests run this way have a very different environment,
		# apparently due to imports that don't happen in the normal course of running
		# doctest via __main__.
		#
		echo doctest not supported >&2
		exit 1
		if [ ! -d gluon ]; then
			cd ../..
		fi
		$NOSETESTS --with-doctest
	else
		$NOSETESTS --processes=$PROCESSES
	fi
fi