source: gs2-extensions/parallel-building/trunk/src/bin/script/spawn_collections.pl@ 30354

Last change on this file since 30354 was 24841, checked in by jmt12, 12 years ago
  • Property svn:executable set to *
File size: 1020 bytes
Line 
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6BEGIN
7{
8 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
9}
10
11print "\n===== Spawn Test Collections =====\n\n";
12
13my $base_path = $ENV{'GSDLHOME'} . '/collect';
14my @collections = ('gdbm','sqlite','tdb','gdbmserver');
15my @sizes = (100,500,1000,5000,10000,50000,100000,500000,1000000);
16
17foreach 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;
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 }
35 }
36}
37print "\n===== Complete! =====\n\n";
Note: See TracBrowser for help on using the repository browser.