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

[SCM] Debian package checker branch, master, updated. 2.1.6-29-gefb5fd0



The following commit has been merged in the master branch:
commit 6602c03a677b03b961c7b3179f9c8dfd37da360a
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Wed Jan 21 13:21:38 2009 -0600

    Allow defining lintian options in the test suite
    
    Implement a way to define the command line options with which lintian is
    called when running the test suite.  This allows for testing against
    breackages of, for example, the frontend.
    
    Signed-off-by: Raphael Geissert <atomo64@gmail.com>

diff --git a/t/runtests b/t/runtests
index e0c0446..fc02c17 100755
--- a/t/runtests
+++ b/t/runtests
@@ -58,7 +58,7 @@ use Tags;
 
 our $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
 
-our $LINTIAN = $LINTIAN_ROOT . '/frontend/lintian -I -E';
+our $LINTIAN = $LINTIAN_ROOT . '/frontend/lintian';
 our $DPKG_BUILDPACKAGE = 'dpkg-buildpackage -rfakeroot -us -uc -d'
     . ' -iNEVER_MATCH_ANYTHING -INEVER_MATCH_ANYTHING';
 
@@ -344,7 +344,7 @@ sub test_package {
     runsystem("cd $RUNDIR/$pkgdir && $DPKG_BUILDPACKAGE >../build.$pkg 2>&1");
 
     print "testing... ";
-    runsystem_ok("$LINTIAN $RUNDIR/$pkg\_$testdata->{version}*.changes".
+    runsystem_ok("$LINTIAN $testdata->{options} $RUNDIR/$pkg\_$testdata->{version}*.changes".
 		 " 2>&1 | sort > $RUNDIR/tags.$pkg");
 
     # Run a sed-script if it exists, for tests that have slightly variable
@@ -429,7 +429,7 @@ sub test_changes {
     my $testdir = "$TESTSET/changes";
 
     print "testing... ";
-    runsystem_ok("$LINTIAN $testdir/$test.changes 2>&1".
+    runsystem_ok("$LINTIAN -I -E $testdir/$test.changes 2>&1".
 		 " | sort > $RUNDIR/tags.changes-$test");
 
     # Compare the output to the expected tags.
@@ -490,7 +490,7 @@ sub test_deb {
     runsystem("cd $targetdir && fakeroot make >../build.$test 2>&1");
 
     print "testing... ";
-    runsystem_ok("$LINTIAN $targetdir/$test.deb 2>&1" .
+    runsystem_ok("$LINTIAN -I -E $targetdir/$test.deb 2>&1" .
 		 " | sort > $RUNDIR/tags.$test");
 
     # Compare the output to the expected tags.
@@ -564,6 +564,7 @@ sub check_test_is_sane {
 
     $data->{'test-for'} ||= '';
     $data->{'test-against'} ||= '';
+    $data->{options} ||= '-I -E';
 
     if ($DEBUG) {
 	print "check_test_is_sane => ".Dumper($data);
diff --git a/t/tests/README b/t/tests/README
index a20d977..d0d5a41 100644
--- a/t/tests/README
+++ b/t/tests/README
@@ -32,6 +32,13 @@ multiple tags:
 
 with the tags listed in alphabetical order.
 
+If testing the results of the different command line options lintian provides
+use the Options key.  When not specified, the default options are -I -E.
+For example, to test the -T option when used in combination with
+--show-overrides one would use:
+
+    Options: --show-overrides -T no-copyright-file
+
 By default, all tests are built as native Debian packages.  To build
 the test case as a non-native package, add:
 

-- 
Debian package checker


Reply to: