[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 02/02: t/tests/legacy-scripts: add a test script for when the interpreter is python2



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 8e4cf93c2f61e3c06b3e1798c583b81fd2a2368b
Author: Antonio Ospite <ao2@ao2.it>
Date:   Mon Nov 7 16:27:55 2016 +0100

    t/tests/legacy-scripts: add a test script for when the interpreter is python2
    
    This allows to analyze separately the cases of when the interpreter is
    python, python2, or pyhton2.X.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 t/tests/legacy-scripts/debian/debian/rules | 3 +++
 t/tests/legacy-scripts/tags                | 3 +++
 t/tests/legacy-scripts/upstream/py2foo     | 4 ++++
 3 files changed, 10 insertions(+)

diff --git a/t/tests/legacy-scripts/debian/debian/rules b/t/tests/legacy-scripts/debian/debian/rules
index 01ee039..11c3837 100755
--- a/t/tests/legacy-scripts/debian/debian/rules
+++ b/t/tests/legacy-scripts/debian/debian/rules
@@ -33,6 +33,9 @@ binary-indep:
 	install -m 755 py2.Xfoo $(tmp)/usr/bin/
 # This uses "env" and should trigger script-in-usr-share-doc
 	install -m 755 py2.Xfoo $(tmp)/usr/share/doc/scripts/
+	install -m 755 py2foo $(tmp)/usr/bin/
+# This uses "env" and should trigger script-in-usr-share-doc
+	install -m 755 py2foo $(tmp)/usr/share/doc/scripts/
 	install -m 755 perlfoo $(tmp)/usr/bin/
 	install -m 755 rubyfoo $(tmp)/usr/bin/
 # This doesn't use "env" but should also trigger script-in-usr-share-doc
diff --git a/t/tests/legacy-scripts/tags b/t/tests/legacy-scripts/tags
index 11ffd30..7a9727e 100644
--- a/t/tests/legacy-scripts/tags
+++ b/t/tests/legacy-scripts/tags
@@ -17,6 +17,7 @@ E: scripts: package-installs-python-bytecode usr/lib/python2.3/site-packages/tes
 E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/php5foo
 E: scripts: php-script-but-no-phpX-cli-dep usr/share/scripts/phpfoo
 E: scripts: python-script-but-no-python-dep usr/bin/py2.Xfoo
+E: scripts: python-script-but-no-python-dep usr/bin/py2foo
 E: scripts: python-script-but-no-python-dep usr/bin/pyfoo
 E: scripts: shell-script-fails-syntax-check usr/bin/sh-broken
 E: scripts: wrong-path-for-interpreter usr/bin/lefty-foo (#!/usr/local/bin/lefty != /usr/bin/lefty)
@@ -33,6 +34,7 @@ I: scripts: init.d-script-does-not-provide-itself etc/init.d/lsb-broken
 I: scripts: init.d-script-missing-lsb-short-description etc/init.d/lsb-other
 I: scripts: no-md5sums-control-file
 I: scripts: script-in-usr-share-doc usr/share/doc/scripts/py2.Xfoo
+I: scripts: script-in-usr-share-doc usr/share/doc/scripts/py2foo
 I: scripts: script-in-usr-share-doc usr/share/doc/scripts/rubyfoo
 W: scripts source: ancient-standards-version 3.2.1 (current is CURRENT)
 W: scripts source: binary-arch-rules-but-pkg-is-arch-indep
@@ -56,6 +58,7 @@ W: scripts: binary-without-manpage usr/bin/perl-bizarre-2
 W: scripts: binary-without-manpage usr/bin/perl-bizarre-3
 W: scripts: binary-without-manpage usr/bin/perlfoo
 W: scripts: binary-without-manpage usr/bin/py2.Xfoo
+W: scripts: binary-without-manpage usr/bin/py2foo
 W: scripts: binary-without-manpage usr/bin/pyfoo
 W: scripts: binary-without-manpage usr/bin/rubyfoo
 W: scripts: binary-without-manpage usr/bin/sh-broken
diff --git a/t/tests/legacy-scripts/upstream/py2foo b/t/tests/legacy-scripts/upstream/py2foo
new file mode 100755
index 0000000..b519eda
--- /dev/null
+++ b/t/tests/legacy-scripts/upstream/py2foo
@@ -0,0 +1,4 @@
+#! /usr/bin/env python2
+
+if __name__ == '__main__':
+	print 'Hi there'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: