Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check MANIFEST when PR is created #1183

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@

# Avoid MYMETA files
^MYMETA\.

# Avoid MANIFEST test
t/manifest.t

#!end included /usr/share/perl/5.20/ExtUtils/MANIFEST.SKIP
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test_requires 'DBD::SQLite' => 1.66;
test_requires 'Test::Differences';
test_requires 'Test::Exception';
test_requires 'Time::Local' => 1.26;
test_requires 'Test::NoWarnings';
test_requires 'Test::NoWarnings' => 0;

recommends 'DBD::mysql';
recommends 'DBD::Pg';
Expand Down
37 changes: 37 additions & 0 deletions t/manifest.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!perl
use v5.14.2;
use strict;
use warnings;
use utf8;
use Test::More tests => 2;
use Test::NoWarnings;

use File::Basename qw( dirname );

chdir dirname( dirname( __FILE__ ) ) or BAIL_OUT( "chdir: $!" );

my $makebin = 'make';

sub make {
my @make_args = @_;

undef $ENV{MAKEFLAGS};

my $command = join( ' ', $makebin, '-s', @make_args );
my $output = `$command 2>&1`;

if ( $? == -1 ) {
BAIL_OUT( "failed to execute: $!" );
}
elsif ( $? & 127 ) {
BAIL_OUT( "child died with signal %d, %s coredump\n", ( $? & 127 ), ( $? & 128 ) ? 'with' : 'without' );
}

return $output, $? >> 8;
}

subtest "distcheck" => sub {
my ( $output, $status ) = make "distcheck";
is $status, 0, $makebin . ' distcheck exits with value 0';
is $output, "", $makebin . ' distcheck gives empty output';
};