Bug 9142

Summary: Failing test case in 3.10.0 release.
Product: Koha Reporter: Robin Sheat <robin>
Component: Test SuiteAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: blocker    
Priority: P1 - high CC: chris, jcamins, katrin.fischer, tomascohen
Version: 3.10   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9142 - Remove the use of subtests
Bug 9142 - Remove the use of subtests
[SIGNED-OFF] Bug 9142 - Remove the use of subtests

Description Robin Sheat 2012-11-26 04:51:31 UTC
robin@koha:/mnt/catalyst/koha$ KOHA_CONF=~/koha-dev/etc/koha-conf.xml t/Calendar.t 
1..22
ok 1 - use Koha::Calendar;
ok 2 - use C4::Calendar;
String found where operator expected at t/Calendar.t line 130, near "subtest '\'Datedue\' tests'"
	(Do you need to predeclare subtest?)
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 131.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 134.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 135.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 137.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 137.
"my" variable $one_day_dur masks earlier declaration in same scope at t/Calendar.t line 137.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 141.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 141.
"my" variable $two_day_dur masks earlier declaration in same scope at t/Calendar.t line 141.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 145.
"my" variable $test_dt masks earlier declaration in same scope at t/Calendar.t line 145.
"my" variable $seven_day_dur masks earlier declaration in same scope at t/Calendar.t line 145.
String found where operator expected at t/Calendar.t line 151, near "subtest '\'Calendar\' tests'"
	(Do you need to predeclare subtest?)
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 152.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 155.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 156.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 158.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 158.
"my" variable $one_day_dur masks earlier declaration in same scope at t/Calendar.t line 158.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 162.
"my" variable $test_dt masks earlier declaration in same scope at t/Calendar.t line 162.
"my" variable $seven_day_dur masks earlier declaration in same scope at t/Calendar.t line 162.
String found where operator expected at t/Calendar.t line 168, near "subtest '\'Days\' tests'"
	(Do you need to predeclare subtest?)
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 169.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 172.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 173.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 175.
"my" variable $dt masks earlier declaration in same scope at t/Calendar.t line 175.
"my" variable $one_day_dur masks earlier declaration in same scope at t/Calendar.t line 175.
"my" variable $cal masks earlier declaration in same scope at t/Calendar.t line 179.
"my" variable $test_dt masks earlier declaration in same scope at t/Calendar.t line 179.
"my" variable $seven_day_dur masks earlier declaration in same scope at t/Calendar.t line 179.
syntax error at t/Calendar.t line 130, near "subtest '\'Datedue\' tests'"
syntax error at t/Calendar.t line 148, near "}"
syntax error at t/Calendar.t line 165, near "}"
syntax error at t/Calendar.t line 182, near "}"
Execution of t/Calendar.t aborted due to compilation errors.
# Looks like you planned 22 tests but ran 2.
# Looks like your test exited with 255 just after 2.
Comment 1 Robin Sheat 2012-11-26 04:53:25 UTC
This is coming from commit 5d92ab39a681e370635324f1fdb9e69b187e7842, btw.
Comment 2 Robin Sheat 2012-11-26 05:17:47 UTC
This is because the test case in bug 8800 was written with a higher version of Test::More than ships in Debian stable, and so that test doesn't work.
Comment 3 Tomás Cohen Arazi 2012-11-26 13:43:05 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2012-11-26 18:32:12 UTC
Thanks very much Tomás, this means we can put the test back in for packaging :)
Comment 5 Robin Sheat 2012-11-26 22:55:20 UTC Comment hidden (obsolete)
Comment 6 Robin Sheat 2012-11-26 22:56:08 UTC
Thanks. I've also built master packages with this, uploading them now.
Comment 7 Katrin Fischer 2012-11-28 06:38:10 UTC
Created attachment 13717 [details] [review]
[SIGNED-OFF] Bug 9142 - Remove the use of subtests

Debian stable's version of Test::More is older than the one I used on my
12.04 dev box, and doesn't support subtests, which I used to avoid side
effects between different test scenarios.

This patch removes that subtest definition.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.
Comment 8 Jared Camins-Esakov 2012-11-28 12:31:55 UTC
This patch has been pushed to master.
Comment 9 Chris Cormack 2012-11-29 02:21:58 UTC
Pushed to 3.10.x will be in 3.10.1
Comment 10 Chris Cormack 2012-11-29 02:24:24 UTC
Pushed to 3.8.x, will be in 3.8.8