Rev | Line | |
---|
[24694] | 1 | #!/usr/bin/perl
|
---|
| 2 |
|
---|
| 3 | use strict;
|
---|
| 4 | use warnings;
|
---|
| 5 |
|
---|
[24841] | 6 | BEGIN
|
---|
| 7 | {
|
---|
| 8 | die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
|
---|
| 9 | }
|
---|
| 10 |
|
---|
[24694] | 11 | print "\n===== Spawn Test Collections =====\n\n";
|
---|
| 12 |
|
---|
[24841] | 13 | my $base_path = $ENV{'GSDLHOME'} . '/collect';
|
---|
| 14 | my @collections = ('gdbm','sqlite','tdb','gdbmserver');
|
---|
[24694] | 15 | my @sizes = (100,500,1000,5000,10000,50000,100000,500000,1000000);
|
---|
| 16 |
|
---|
| 17 | foreach my $collection (@collections)
|
---|
| 18 | {
|
---|
| 19 | foreach my $size (@sizes)
|
---|
| 20 | {
|
---|
| 21 | my $size_str = sprintf("%07d", $size);
|
---|
| 22 | my $collection_name = $collection . $size_str;
|
---|
| 23 | my $collection_path = $base_path . '/' . $collection_name;
|
---|
[24841] | 24 | if (!-d $collection_path)
|
---|
| 25 | {
|
---|
| 26 | print " - Creating collection: " . $collection_name . "\n";
|
---|
| 27 | `mkdir $collection_path`;
|
---|
| 28 | `ln -s $base_path/$collection/etc $collection_path/etc`;
|
---|
| 29 | `ln -s $base_path/lorem$size_str/import $collection_path/import`;
|
---|
| 30 | }
|
---|
| 31 | else
|
---|
| 32 | {
|
---|
| 33 | print " - Collection exists. Skipping: " . $collection_name . "\n";
|
---|
| 34 | }
|
---|
[24694] | 35 | }
|
---|
| 36 | }
|
---|
| 37 | print "\n===== Complete! =====\n\n";
|
---|
Note:
See
TracBrowser
for help on using the repository browser.