Bug 12689

Summary: Search.t fails to run on Squeeze
Product: Koha Reporter: Robin Sheat <robin>
Component: Test SuiteAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: blocker    
Priority: P3    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 12443    
Bug Blocks:    

Description Robin Sheat 2014-08-01 00:08:52 UTC
# t/Search.t
1..3
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 373.
ok 1 - use C4::Search;
ok 2 - C4::Search->can('_build_initial_query')
String found where operator expected at t/Search.t line 28, near "subtest "_build_initial_query tests""
	(Do you need to predeclare subtest?)
syntax error at t/Search.t line 28, near "subtest "_build_initial_query tests""
syntax error at t/Search.t line 158, near "}"
Execution of t/Search.t aborted due to compilation errors.
# Looks like you planned 3 tests but ran 2.
# Looks like your test exited with 255 just after 2.



# perl -MTest::More -e 'print $Test::More::VERSION . "\n"'
0.92

This construct works on higher versions of Test::More, but we don't have that luxury in squeeze.

t/db_dependent/Items.t fails in a similar way:

ok 1 - use C4::Items;
String found where operator expected at t/db_dependent/Items.t line 34, near "subtest 'General Add, Get and Del tests'"
	(Do you need to predeclare subtest?)
String found where operator expected at t/db_dependent/Items.t line 68, near "subtest 'GetHiddenItemnumbers tests'"
	(Do you need to predeclare subtest?)
String found where operator expected at t/db_dependent/Items.t line 146, near "subtest 'GetItemsInfo tests'"
	(Do you need to predeclare subtest?)
"my" variable $biblionumber masks earlier declaration in same scope at t/db_dependent/Items.t line 158.
"my" variable $item_bibnum masks earlier declaration in same scope at t/db_dependent/Items.t line 160.
"my" variable $item_bibitemnum masks earlier declaration in same scope at t/db_dependent/Items.t line 160.
"my" variable $itemnumber masks earlier declaration in same scope at t/db_dependent/Items.t line 160.
syntax error at t/db_dependent/Items.t line 34, near "subtest 'General Add, Get and Del tests'"
syntax error at t/db_dependent/Items.t line 66, near "}"
syntax error at t/db_dependent/Items.t line 144, near "}"
syntax error at t/db_dependent/Items.t line 182, near "}"
syntax error at t/db_dependent/Items.t line 218, near "}"
Execution of t/db_dependent/Items.t aborted due to compilation errors.
Comment 1 Robin Sheat 2014-10-23 23:11:32 UTC
Added a newer version of Test::Simple to the repo which fixes this.