Changeset 2093

Show
Ignore:
Timestamp:
03/19/08 20:34:20 (2 months ago)
Author:
joshr
Message:

changes to indicate that we're skipping this test, and how to enable it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Swishetest/trunk/t/050-C020-largeindex.t

    r2081 r2093  
    1010use Data::Dumper; 
    1111 
    12 BEGIN {  
    13     unless ($ENV{TEST_HUGE_INDEX}) { 
    14         plan tests => 1;  
    15         ok( 1, "no test" ); 
    16         print STDERR "$0: not running huge index test, set TEST_HUGE_INDEX=1 to enable\n"; 
    17         exit(0); 
     12 
     13SKIP: { 
     14    my $numtests = 9; 
     15    if( $ENV{TEST_LARGE_INDEX} ) { 
     16        plan tests => $numtests; 
     17    } else { 
     18        plan skip_all => "not running large index test, set TEST_LARGE_INDEX=1 to enable"; 
    1819    } 
    19     plan tests => 9; 
     20 
    2021    use File::Path qw(mkpath); 
    2122    mkpath( ["blib/index"], 0, 0755); 
    2223    my $base = "T050-$$";  # test 050 
    23     #unless (-e "blib/index/$base.index" ) { 
    24         #warn "base is $base\n"; 
    25         my (%out) = BuildIndex::build_index_from_external_program(  
     24        
     25    #skip $why, $how_many unless $have_some_feature; 
     26    #skip ("not running large index test, set TEST_LARGE_INDEX=1 to enable", $numtests) 
     27        #unless $ENV{TEST_LARGE_INDEX}; 
    2628 
    27             # index sizes shown are for 2.4 branch on 32bit arch 
    28                  
    29             #"./make_collection -min_words=1000    -max_words=1000    -num_files=100",  
    30             #      # this makes 920K of data, 2.33MB index, 476k propfile 
     29    my (%out) = BuildIndex::build_index_from_external_program(  
     30 
     31        # index sizes shown are for 2.4 branch on 32bit arch 
    3132             
    32             #"./make_collection -min_words=10000   -max_words=10000   -num_files=1000",  
    33             #       # this makes 38M index, 40MB prop  
    34              
    35             #"./make_collection -min_words=100000  -max_words=100000  -num_files=1000",  
    36             #       # this makes 325MB index, 392MB props 
    37              
    38             "./make_collection -min_words=100000  -max_words=100000  -num_files=10000",  
    39              # this makes: 3.84G    blib/index/T050-28400.index.prop 
    40              #             3.16G    blib/index/T050-28400.index 
    41              #      10K files x 100K words x ~5 chars/word = ~5GB of output 
    42               
    43             "blib/index/$base.index", 
    44             "",                     # default config 
    45             "-e" # economy option  
    46         ); 
     33        #"./make_collection -min_words=1000    -max_words=1000    -num_files=100",  
     34        #      # this makes 920K of data, 2.33MB index, 476k propfile 
     35         
     36        #"./make_collection -min_words=10000   -max_words=10000   -num_files=1000",  
     37        #       # this makes 38M index, 40MB prop  
     38         
     39        #"./make_collection -min_words=100000  -max_words=100000  -num_files=1000",  
     40        #       # this makes 325MB index, 392MB props 
     41         
     42        "./make_collection -min_words=100000  -max_words=100000  -num_files=10000",  
     43         # this makes: 3.84G    blib/index/T050-28400.index.prop 
     44         #             3.16G    blib/index/T050-28400.index 
     45         #      10K files x 100K words x ~5 chars/word = ~5GB of output 
     46          
     47        "blib/index/$base.index", 
     48        "",                     # default config 
     49        "-e" # economy option  
     50    ); 
    4751 
    48         # the first real test here is if you get an error indexing above :) 
    49          
    50         print STDERR "$0: DUMPING data for debug: " . Dumper( \%out );    
     52    # the first real test here is if you get an error indexing above :) 
    5153     
    52         cmp_ok( scalar(keys(%out)), '>',          2, "Indexing output" );  
    53         #} 
     54    print STDERR "$0: DUMPING data for debug: " . Dumper( \%out );    
     55 
     56    cmp_ok( scalar(keys(%out)), '>',          2, "Indexing output" );  
    5457 
    5558    cmp_ok( $out{unique},     '==',    45_398, 'unique words indexed' ); 
     
    7477 
    7578 
     79 
     80__END__ 
     81SKIP: { 
     82    skip $why, $how_many unless $have_some_feature; 
     83 
     84    ok( foo(),       $test_name ); 
     85    is( foo(42), 23, $test_name ); 
     86}; 
     87