Bugzilla – Attachment 59966 Details for
Bug 18055
Speed up '00-strict.t' test
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[COUNTER PATCH] Bug 18055: Speed up t/db_dependent/00-strict.t
Bug-18055-Speed-up-tdbdependent00-strictt.patch (text/plain), 3.44 KB, created by
Mark Tompsett
on 2017-02-07 02:57:15 UTC
(
hide
)
Description:
[COUNTER PATCH] Bug 18055: Speed up t/db_dependent/00-strict.t
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-02-07 02:57:15 UTC
Size:
3.44 KB
patch
obsolete
>From ad06102f0e74362c77b6bda3e41dd06c096e2c40 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 5 Feb 2017 14:40:06 +1300 >Subject: [PATCH] Bug 18055: Speed up t/db_dependent/00-strict.t > >TEST PLAN >--------- > >1/ run 00-strict.t test, (16.5 mins on a 4xcpu system) > >$ time prove t/db_dependent/00-strict.t >... >Files=1, Tests=654, 994 wallclock secs ( 0.19 usr 0.04 sys + 873.40 cusr 116.20 csys = 989.83 CPU) >Result: PASS >real 16m34.104s > >2/ apply patch > >3/ run 00-strict.t test again, (now 6 mins.. much faster) > >$ time prove t/db_dependent/00-strict.t >... >Files=1, Tests=654, 364 wallclock secs ( 0.07 usr 0.01 sys + 1159.20 cusr 153.41 csys = 1312.69 CPU) >Result: PASS >real 6m4.355s > >4/ run koha qa test tools. >--- > t/db_dependent/00-strict.t | 66 +++++++++++++++++++++++++++++++++++----------- > 1 file changed, 51 insertions(+), 15 deletions(-) > mode change 100644 => 100755 t/db_dependent/00-strict.t > >diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t >old mode 100644 >new mode 100755 >index 688b449..4b7ef55 >--- a/t/db_dependent/00-strict.t >+++ b/t/db_dependent/00-strict.t >@@ -1,24 +1,60 @@ >+#!/usr/bin/perl > # This script is called by the pre-commit git hook to test modules compile > > use strict; > use warnings; >+ >+use threads; # used for parallel > use Test::More; > use Test::Strict; >-use File::Spec; >-use File::Find; >-use lib("misc/translator"); >-use lib("installer"); >- >-my @dirs = ( 'acqui', 'admin', 'authorities', 'basket', >- 'catalogue', 'cataloguing', 'changelanguage.pl', 'circ', 'debian', 'docs', >- 'edithelp.pl', 'errors', 'fix-perl-path.PL', 'help.pl', 'installer', >- 'koha_perl_deps.pl', 'kohaversion.pl', 'labels', >- 'mainpage.pl', 'Makefile.PL', 'members', 'misc', 'offline_circ', 'opac', >- 'patroncards', 'reports', 'reserve', 'resetversion.pl', 'reviews', >- 'rewrite-config.PL', 'rotating_collections', 'serials', 'services', 'skel', >- 'sms', 'suggestion', 'svc', 'tags', 'tools', 'virtualshelves' ); >+ >+use lib('misc/translator'); >+use lib('installer'); >+ >+my @dirs = ( >+ 'acqui', 'admin', >+ 'authorities', 'basket', >+ 'catalogue', 'cataloguing', >+ 'changelanguage.pl', 'circ', >+ 'debian', 'docs', >+ 'edithelp.pl', 'errors', >+ 'fix-perl-path.PL', 'help.pl', >+ 'installer', 'koha_perl_deps.pl', >+ 'kohaversion.pl', 'labels', >+ 'mainpage.pl', 'Makefile.PL', >+ 'members', 'misc', >+ 'offline_circ', 'opac', >+ 'patroncards', 'reports', >+ 'reserve', 'resetversion.pl', >+ 'reviews', 'rewrite-config.PL', >+ 'rotating_collections', 'serials', >+ 'services', 'skel', >+ 'sms', 'suggestion', >+ 'svc', 'tags', >+ 'tools', 'virtualshelves', >+); > > $Test::Strict::TEST_STRICT = 0; >-$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl', 'misc/plack/koha.psgi' ]; >+$Test::Strict::TEST_SKIP = [ >+ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl', >+ 'misc/plack/koha.psgi' >+]; >+ >+my @dir_tests; >+foreach my $d (@dirs) { >+ my $dir_test = threads->create(\&test_dir,$d); >+ push @dir_tests, $dir_test; >+} >+ >+while (@dir_tests) { >+ my $dir_test = shift @dir_tests; >+ $dir_test->join(); >+} >+ >+done_testing(); > >-all_perl_files_ok(@dirs); >+sub test_dir { >+ my ($d) = @_; >+ all_perl_files_ok($d); >+ return; >+} >-- >2.1.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 18055
:
59900
|
59901
|
59902
|
59966
|
63341
|
64322
|
66769
|
66770
|
66771
|
73403