IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23640


Ignore:
Timestamp:
Mar 31, 2009, 3:26:37 PM (17 years ago)
Author:
jhoblitt
Message:

load in test script as an external file

Location:
trunk/Nebulous/scripts
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/scripts/ptest.pl

    r23377 r23640  
    1818$| = 1;
    1919
     20my $prog_file = shift;
    2021my $key = shift || 'foobar';
    2122my $kids = shift || 1;
    2223
     24require $prog_file;
    2325$key = "/tmp/" . $key;
    2426
     
    7274    }
    7375
    74 #    select $sock;
    75 #    $| = 1;
    76 
    77     # child
    7876    my $fname = "${key}_$id";
    7977
    8078    my $neb = Nebulous::Client::Bench->new(
    8179#    proxy   => 'http://localhost:80/nebulous'
    82         proxy   => 'http://alala:80/nebulous',
    83 #        sock    => \*STDOUT,
     80        proxy   => 'http://ipp008:80/nebulous'
     81#        proxy   => 'http://alala:80/nebulous',
    8482    );
    8583
    86 
    87     while (1) {
    88 #    print $sock "$$ : i'm a little tea pot using key: $fname\n";
    89         my $fh = $neb->open_create( $fname )
    90             or child_die($sock, "can't create file $fname");
    91         close $fh;
    92 
    93         $fh = $neb->open( $fname, 'read' )
    94             or child_die("can't open file");
    95         close $fh;
    96 
    97         $neb->lock( $fname, 'read' );
    98         $neb->unlock( $fname, 'read' );
    99         $neb->replicate( $fname );
    100         $neb->cull( $fname );
    101         $neb->find( $fname );
    102         $neb->copy( $fname, $fname . "_copy" );
    103         $neb->move( $fname, $fname . "_move" );
    104         $neb->delete( $fname . "_copy" );
    105         $neb->delete( $fname . "_move" );
    106 
    107 #    print $sock "$$ : all done!\n";
    108     }
    109 
    110     return 1;
     84    test_prog($neb, $fname);
    11185}
    11286
Note: See TracChangeset for help on using the changeset viewer.