mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
setup-packaging-environment: Display help
This commit is contained in:
parent
2a2e420353
commit
e47a99c42a
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -4,8 +4,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
|
||||
* pbuilder-dist: improve bash_completion for *.dsc files. Thanks Maarten
|
||||
Bezemer. (Closes: #670924, LP: #770529)
|
||||
* check-mir, check-symbols, grep-merges, pbuilder-dist-simple,
|
||||
submittodebian, ubuntu-iso: Do enough argument parsing to handle --help
|
||||
(LP: #988009)
|
||||
setup-packaging-environment, submittodebian, ubuntu-iso:
|
||||
Do enough argument parsing to handle --help (LP: #988009)
|
||||
|
||||
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200
|
||||
|
||||
|
@ -37,6 +37,31 @@ await_response() {
|
||||
echo
|
||||
}
|
||||
|
||||
usage() {
|
||||
prog=$(basename $0)
|
||||
cat <<EOF
|
||||
Usage: $prog [options]
|
||||
|
||||
Configure your machine for packaging work
|
||||
|
||||
Options:
|
||||
-h, --help show this help message and exit
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
usage 0
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# ##################################################################
|
||||
|
||||
if [ "$(lsb_release -is)" != "Ubuntu" ]
|
||||
|
@ -24,9 +24,6 @@ import setup
|
||||
from ubuntutools import subprocess
|
||||
from ubuntutools.test import unittest
|
||||
|
||||
BLACKLIST = {
|
||||
'setup-packaging-environment': 'Throws Error',
|
||||
}
|
||||
TIMEOUT = 5
|
||||
|
||||
def load_tests(loader, tests, pattern):
|
||||
@ -45,9 +42,6 @@ class HelpTestCase(unittest.TestCase):
|
||||
@classmethod
|
||||
def make_help_tester(cls, script):
|
||||
def tester(self):
|
||||
if script in BLACKLIST:
|
||||
raise unittest.SkipTest("Blacklisted: " + BLACKLIST[script])
|
||||
|
||||
null = open('/dev/null', 'r')
|
||||
process = subprocess.Popen(['./' + script, '--help'],
|
||||
close_fds=True, stdin=null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user