View | Details | Raw Unified | Return to bug 8649
Collapse All | Expand All

(-)a/t/db_dependent/Search.t (-7 / +7 lines)
Lines 19-27 use File::Spec; Link Here
19
use File::Basename;
19
use File::Basename;
20
use File::Find;
20
use File::Find;
21
use Test::Warn;
21
use Test::Warn;
22
use File::Temp qw/ tempdir /;
23
use File::Path;
22
24
23
system(dirname(__FILE__) . "/zebra_config.pl");
25
my $datadir = tempdir();
24
my $datadir = dirname(__FILE__) . "/data";
26
system(dirname(__FILE__) . "/zebra_config.pl $datadir");
27
my $sourcedir = dirname(__FILE__) . "/data";
25
28
26
my $QueryStemming = 0;
29
my $QueryStemming = 0;
27
my $QueryAutoTruncate = 0;
30
my $QueryAutoTruncate = 0;
Lines 197-203 my %itemtypes = ( Link Here
197
200
198
unlink("$datadir/zebra.log");
201
unlink("$datadir/zebra.log");
199
system("zebraidx -c $datadir/etc/koha/zebradb/zebra-biblios.cfg  -v none,fatal,warn  -g iso2709 -d biblios init");
202
system("zebraidx -c $datadir/etc/koha/zebradb/zebra-biblios.cfg  -v none,fatal,warn  -g iso2709 -d biblios init");
200
system("zebraidx -c $datadir/etc/koha/zebradb/zebra-biblios.cfg  -v none,fatal,warn   -g iso2709 -d biblios update $datadir/zebraexport/biblio");
203
system("zebraidx -c $datadir/etc/koha/zebradb/zebra-biblios.cfg  -v none,fatal,warn   -g iso2709 -d biblios update $sourcedir/zebraexport/biblio");
201
system("zebraidx -c $datadir/etc/koha/zebradb/zebra-biblios.cfg  -v none,fatal,warn  -g iso2709 -d biblios commit");
204
system("zebraidx -c $datadir/etc/koha/zebradb/zebra-biblios.cfg  -v none,fatal,warn  -g iso2709 -d biblios commit");
202
205
203
my $child = fork();
206
my $child = fork();
Lines 507-516 END { Link Here
507
        kill 9, $child;
510
        kill 9, $child;
508
511
509
        # Clean up the Zebra files since the child process was just shot
512
        # Clean up the Zebra files since the child process was just shot
510
513
        rmtree $datadir;
511
        find(sub { unlink($_) if ( -f $_ && m/\.(mf|pid|LCK)$/ ); }, "$datadir");
512
        unlink("$datadir/var/run/zebradb/authoritysocket");
513
        unlink("$datadir/var/run/zebradb/bibliosocket");
514
    }
514
    }
515
}
515
}
516
516
(-)a/t/db_dependent/data/var/lib/zebradb/authorities/key/README (-1 lines)
Line 1 Link Here
1
Zebra authorities key dir 
(-)a/t/db_dependent/data/var/lib/zebradb/authorities/register/README (-1 lines)
Line 1 Link Here
1
Zebra authorities register dir
(-)a/t/db_dependent/data/var/lib/zebradb/authorities/shadow/README (-1 lines)
Line 1 Link Here
1
Zebra authorities shadow dir
(-)a/t/db_dependent/data/var/lib/zebradb/authorities/tmp/README (-1 lines)
Line 1 Link Here
1
Zebra authorities tmp dir
(-)a/t/db_dependent/data/var/lib/zebradb/biblios/key/README (-1 lines)
Line 1 Link Here
1
Zebra biblios key dir
(-)a/t/db_dependent/data/var/lib/zebradb/biblios/register/README (-1 lines)
Line 1 Link Here
1
Zebra biblios register dir
(-)a/t/db_dependent/data/var/lib/zebradb/biblios/shadow/README (-1 lines)
Line 1 Link Here
1
Zebra biblios shadow dir
(-)a/t/db_dependent/data/var/lib/zebradb/biblios/tmp/README (-1 lines)
Line 1 Link Here
1
Zebra biblios tmp dir
(-)a/t/db_dependent/data/var/lock/zebradb/authorities/README (-1 lines)
Line 1 Link Here
1
Zebra authorities lock dir
(-)a/t/db_dependent/data/var/lock/zebradb/biblios/README (-1 lines)
Line 1 Link Here
1
Zebra biblios lock dir
(-)a/t/db_dependent/data/var/log/README (-1 lines)
Line 1 Link Here
1
Koha Apache logs
(-)a/t/db_dependent/data/var/run/zebradb/README (-1 lines)
Line 1 Link Here
1
Zebra Unix-domain sockets
(-)a/t/db_dependent/zebra_config.pl (-2 / +13 lines)
Lines 8-17 use File::Basename; Link Here
8
use File::Spec;
8
use File::Spec;
9
9
10
my $source = File::Spec->rel2abs('.');
10
my $source = File::Spec->rel2abs('.');
11
my $destination = File::Spec->rel2abs('.') . "/t/db_dependent/data";
11
my $destination = $ARGV[0];
12
12
13
make_path("$destination/var/lock/zebradb");
13
make_path("$destination/var/lock/zebradb");
14
make_path("$destination/var/lock/zebradb/biblios");
15
make_path("$destination/var/lock/zebradb/authorities");
14
make_path("$destination/var/lib/zebradb");
16
make_path("$destination/var/lib/zebradb");
17
make_path("$destination/var/lib/zebradb/biblios");
18
make_path("$destination/var/lib/zebradb/biblios/key");
19
make_path("$destination/var/lib/zebradb/biblios/register");
20
make_path("$destination/var/lib/zebradb/biblios/shadow");
21
make_path("$destination/var/lib/zebradb/biblios/tmp");
22
make_path("$destination/var/lib/zebradb/authorities");
23
make_path("$destination/var/lib/zebradb/authorities/key");
24
make_path("$destination/var/lib/zebradb/authorities/register");
25
make_path("$destination/var/lib/zebradb/authorities/shadow");
26
make_path("$destination/var/lib/zebradb/authorities/tmp");
15
make_path("$destination/var/run/zebradb");
27
make_path("$destination/var/run/zebradb");
16
28
17
$ENV{'INSTALL_BASE'} = $destination;
29
$ENV{'INSTALL_BASE'} = $destination;
18
- 

Return to bug 8649