Bugzilla – Attachment 54416 Details for
Bug 16554
Web installer fails to load i18n sample data on MySQL 5.6+
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16554 - DO NOT PUSH - Follow up to testing script
Bug-16554---DO-NOT-PUSH---Follow-up-to-testing-scr.patch (text/plain), 2.41 KB, created by
Mark Tompsett
on 2016-08-13 00:06:30 UTC
(
hide
)
Description:
Bug 16554 - DO NOT PUSH - Follow up to testing script
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-08-13 00:06:30 UTC
Size:
2.41 KB
patch
obsolete
>From 0826cf6451b123652c9ed2633c591be1e8d1e4ff Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 12 Aug 2016 18:35:55 -0400 >Subject: [PATCH] Bug 16554 - DO NOT PUSH - Follow up to testing script > >Made it so that it really does fail or not based on testing. >Also, added printing of files it is loading as it goes along. >Forced a fail test for the files that don't load so they >will get summarized at the end. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > t/db_dependent/Test_installer.t | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Test_installer.t b/t/db_dependent/Test_installer.t >index 9cda68e..e051ff6 100644 >--- a/t/db_dependent/Test_installer.t >+++ b/t/db_dependent/Test_installer.t >@@ -25,8 +25,8 @@ my @global_files = ( > ); > my $kohastructure = $sample_dir . '/kohastructure.sql'; > >-#for my $lang ( qw ( de-DE en es-ES fr-CA fr-FR it-IT nb-NO pl-PL ru-RU uk-UA ) ) { >-for my $lang ( qw ( it-IT nb-NO ) ) { >+my $failure = 0; >+for my $lang ( qw ( de-DE en es-ES fr-CA fr-FR it-IT nb-NO pl-PL ru-RU uk-UA ) ) { > for my $marcflavour ( qw( marc21 unimarc ) ) { > say "loading kohastructure for $lang | not $marcflavour"; > recreate_db( $db_name ); >@@ -37,18 +37,23 @@ for my $lang ( qw ( it-IT nb-NO ) ) { > push @sample_files, $File::Find::name if $_ =~ m|\.sql$|; > }, $sample_dir . $lang . '/' > ); >- @sample_files = ( @global_files, sort @sample_files ); >+ @sample_files = grep { $_ !~ $marcflavour } ( @global_files, sort @sample_files ); > my $i = 1; > for my $sql_file ( @sample_files ) { >- print $i++ . "/" . scalar @sample_files . "\r"; flush STDOUT; >- next if $sql_file =~ $marcflavour; > #my $content = read_file( $sql_file ); > #my @tables = uniq map { $_ =~ s/insert\s*(ignore)?\s*into\s*`?(\w+)`?.*/$2/xmsi; $_ } grep {/insert\s*(ignore)?\s*into/xmsi} split '\n', $content; > my $error = C4::Installer->new->load_sql( $sql_file ); >- warn $error if $error; >+ if ($error) { >+ $failure = 1; >+ fail(sprintf("%s: %s",$sql_file,$error)); >+ } >+ note(sprintf("%02d/%02d: %s",$i,scalar @sample_files,$sql_file)); >+ $i++; > } > } > } >+is(0,$failure,"No failures"); >+done_testing(); > > sub recreate_db { > my $dbname = shift; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16554
:
51619
|
51620
|
51621
|
51752
|
51753
|
51754
|
51755
|
51756
|
51757
|
51840
|
51890
|
51897
|
51898
|
51899
|
51900
|
54136
|
54137
|
54399
|
54404
|
54405
|
54406
|
54407
|
54408
|
54409
|
54410
|
54411
|
54412
|
54413
|
54414
|
54415
| 54416 |
55219
|
55220
|
55221
|
55222
|
55223
|
55224
|
55225
|
55226
|
55227
|
55228
|
55229
|
55230