Changeset 24841 for gs2-extensions


Ignore:
Timestamp:
2011-12-01T12:26:53+13:00 (12 years ago)
Author:
jmt12
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/bin/script/spawn_collections.pl

    r24694 r24841  
    44use warnings;
    55
     6BEGIN
     7{
     8  die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
     9}
     10
    611print "\n===== Spawn Test Collections =====\n\n";
    712
    8 my $base_path = '/research/jmt12/gsdl-64-svn/collect';
    9 my @collections = ('gdbm','sqlite','tdb');
     13my $base_path = $ENV{'GSDLHOME'} . '/collect';
     14my @collections = ('gdbm','sqlite','tdb','gdbmserver');
    1015my @sizes = (100,500,1000,5000,10000,50000,100000,500000,1000000);
    1116
     
    1419    foreach my $size (@sizes)
    1520    {
    16     next if ($collection eq 'tdb' && $size == 5000);
    1721    my $size_str = sprintf("%07d", $size);
    1822    my $collection_name = $collection . $size_str;
    1923    my $collection_path = $base_path . '/' . $collection_name;
    20     print " - Creating collection: " . $collection_name . "\n";
    21     `mkdir $collection_path`;
    22     `ln -s $base_path/$collection/etc $collection_path/etc`;
    23     `ln -s $base_path/lorem$size_str/import $collection_path/import`;
     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        }
    2435    }
    2536}
Note: See TracChangeset for help on using the changeset viewer.