We need t/ to be skipped if they rely on Test::DBIx::Class and it is not available (this happens on the build environment, so we cannot build current master without fixing this).
Created attachment 44559 [details] [review] Bug 15150: Make t/ tests skip if Test::DBIx::Class absent Tests in t/ should always pass for building the Debian packages for Koha. But we've started using Test::DBIx::Class for writing mocked tests, and that lib is not (yet) packaged fro Debian 7+. This means build is failing. Devs and jenkins use the lib from CPAN. This patch makes the tests skip if the lib is absent. To test: - Install Test::DBIx::Class $ sudo cpanm Test::DBIx::Class - Run the tests: $ prove t/ => SUCCESS: Tests pass - Uninstall Test::DBIx::Class $ sudo cpan -U Test::DBIx::Class - Run the tests: $ prove t/ => SUCCESS: Tests still pass (those needing the lib are skipped) - Sign off :-D
Created attachment 44575 [details] [review] [SIGNED-OFF] Bug 15150: Make t/ tests skip if Test::DBIx::Class absent Tests in t/ should always pass for building the Debian packages for Koha. But we've started using Test::DBIx::Class for writing mocked tests, and that lib is not (yet) packaged fro Debian 7+. This means build is failing. Devs and jenkins use the lib from CPAN. This patch makes the tests skip if the lib is absent. To test: - Install Test::DBIx::Class $ sudo cpanm Test::DBIx::Class - Run the tests: $ prove t/ => SUCCESS: Tests pass - Uninstall Test::DBIx::Class $ sudo cpan -U Test::DBIx::Class - Run the tests: $ prove t/ => SUCCESS: Tests still pass (those needing the lib are skipped) - Sign off :-D Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. All test pass successful
Created attachment 44578 [details] [review] [PASSED QA] Bug 15150: Make t/ tests skip if Test::DBIx::Class absent Tests in t/ should always pass for building the Debian packages for Koha. But we've started using Test::DBIx::Class for writing mocked tests, and that lib is not (yet) packaged fro Debian 7+. This means build is failing. Devs and jenkins use the lib from CPAN. This patch makes the tests skip if the lib is absent. To test: - Install Test::DBIx::Class $ sudo cpanm Test::DBIx::Class - Run the tests: $ prove t/ => SUCCESS: Tests pass - Uninstall Test::DBIx::Class $ sudo cpan -U Test::DBIx::Class - Run the tests: $ prove t/ => SUCCESS: Tests still pass (those needing the lib are skipped) - Sign off :-D Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. All test pass successful Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Hector and Kyle for fast testing this one!
I don't understand whether this patch can/must be backported to 3.20.x.
(In reply to Frédéric Demians from comment #5) > I don't understand whether this patch can/must be backported to 3.20.x. As I see it, this has been bothering the Packaging manager for a while. He did some trick on building so the process (which runs the tests in t/) doesn't break. If it applies on 3.20, it is a good thing to do (backporting it). But maybe ask Galen, the new packaging manager.
(In reply to Tomás Cohen Arazi from comment #6) > If it applies on 3.20, it is a good thing to do (backporting it). > But maybe ask Galen, the new packaging manager. This patch touches several tests that have changed (more tests). So the backporting is tricky.