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

[SCM] Debian package checker branch, master, updated. 2.5.12-67-gc67dbda



The following commit has been merged in the master branch:
commit c67dbda034d0790af1cc0f7af8c860086a3648f6
Author: Niels Thykier <niels@thykier.net>
Date:   Sat May 4 22:12:10 2013 +0200

    t/scripts/*: Remove the "use lib"
    
    Assume people using "prove" directly will include "-l", so there is no
    need to re-adding it to @INC.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/t/scripts/check-descs.t b/t/scripts/check-descs.t
index 49bcc8c..dff5288 100755
--- a/t/scripts/check-descs.t
+++ b/t/scripts/check-descs.t
@@ -23,14 +23,10 @@ use warnings;
 
 use Test::More import => ['done_testing'];
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Test::Lintian;
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 load_profile_for_test ('debian/main', $ENV{'LINTIAN_ROOT'});
 
 my $opts = {
diff --git a/t/scripts/check-load.t b/t/scripts/check-load.t
index 554d6e1..f9b40b1 100755
--- a/t/scripts/check-load.t
+++ b/t/scripts/check-load.t
@@ -23,12 +23,6 @@ use warnings;
 
 use Test::More import => ['done_testing'];
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Test::Lintian;
 
 # Test that all checks can be loaded (except lintian.desc, which is
@@ -41,6 +35,8 @@ my $opts = {
     'filter' => \&accept_filter,
 };
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 test_load_checks ($opts, "$ENV{'LINTIAN_ROOT'}/checks");
 
 done_testing;
diff --git a/t/scripts/implemented-tags.t b/t/scripts/implemented-tags.t
index a94b1aa..2cf4ba6 100755
--- a/t/scripts/implemented-tags.t
+++ b/t/scripts/implemented-tags.t
@@ -21,12 +21,6 @@ use warnings;
 
 use Test::More;
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Test::Lintian;
 
 # Exclude the following tags, which are handled specially and can't be
@@ -63,6 +57,8 @@ my $opts = {
     'filter' => \&accept_filter,
 };
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 test_tags_implemented ($opts, "$ENV{LINTIAN_ROOT}/checks");
 
 done_testing;
diff --git a/t/scripts/needs-info-exists.t b/t/scripts/needs-info-exists.t
index 719bd0f..78f0971 100755
--- a/t/scripts/needs-info-exists.t
+++ b/t/scripts/needs-info-exists.t
@@ -21,15 +21,11 @@ use warnings;
 
 use Test::More;
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Lintian::CollScript;
 use Lintian::Util qw(read_dpkg_control);
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 # Find all of the desc files in collection.  We'll do one check per
 # description.  We don't check checks/*.desc because check-desc.t
 # handles that.
diff --git a/t/scripts/needs-info-missing.t b/t/scripts/needs-info-missing.t
index fb4030d..172ef92 100755
--- a/t/scripts/needs-info-missing.t
+++ b/t/scripts/needs-info-missing.t
@@ -22,14 +22,10 @@ use autodie;
 
 use Test::More;
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Lintian::Util qw(read_dpkg_control slurp_entire_file);
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 # Find all of the desc files in checks.  We'll do one check per description.
 our @DESCS = (glob("$ENV{LINTIAN_ROOT}/checks/*.desc"),
               glob("$ENV{LINTIAN_ROOT}/collection/*.desc"));
diff --git a/t/scripts/profile-load.t b/t/scripts/profile-load.t
index db8be46..4614250 100755
--- a/t/scripts/profile-load.t
+++ b/t/scripts/profile-load.t
@@ -7,14 +7,10 @@ use warnings;
 
 use Test::More;
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Test::Lintian;
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 # We could use a plan, but then we had to update every time we added
 # or removed a profile...
 test_load_profiles ($ENV{'LINTIAN_ROOT'}, $ENV{'LINTIAN_ROOT'});
diff --git a/t/scripts/profiles-coverage.t b/t/scripts/profiles-coverage.t
index 81fc9cf..bd77557 100755
--- a/t/scripts/profiles-coverage.t
+++ b/t/scripts/profiles-coverage.t
@@ -10,15 +10,9 @@ use warnings;
 use File::Find;
 use Test::More;
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Lintian::Util qw(read_dpkg_control); # Test::More (also) exports fail
 
-my $root = $ENV{'LINTIAN_ROOT'};
+my $root = $ENV{'LINTIAN_ROOT'} // '.';
 my %CHECKS;
 my %TAGS;
 
diff --git a/t/scripts/unpack-level.t b/t/scripts/unpack-level.t
index 439a4ea..2216693 100755
--- a/t/scripts/unpack-level.t
+++ b/t/scripts/unpack-level.t
@@ -21,15 +21,11 @@ use warnings;
 
 use Test::More;
 
-BEGIN {
-    $ENV{'LINTIAN_ROOT'} //= '.';
-}
-
-use lib "$ENV{'LINTIAN_ROOT'}/lib";
-
 use Lintian::CollScript;
 use Lintian::Util qw(read_dpkg_control slurp_entire_file);
 
+$ENV{'LINTIAN_ROOT'} //= '.';
+
 # Find all of the desc files in either collection or checks.  We'll do one
 # check per description.
 our @DESCS = (glob("$ENV{LINTIAN_ROOT}/collection/*.desc>"),

-- 
Debian package checker


Reply to: