Summary: | t/ tests should pass if Test::DBIx::Class is not available | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | Test Suite | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | f.demians, gmcharlt, hector.hecaxmmx, katrin.fischer, kyle.m.hall, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16582 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18851 |
||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug 15150: Make t/ tests skip if Test::DBIx::Class absent
[SIGNED-OFF] Bug 15150: Make t/ tests skip if Test::DBIx::Class absent [PASSED QA] Bug 15150: Make t/ tests skip if Test::DBIx::Class absent |
Description
Tomás Cohen Arazi
2015-11-06 12:35:35 UTC
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. |