doherty / Dist-Zilla-Plugin-Test-Portability

Release tests for portability
http://metacpan.org/release/Dist-Zilla-Plugin-Test-Portability/
0 stars 4 forks source link

created test file doesn't include options #2

Closed abraxxa closed 8 years ago

abraxxa commented 12 years ago

The quick fix is return unless $file->name eq 't/release-portability.t'; in munge_file, the better one would be do rewrite the plugin as FileInjector.

doherty commented 12 years ago

Sorry, I already see a return that uses the correct filename - and there is a test which seems to verify that the options are actually included. Can you please verify that you're looking at current code?

abraxxa commented 12 years ago

For me the generated filename is t/release-portability.t, not xt/release/portability.t. Can another Dist::Zilla plugin cause this?

doherty commented 12 years ago

Maybe. Can I see the contents of your dist.ini?

abraxxa commented 12 years ago
name = NAC-SAM
version = 0.010003
author = Alexander Hartmaier <alexander.hartmaier@t-systems.at>
license = None
copyright_holder = T-Systems Austria GesmbH

[@Filter]
bundle = @Basic
remove = UploadToCPAN

[PodWeaver]
[PkgVersion]
[NextRelease]
[MetaConfig]
[MetaJSON]

[PodSyntaxTests]
[PodCoverageTests]
[Test::Portability]
[Test::DistManifest]
[Test::Synopsis]
[Test::UnusedVars]
[HasVersionTests]

[ScpDeploy]
hosts      = nac-dev
command    = /opt2/cpan/update_packages.sh
remote_dir = /opt2/cpan

[MetaNoIndex]
directory = t/lib

[MetaResources]
repository.type = git
repository.url = ssh://fqdn/opt2/git/NAC-SAM.git
repository.web = http://fqdn/NAC-SAM.git/

[Prereqs]
Moose = 2.0010
MooseX::App::Cmd = 0.06
MooseX::SimpleConfig = 0.09
MooseX::Types::Path::Class = 0.05
MooseX::Types::Structured  = 0.27
MooseX::FileAttribute = 0.02
autouse = 1.06
Class::Autouse = 2.01
File::ShareDir = 1.03
Config::General = 2.50
IO::Interactive = 0.0.6
Path::Class = 0.24
Try::Tiny = 0.09
LWP::Protocol::https = 6.02
Term::ProgressBar = 2.09
;not used because OpenSSH is needed for cisco devices
;and debian 4 lacks libssh2
;Net::SSH2 = 0.28
;Time::HiRes = 1.9719
Net::OpenSSH = 0.57
Expect = 1.21
List::MoreUtils = 0.33
Log::Log4perl = 1.33
Log::Dispatch = 2.29
Mail::Send = 2.09
DateTime = 0.70
DateTime::Format::Strptime = 1.5000
NAC::Model::DBIC = 0.97
Parallel::Runner = 0.011
NAC::Config = 1.02
JSON = 2.53
SOAP::Lite = 0.712
Net::Appliance::Session = 3.121640
; for ignore_host_checks ssh option
Net::CLI::Interact = 1.121640
Term::ReadPassword = 0.11
Tcl = 1.02
doherty commented 12 years ago

Could you also show me the output of dzil build -v?

petr999 commented 12 years ago

Hello.

abraxxa, from the dist.ini I see you use the code>@Basic</code bundle by mean of [Filter] section.

You may want to know this bundle has use of the [ExtraTests] plugin. I declined the use of this plugin for myself and the portability.t magically remains in my xt/release/.

There is also [Test::RunExtraTests].

abraxxa commented 12 years ago

Sorry, took quite a while to bug me again:

[ahartmai@ahartmai-nb:~/perl5/git/NAC-Scanner$ (master)]$ dzil build -v
[DZ] reading configuration using Dist::Zilla::MVP::Reader::Finder
[@Filter/GatherDir] online, Dist::Zilla::Plugin::GatherDir v4.300028
[@Filter/PruneCruft] online, Dist::Zilla::Plugin::PruneCruft v4.300028
[@Filter/ManifestSkip] online, Dist::Zilla::Plugin::ManifestSkip v4.300028
[@Filter/MetaYAML] online, Dist::Zilla::Plugin::MetaYAML v4.300028
[@Filter/License] online, Dist::Zilla::Plugin::License v4.300028
[@Filter/Readme] online, Dist::Zilla::Plugin::Readme v4.300028
[@Filter/ExtraTests] online, Dist::Zilla::Plugin::ExtraTests v4.300028
[@Filter/ExecDir] online, Dist::Zilla::Plugin::ExecDir v4.300028
[@Filter/ShareDir] online, Dist::Zilla::Plugin::ShareDir v4.300028
[@Filter/MakeMaker] online, Dist::Zilla::Plugin::MakeMaker v4.300028
[@Filter/Manifest] online, Dist::Zilla::Plugin::Manifest v4.300028
[@Filter/TestRelease] online, Dist::Zilla::Plugin::TestRelease v4.300028
[@Filter/ConfirmRelease] online, Dist::Zilla::Plugin::ConfirmRelease v4.300028
[PodWeaver] online, Dist::Zilla::Plugin::PodWeaver v3.101641
[PkgVersion] online, Dist::Zilla::Plugin::PkgVersion v4.300028
[NextRelease] online, Dist::Zilla::Plugin::NextRelease v4.300028
[MetaConfig] online, Dist::Zilla::Plugin::MetaConfig v4.300028
[MetaJSON] online, Dist::Zilla::Plugin::MetaJSON v4.300028
[@TestingMania/Test::UnusedVars] online, Dist::Zilla::Plugin::Test::UnusedVars v2.000003
[@TestingMania/Test::Synopsis] online, Dist::Zilla::Plugin::Test::Synopsis v2.000002
[@TestingMania/Test::Version] online, Dist::Zilla::Plugin::Test::Version v0.002004
[@TestingMania/PodCoverageTests] online, Dist::Zilla::Plugin::PodCoverageTests v4.300028
[@TestingMania/Test::Perl::Critic] online, Dist::Zilla::Plugin::Test::Perl::Critic v2.112410
[@TestingMania/Test::CPAN::Changes] online, Dist::Zilla::Plugin::Test::CPAN::Changes v0.005
[@TestingMania/Test::CPAN::Meta::JSON] online, Dist::Zilla::Plugin::Test::CPAN::Meta::JSON v0.003
[@TestingMania/Test::DistManifest] online, Dist::Zilla::Plugin::Test::DistManifest v2.000002
[@TestingMania/MetaTests] online, Dist::Zilla::Plugin::MetaTests v4.300028
[@TestingMania/Test::Compile] online, Dist::Zilla::Plugin::Test::Compile v1.112820
[@TestingMania/NoTabsTests] online, Dist::Zilla::Plugin::NoTabsTests v0.01
[@TestingMania/Test::MinimumVersion] online, Dist::Zilla::Plugin::Test::MinimumVersion v2.000002
[@TestingMania/Test::Pod::LinkCheck] online, Dist::Zilla::Plugin::Test::Pod::LinkCheck v1.001
[@TestingMania/Test::EOL] online, Dist::Zilla::Plugin::Test::EOL v0.07
[@TestingMania/PodSyntaxTests] online, Dist::Zilla::Plugin::PodSyntaxTests v4.300028
[@TestingMania/MojibakeTests] online, Dist::Zilla::Plugin::MojibakeTests v0.3
[Test::Portability] online, Dist::Zilla::Plugin::Test::Portability v2.000003
[ScpDeploy] online, Dist::Zilla::Plugin::ScpDeploy v1.20110709
[MetaResources] online, Dist::Zilla::Plugin::MetaResources v4.300028
[Prereqs] online, Dist::Zilla::Plugin::Prereqs v4.300028
[DZ] beginning to build NAC-Scanner
[@Filter/GatherDir] adding file Changes
[@Filter/GatherDir] adding file TODO
[@Filter/GatherDir] adding file MANIFEST.SKIP
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901.tar.gz
[@Filter/GatherDir] adding file dist.ini
[@Filter/GatherDir] adding file bin/nac-scanner.pl
[@Filter/GatherDir] adding file lib/NAC/Scanner.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/Types.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/Config.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/Command.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/Command/Scan.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/Model/Table/Device.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/Model/Table/Device_Entity.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/CommandRole/Parallel.pm
[@Filter/GatherDir] adding file lib/NAC/Scanner/CommandRole/Devices.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/MANIFEST
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/Changes
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/TODO
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/META.yml
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/README
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/META.json
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/Makefile.PL
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/LICENSE
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/dist.ini
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/bin/nac-scanner.pl
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/Types.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/Config.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/Command.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/Command/Scan.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/Model/Table/Device.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/Model/Table/Device_Entity.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/CommandRole/Parallel.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/lib/NAC/Scanner/CommandRole/Devices.pm
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/share/nac-scanner.conf
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-synopsis.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-test-version.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-cpan-changes.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/00-compile.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-distmeta.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/author-critic.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/perlcriticrc
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-unused-vars.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-meta-json.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-pod-coverage.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-no-tabs.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-portability.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/00-load.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-mojibake.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/author-test-eol.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-minimum-version.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-pod-syntax.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-dist-manifest.t
[@Filter/GatherDir] adding file NAC-Scanner-0.32_9901/t/release-pod-linkcheck.t
[@Filter/GatherDir] adding file share/nac-scanner.conf
[@Filter/GatherDir] adding file t/perlcriticrc
[@Filter/GatherDir] adding file t/00-load.t
[@Filter/MetaYAML] adding file META.yml
[@Filter/License] adding file LICENSE
[DZ] guessing dist's main_module is lib/NAC/Scanner.pm
[DZ] extracting distribution abstract from lib/NAC/Scanner.pm
[@Filter/Readme] adding file README
[@Filter/Manifest] adding file MANIFEST
[MetaJSON] adding file META.json
[@TestingMania/Test::UnusedVars] adding file xt/release/unused-vars.t
[@TestingMania/Test::Synopsis] adding file xt/release/synopsis.t
[@TestingMania/Test::Version] adding file xt/release/test-version.t
[@TestingMania/PodCoverageTests] adding file xt/release/pod-coverage.t
[@TestingMania/Test::Perl::Critic] adding file xt/author/critic.t
[@TestingMania/Test::CPAN::Changes] adding file xt/release/cpan-changes.t
[@TestingMania/Test::CPAN::Meta::JSON] adding file xt/release/meta-json.t
[@TestingMania/Test::DistManifest] adding file xt/release/dist-manifest.t
[@TestingMania/MetaTests] adding file xt/release/distmeta.t
[@TestingMania/Test::Compile] adding file t/00-compile.t
[@TestingMania/NoTabsTests] adding file xt/release/no-tabs.t
[@TestingMania/Test::MinimumVersion] adding file xt/release/minimum-version.t
[@TestingMania/Test::Pod::LinkCheck] adding file xt/release/pod-linkcheck.t
[@TestingMania/Test::EOL] adding file xt/author/test-eol.t
[@TestingMania/PodSyntaxTests] adding file xt/release/pod-syntax.t
[@TestingMania/MojibakeTests] adding file xt/release/mojibake.t
[Test::Portability] adding file xt/release/portability.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901.tar.gz
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/MANIFEST
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/Changes
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/TODO
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/META.yml
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/README
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/META.json
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/Makefile.PL
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/LICENSE
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/dist.ini
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/bin/nac-scanner.pl
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/Types.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/Config.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/Command.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/Command/Scan.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/Model/Table/Device.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/Model/Table/Device_Entity.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/CommandRole/Parallel.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/lib/NAC/Scanner/CommandRole/Devices.pm
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/share/nac-scanner.conf
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-synopsis.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-test-version.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-cpan-changes.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/00-compile.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-distmeta.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/author-critic.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/perlcriticrc
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-unused-vars.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-meta-json.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-pod-coverage.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-no-tabs.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-portability.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/00-load.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-mojibake.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/author-test-eol.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-minimum-version.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-pod-syntax.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-dist-manifest.t
[@Filter/PruneCruft] pruning NAC-Scanner-0.32_9901/t/release-pod-linkcheck.t
[@Filter/ManifestSkip] pruning MANIFEST.SKIP
[@Filter/ExtraTests] rewriting release test xt/release/unused-vars.t
[@Filter/ExtraTests] rewriting release test xt/release/synopsis.t
[@Filter/ExtraTests] rewriting release test xt/release/test-version.t
[@Filter/ExtraTests] rewriting release test xt/release/pod-coverage.t
[@Filter/ExtraTests] rewriting author test xt/author/critic.t
[@Filter/ExtraTests] rewriting release test xt/release/cpan-changes.t
[@Filter/ExtraTests] rewriting release test xt/release/meta-json.t
[@Filter/ExtraTests] rewriting release test xt/release/dist-manifest.t
[@Filter/ExtraTests] rewriting release test xt/release/distmeta.t
[@Filter/ExtraTests] rewriting release test xt/release/no-tabs.t
[@Filter/ExtraTests] rewriting release test xt/release/minimum-version.t
[@Filter/ExtraTests] rewriting release test xt/release/pod-linkcheck.t
[@Filter/ExtraTests] rewriting author test xt/author/test-eol.t
[@Filter/ExtraTests] rewriting release test xt/release/pod-syntax.t
[@Filter/ExtraTests] rewriting release test xt/release/mojibake.t
[@Filter/ExtraTests] rewriting release test xt/release/portability.t
[PodWeaver] weaving pod in bin/nac-scanner.pl
[PodWeaver] weaving pod in lib/NAC/Scanner/Model/Table/Device_Entity.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/Command/Scan.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/CommandRole/Parallel.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/Config.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/CommandRole/Devices.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/Command.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/Model/Table/Device.pm
[PodWeaver] weaving pod in lib/NAC/Scanner.pm
[PodWeaver] weaving pod in lib/NAC/Scanner/Types.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Script in bin/nac-scanner.pl
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Model::Table::Device_Entity in lib/NAC/Scanner/Model/Table/Device_Entity.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Command::Scan in lib/NAC/Scanner/Command/Scan.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::CommandRole::Parallel in lib/NAC/Scanner/CommandRole/Parallel.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Config in lib/NAC/Scanner/Config.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::CommandRole::Devices in lib/NAC/Scanner/CommandRole/Devices.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Command in lib/NAC/Scanner/Command.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Model::Table::Device in lib/NAC/Scanner/Model/Table/Device.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner in lib/NAC/Scanner.pm
[PkgVersion] adding $VERSION assignment to NAC::Scanner::Types in lib/NAC/Scanner/Types.pm
[NextRelease] updating contents of Changes in memory
[@Filter/MakeMaker] adding file Makefile.PL
[DZ] writing NAC-Scanner in NAC-Scanner-0.32_9901
[DZ] building archive with Archive::Tar::Wrapper
[DZ] writing archive to NAC-Scanner-0.32_9901.tar.gz
doherty commented 11 years ago

I see [Test::Portability] adding file xt/release/portability.t which is what this plugin should be doing. It later gets renamed and rewritten by the ExtraTests plugin: [@Filter/ExtraTests] rewriting release test xt/release/portability.t.

Would you please verify that the test file does include options the way it should? If so, please close the bug report. If not, please paste the file contents.

mjgardner commented 10 years ago

I've found that if you put the [Test::Portability] block before the [@Basic] block (or the [@Filter] that uses @Basic) then the options are written correctly. Seems like there's a mixup with the file munging.

abraxxa commented 8 years ago

The current version fixes this problem, I've closed the issue. Thanks!