Summary: | Need test to check that Perl files will compile | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Test Suite | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | Mason James <mtj> |
Severity: | normal | ||
Priority: | P1 - high | CC: | chris, f.demians, mtj, paul.poulain |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 8383: Add test to check that Perl scripts compile
Bug 8383: Add test to check that Perl scripts compile Signed-off patch Bug 8383: Add test to check that Perl scripts |
Description
Jared Camins-Esakov
2012-07-09 02:01:10 UTC
Created attachment 10704 [details] [review] Bug 8383: Add test to check that Perl scripts compile This patch adds t/00-strict.pl which tests that all Perl scripts compile. I chose to use Test::Strict so that in the future we can also have the test check that "use strict" and "use warnings" are enabled. To test: 1. Run t/00-strict.pl. 2. Run around waving your arms in the air that we have a couple of scripts that don't compile. 3. Actually, that's about it. You could test my patch for bug 8384 next. I like it, except this does more than check they will compile. eg not ok 28 - Syntax check acqui/modordernotes.pl # Failed test 'Syntax check acqui/modordernotes.pl' # at /usr/share/perl5/Test/Strict.pm line 305. # DBI connect('dbname=koha;host=localhost;port=3306','kohaadmin',...) failed: Access denied for user 'kohaadmin'@'localhost' (using password: YES) at C4/Context.pm line 758 Because they use C4::Context, to do a test like this we need a database, hence we need this script in t/db_dependent/ Created attachment 10711 [details] [review] Bug 8383: Add test to check that Perl scripts compile This patch adds t/db_dependent/00-strict.pl which tests that all Perl scripts compile. I chose to use Test::Strict so that in the future we can also have the test check that "use strict" and "use warnings" are enabled. To test: 1. Run t/db_dependent/00-strict.pl. 2. Run around waving your arms in the air that we have a couple of scripts that don't compile. 3. Actually, that's about it. You could test my patch for bug 8384 next. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Moved test to t/db_dependent Created attachment 10723 [details] [review] Signed-off patch (In reply to comment #4) > Created attachment 10723 [details] [review] > Signed-off patch QA comment... passing QA, patch applies and works perfect Very useful test, pushing to 3.8.x (In reply to comment #6) > Very useful test, pushing to 3.8.x woops!, this patch missed out on getting pushed to master Jared, i'll attach a rebased patch for master Created attachment 16900 [details] [review] Bug 8383: Add test to check that Perl scripts This patch adds t/db_dependent/00-strict.pl which tests that all Perl scripts compile. I chose to use Test::Strict so that in the future we can also have the test check that "use strict" and "use warnings" are enabled. To test: 1. Run t/db_dependent/00-strict.pl. 2. Run around waving your arms in the air that we have a couple of scripts that don't compile. 3. Actually, that's about it. You could test my patch for bug 8384 next. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Moved test to t/db_dependent Signed-off-by: Frédéric Demians <f.demians@tamil.fr> passing QA on this patch... This patch was pushed to master during the 3.10 release cycle. |