Add option --no-setuid to supybot-test

https://bugs.debian.org/834950
This commit is contained in:
Valentin Lorentz 2017-01-10 22:56:17 +01:00
parent 22956a3f4d
commit 90c5c78813
3 changed files with 10 additions and 2 deletions

View File

@ -48,9 +48,11 @@ else:
'aspell/ispell not available.')
skipUnlessFortune = skipIf(utils.findBinaryInPath('fortune') is None,
'fortune not available.')
skipUnlessPing = skipIf(utils.findBinaryInPath('ping') is None,
skipUnlessPing = skipIf(
utils.findBinaryInPath('ping') is None or not setuid,
'ping not available.')
skipUnlessPing6 = skipIf(utils.findBinaryInPath('ping6') is None,
skipUnlessPing6 = skipIf(
utils.findBinaryInPath('ping6') is None or not setuid,
'ping6 not available.')
class UnixConfigTestCase(ChannelPluginTestCase):

View File

@ -138,6 +138,9 @@ if __name__ == '__main__':
parser.add_option('', '--no-network', action='store_true', default=False,
dest='nonetwork', help='Causes the network-based tests '
'not to run.')
parser.add_option('', '--no-setuid', action='store_true', default=False,
dest='nosetuid', help='Causes the tests based on a '
'setuid executable not to run.')
parser.add_option('', '--trace', action='store_true', default=False,
help='Traces all calls made. Unless you\'re really in '
'a pinch, you probably shouldn\'t do this; it results '
@ -184,6 +187,8 @@ if __name__ == '__main__':
if options.nonetwork:
test.network = False
if options.nosetuid:
test.setuid = False
log.testing = True
world.testing = True

View File

@ -59,6 +59,7 @@ class verbosity:
i18n.import_conf()
network = True
setuid = True
# This is the global list of suites that are to be run.
suites = []