]> eyrie.org Git - kerberos/perl-kerberos.git/commitdiff
Update to rra-c-util 5.4
authorRuss Allbery <rra@cpan.org>
Wed, 16 Apr 2014 23:46:09 +0000 (16:46 -0700)
committerRuss Allbery <rra@cpan.org>
Wed, 16 Apr 2014 23:46:09 +0000 (16:46 -0700)
Fixes some email addresses to use the correct versions from
rra-c-util and update all the test programs to use the new
environment variables to control which tests are run.

15 files changed:
portable/krb5.h
portable/macros.h
portable/stdbool.h
portable/system.h
t/data/perlcriticrc
t/docs/pod-coverage.t
t/docs/pod-spelling.t
t/docs/pod.t
t/docs/synopsis.t
t/lib/Test/RRA.pm
t/lib/Test/RRA/Config.pm
t/style/coverage.t
t/style/critic.t
t/style/minimum-version.t
t/style/strict.t

index e2433c6a4ba07348a24ec27f380b9411d309ba90..4122631ec61e5cc69fa90eef1ea4018f98c407ba 100644 (file)
@@ -19,7 +19,7 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Written by Russ Allbery <rra@cpan.org>
+ * Written by Russ Allbery <eagle@eyrie.org>
  *
  * The authors hereby relinquish any claim to any copyright that they may have
  * in this work, whether granted under contract or by operation of law or
index 220f9f10ab1c8c4e50e9fec1f2473ea4e2414176..b5093f53bdd004843af5c0cb12523a32d9315596 100644 (file)
@@ -4,7 +4,7 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Written by Russ Allbery <rra@cpan.org>
+ * Written by Russ Allbery <eagle@eyrie.org>
  *
  * The authors hereby relinquish any claim to any copyright that they may have
  * in this work, whether granted under contract or by operation of law or
index 692f7cd431d7608dc7332e934fbe0358d0e85244..14d011b804272d84e046659a517c42b3502cb5d1 100644 (file)
@@ -8,7 +8,7 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Written by Russ Allbery <rra@cpan.org>
+ * Written by Russ Allbery <eagle@eyrie.org>
  *
  * The authors hereby relinquish any claim to any copyright that they may have
  * in this work, whether granted under contract or by operation of law or
index 72ed0f0e6ec739b34e785899d99b595319ffe53a..e2cf047bb7433bcf0069b67955197b3dd4bff86e 100644 (file)
@@ -22,7 +22,7 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Written by Russ Allbery <rra@cpan.org>
+ * Written by Russ Allbery <eagle@eyrie.org>
  *
  * The authors hereby relinquish any claim to any copyright that they may have
  * in this work, whether granted under contract or by operation of law or
index 23135b200ff017a9beb3609d3097f2f16d74196c..b05bb38c0d068a70dfa93dfa8b0f649ce6371bd9 100644 (file)
@@ -9,7 +9,7 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
+# Written by Russ Allbery <eagle@eyrie.org>
 # Copyright 2011, 2012, 2013
 #     The Board of Trustees of the Leland Stanford Junior University
 #
index 02749727cff11e732a8677ced56b4dfb25617ced..f901c885f7091208edb9735b9df1acdc6fdf9fbb 100755 (executable)
@@ -5,8 +5,8 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,9 +34,13 @@ use warnings;
 use lib 't/lib';
 
 use Test::More;
-use Test::RRA qw(use_prereq);
+use Test::RRA qw(skip_unless_automated use_prereq);
 use Test::RRA::Config qw(@POD_COVERAGE_EXCLUDE);
 
+# Skip for normal user installs since this doesn't affect functionality.
+skip_unless_automated('POD coverage tests');
+
+# Load prerequisite modules.
 use_prereq('Test::Pod::Coverage');
 
 # Test everything found in the distribution.
index c3198f0d27d84e1cbe87d1595353514af462398c..6debd4202774f3d9c1e039bca51f5f1abee892c7 100755 (executable)
@@ -2,15 +2,11 @@
 #
 # Check for spelling errors in POD documentation.
 #
-# Checks all POD files in a Perl distribution using Test::Spelling.  This test
-# is disabled unless RRA_MAINTAINER_TESTS is set, since spelling dictionaries
-# vary too much between environments.
-#
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -38,10 +34,11 @@ use warnings;
 use lib 't/lib';
 
 use Test::More;
-use Test::RRA qw(skip_unless_maintainer use_prereq);
+use Test::RRA qw(skip_unless_author use_prereq);
 
-# Only run this test for the maintainer.
-skip_unless_maintainer('Spelling tests');
+# Only run this test for the module author since the required stopwords are
+# too sensitive to the exact spell-checking program and dictionary.
+skip_unless_author('Spelling tests');
 
 # Load prerequisite modules.
 use_prereq('Test::Spelling');
index 89d043ec6da6bb3ac52f959b37af955afbd8d620..674ce300940ec2abaf599fa29d9395c4b14cf719 100755 (executable)
@@ -5,8 +5,8 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2012, 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2012, 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,8 +34,12 @@ use warnings;
 use lib 't/lib';
 
 use Test::More;
-use Test::RRA qw(use_prereq);
+use Test::RRA qw(skip_unless_automated use_prereq);
 
+# Skip this test for normal user installs, although pod2man may still fail.
+skip_unless_automated('POD syntax tests');
+
+# Load prerequisite modules.
 use_prereq('Test::Pod');
 
 # Check all POD in the Perl distribution.  Add the examples directory if it
index d49d8de336fd4bf8cf18628f3f545419bd091293..3d5b44a20f767db3e53441a9fcbee639636109e3 100755 (executable)
@@ -5,8 +5,8 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,8 +34,12 @@ use warnings;
 use lib 't/lib';
 
 use Test::More;
-use Test::RRA qw(use_prereq);
+use Test::RRA qw(skip_unless_automated use_prereq);
 
+# Skip for normal user installs since this doesn't affect functionality.
+skip_unless_automated('Synopsis syntax tests');
+
+# Load prerequisite modules.
 use_prereq('Perl::Critic::Utils');
 use_prereq('Test::Synopsis');
 
index c02b715c4a131a07d64d46d9f006ecf8aceeda88..12be88bcab25373632cf4f9644b88e3f4c362876 100644 (file)
@@ -9,8 +9,8 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -51,29 +51,47 @@ our (@EXPORT_OK, @ISA, $VERSION);
 # consistency is good).
 BEGIN {
     @ISA       = qw(Exporter);
-    @EXPORT_OK = qw(skip_unless_maintainer use_prereq);
+    @EXPORT_OK = qw(skip_unless_author skip_unless_automated use_prereq);
 
     # This version should match the corresponding rra-c-util release, but with
     # two digits for the minor version, including a leading zero if necessary,
     # so that it will sort properly.
-    $VERSION = '5.02';
+    $VERSION = '5.04';
 }
 
-# Skip this test unless maintainer tests are requested.  Takes a short
-# description of what tests this script would perform, which is used in the
-# skip message.  Calls plan skip_all, which will terminate the program.
+# Skip this test unless author tests are requested.  Takes a short description
+# of what tests this script would perform, which is used in the skip message.
+# Calls plan skip_all, which will terminate the program.
 #
 # $description - Short description of the tests
 #
 # Returns: undef
-sub skip_unless_maintainer {
+sub skip_unless_author {
     my ($description) = @_;
-    if (!$ENV{RRA_MAINTAINER_TESTS}) {
-        plan skip_all => "$description only run for maintainer";
+    if (!$ENV{AUTHOR_TESTING}) {
+        plan skip_all => "$description only run for author";
     }
     return;
 }
 
+# Skip this test unless doing automated testing or release testing.  This is
+# used for tests that should be run by CPAN smoke testing or during releases,
+# but not for manual installs by end users.  Takes a short description of what
+# tests this script would perform, which is used in the skip message.  Calls
+# plan skip_all, which will terminate the program.
+#
+# $description - Short description of the tests
+#
+# Returns: undef
+sub skip_unless_automated {
+    my ($description) = @_;
+    for my $env (qw(AUTOMATED_TESTING RELEASE_TESTING AUTHOR_TESTING)) {
+        return if $ENV{$env};
+    }
+    plan skip_all => "$description normally skipped";
+    return;
+}
+
 # Attempt to load a module and skip the test if the module could not be
 # loaded.  If the module could be loaded, call its import function manually.
 # If the module could not be loaded, calls plan skip_all, which will terminate
@@ -143,10 +161,14 @@ Test::RRA - Support functions for Perl tests
 
 =head1 SYNOPSIS
 
-    use Test::RRA qw(skip_unless_maintainer use_prereq);
+    use Test::RRA
+      qw(skip_unless_author skip_unless_automated use_prereq);
 
-    # Skip this test unless maintainer tests are requested.
-    skip_unless_maintainer('Coding style tests');
+    # Skip this test unless author tests are requested.
+    skip_unless_author('Coding style tests');
+
+    # Skip this test unless doing automated or release testing.
+    skip_unless_automated('POD syntax tests');
 
     # Load modules, skipping the test if they're not available.
     use_prereq('Perl6::Slurp', 'slurp');
@@ -166,12 +188,23 @@ script should be explicitly imported.
 
 =over 4
 
-=item skip_unless_maintainer(DESC)
+=item skip_unless_author(DESC)
 
-Checks whether RRA_MAINTAINER_TESTS is set in the environment and skips
-the whole test (by calling C<plan skip_all> from Test::More) if it is not.
+Checks whether AUTHOR_TESTING is set in the environment and skips the
+whole test (by calling C<plan skip_all> from Test::More) if it is not.
 DESC is a description of the tests being skipped.  A space and C<only run
-for maintainer> will be appended to it and used as the skip reason.
+for author> will be appended to it and used as the skip reason.
+
+=item skip_unless_automated(DESC)
+
+Checks whether AUTHOR_TESTING, AUTOMATED_TESTING, or RELEASE_TESTING are
+set in the environment and skips the whole test (by calling C<plan
+skip_all> from Test::More) if they are not.  This should be used by tests
+that should not run during end-user installs of the module, but which
+should run as part of CPAN smoke testing and release testing.
+
+DESC is a description of the tests being skipped.  A space and C<normally
+skipped> will be appended to it and used as the skip reason.
 
 =item use_prereq(MODULE[, VERSION][, IMPORT ...])
 
@@ -188,11 +221,11 @@ value of an array.
 
 =head1 AUTHOR
 
-Russ Allbery <rra@cpan.org>
+Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2013 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013, 2014 The Board of Trustees of the Leland Stanford Junior
 University
 
 Permission is hereby granted, free of charge, to any person obtaining a
@@ -220,4 +253,8 @@ Test::More(3), Test::RRA::Automake(3), Test::RRA::Config(3)
 This module is maintained in the rra-c-util package.  The current version
 is available from L<http://www.eyrie.org/~eagle/software/rra-c-util/>.
 
+The functions to control when tests are run use environment variables
+defined by the L<Lancaster
+Consensus|https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md>.
+
 =cut
index e00fbcb8c87b93b32609231f620be5b5bbf1ed49..6d413164d1b86455f1276745bfc9afe4f720c647 100644 (file)
@@ -31,12 +31,13 @@ BEGIN {
     @EXPORT_OK = qw(
       $COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH
       $MINIMUM_VERSION %MINIMUM_VERSION @POD_COVERAGE_EXCLUDE @STRICT_IGNORE
+      @STRICT_PREREQ
     );
 
     # This version should match the corresponding rra-c-util release, but with
     # two digits for the minor version, including a leading zero if necessary,
     # so that it will sort properly.
-    $VERSION = '5.02';
+    $VERSION = '5.04';
 }
 
 # If BUILD or SOURCE are set in the environment, look for data/perl.conf under
@@ -65,6 +66,7 @@ our $MINIMUM_VERSION = '5.008';
 our %MINIMUM_VERSION;
 our @POD_COVERAGE_EXCLUDE;
 our @STRICT_IGNORE;
+our @STRICT_PREREQ;
 
 # Load the configuration.
 if (!do($PATH)) {
@@ -163,6 +165,13 @@ for C<use strict> and C<use warnings>.  The contents of this directory
 must be either top-level directory names or directory names starting with
 F<tests/>.
 
+=item @STRICT_PREREQ
+
+A list of Perl modules that have to be available in order to do meaningful
+Test::Strict testing.  If any of the modules cannot be loaded via C<use>,
+Test::Strict checking will be skipped.  There is currently no way to
+require specific versions of the modules.
+
 =back
 
 No variables are exported by default, but the variables can be imported
@@ -170,11 +179,11 @@ into the local namespace to avoid long variable names.
 
 =head1 AUTHOR
 
-Russ Allbery <rra@cpan.org>
+Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2013 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013, 2014 The Board of Trustees of the Leland Stanford Junior
 University
 
 Permission is hereby granted, free of charge, to any person obtaining a
index 65eea32e3e7d3f35fb7eea26f71a6c8487a1e99f..67bd33e3f16bb9b9b64746b621c960a59538fc97 100755 (executable)
@@ -2,14 +2,10 @@
 #
 # Test Perl code for test coverage.
 #
-# Test coverage checking is disabled unless RRA_MAINTAINER_TESTS is set since
-# it takes a long time, is sensitive to the versions of various libraries,
-# and will not interfere with functionality.
-#
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
+# Written by Russ Allbery <eagle@eyrie.org>
 # Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
@@ -39,13 +35,15 @@ use lib 't/lib';
 
 use File::Spec;
 use Test::More;
-use Test::RRA qw(skip_unless_maintainer use_prereq);
+use Test::RRA qw(skip_unless_author use_prereq);
 use Test::RRA::Config qw($COVERAGE_LEVEL @COVERAGE_SKIP_TESTS);
 
-# Skip code coverage unless doing maintainer testing.
-skip_unless_maintainer('Coverage testing');
+# Skip code coverage unless author tests are enabled since it takes a long
+# time, is sensitive to versions of various libraries, and does not detect
+# functionality problems.
+skip_unless_author('Coverage tests');
 
-# Load required modules.
+# Load prerequisite modules.
 use_prereq('Devel::Cover');
 use_prereq('Test::Strict');
 
index 74633d839dadfdfdfc3406dba1525e1af7de6696..bd2d89b5088c67ae9bedf3d4f1dee4fc21348b30 100755 (executable)
@@ -2,13 +2,12 @@
 #
 # Check for perlcritic errors in all code.
 #
-# Checks all Perl code in blib/lib, t, and Makefile.PL for problems uncovered
-# by perlcritic.  This test is disabled unless RRA_MAINTAINER_TESTS is set,
-# since coding style will not interfere with functionality and newer versions
-# of perlcritic may introduce new checks.
+# If author tests are enabled, check all Perl code in blib/lib, examples, usr,
+# t, and Build.PL for problems uncovered by perlcritic, ignoring template
+# files, junk, and any files explicitly configured to be ignored.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -36,11 +35,12 @@ use warnings;
 use lib 't/lib';
 
 use Test::More;
-use Test::RRA qw(skip_unless_maintainer use_prereq);
+use Test::RRA qw(skip_unless_author use_prereq);
 use Test::RRA::Config qw(@CRITIC_IGNORE);
 
-# Skip tests unless we're running the test suite in maintainer mode.
-skip_unless_maintainer('Coding style tests');
+# Skip tests unless we're running author tests since this test is too
+# sensitive to the exact version of Perl::Critic to be generally useful.
+skip_unless_author('Coding style tests');
 
 # Load prerequisite modules.
 use_prereq('Perl::Critic::Utils');
@@ -81,3 +81,7 @@ plan tests => scalar @files;
 for my $file (@files) {
     critic_ok($file);
 }
+
+# On Debian with perltidy 20130922-1, a perltidy.LOG file gets left behind in
+# the current directory.  Remove it if it exists.
+unlink('perltidy.LOG');
index 61bd8c7b5f0718fb2edb8cdf3a3e7fcac6c50c45..e4eeafd20967d651dd70268f2c68c708b2e884bf 100755 (executable)
@@ -5,8 +5,8 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,9 +34,13 @@ use warnings;
 use lib 't/lib';
 
 use Test::More;
-use Test::RRA qw(use_prereq);
+use Test::RRA qw(skip_unless_automated use_prereq);
 use Test::RRA::Config qw($MINIMUM_VERSION);
 
+# Skip for normal user installs since this doesn't affect functionality.
+skip_unless_automated('Minimum version tests');
+
+# Load prerequisite modules.
 use_prereq('Test::MinimumVersion');
 
 # Check all files in the Perl distribution.
index 59ae5b09481192a2d872a824b5747f9b558a3f8e..7137b152261d1e3c5023dd02e3024aceb8c33c58 100755 (executable)
@@ -5,8 +5,8 @@
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Written by Russ Allbery <rra@cpan.org>
-# Copyright 2013
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2013, 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,8 +34,12 @@ use warnings;
 use lib 't/lib';
 
 use File::Spec;
-use Test::RRA qw(use_prereq);
+use Test::RRA qw(skip_unless_automated use_prereq);
 
+# Skip for normal user installs since this doesn't affect functionality.
+skip_unless_automated('Strictness tests');
+
+# Load prerequisite modules.
 use_prereq('Test::Strict');
 
 # Test everything in the distribution directory except the Build and