Changeset 5f6060b for core/perl


Ignore:
Timestamp:
Jan 27, 2005 4:48:41 AM (16 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1c2290b
Parents:
b399586
git-author:
smeghead <smeghead> (01/27/05 04:48:41)
git-committer:
zzz <zzz@…> (01/27/05 04:48:41)
Message:

2005-01-26 smeghead

  • i2pProxy.pac, i2pbench.sh, and i2ptest.sh are now shipped with the dist packages and installed to $i2pinstalldir/scripts.
  • Added command line params to i2ptest.sh and i2pbench.sh: —gij to run them using gij + libgcj, and —sourcedir to run them from the source tree instead of the installation directory.
  • Fixed unreachable for() statement clause in the KBucketImpl class that was causing gcj to toss a compilation warning (jrandom++).
Location:
core/perl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/perl/i2pbench.sh

    rb399586 r5f6060b  
    11#!/usr/bin/perl
     2# Use the "--gij" parameter to run the tests against libgcj.
     3# Use the "--sourcedir" parameter if running this from the source tree.
     4
     5$runtime = "java";
     6$classpath = "../lib/i2p.jar:../lib/jbigi.jar";
     7
     8foreach $argv (@ARGV) {
     9        if ($argv eq "--gij") {
     10                $runtime = "gij";
     11                print "\n*** Using gij + libgcj ***\n\n";
     12        }
     13        if ($argv eq "--sourcedir") {
     14                $classpath = "../../build/i2p.jar:../../build/jbigi.jar";
     15        }
     16}
     17
     18$javacommand = "$runtime -cp $classpath -Dlogger.shutdownDelay=0";
    219
    320print "\nBenchmark Suite #1: i2p/core/java/test/net/i2p/crypto/*\n\n";
     
    724foreach $testclass (@testclasses) {
    825        print "[BENCHMARK] $testclass:\n\n";
    9         system("java -cp lib/i2p.jar:lib/jbigi.jar net.i2p.crypto.$testclass");
     26        system("$javacommand net.i2p.crypto.$testclass");
    1027        print "\n";
    1128}
  • core/perl/i2ptest.sh

    rb399586 r5f6060b  
    11#!/usr/bin/perl
     2# Use the "--gij" parameter to run the tests against libgcj.
     3# Use the "--sourcedir" parameter if running this from the source tree.
    24# Yeah yeah, a lot of repetitive code here, but it works for now.
     5
     6#i2p/apps/proxyscript/i2pProxy.pac
     7
     8$runtime = "java";
     9$classpath = "../lib/i2p.jar:../lib/jbigi.jar";
     10
     11foreach $argv (@ARGV) {
     12        if ($argv eq "--gij") {
     13                $runtime = "gij";
     14                print "\n*** Using gij + libgcj ***\n\n";
     15        }
     16        if ($argv eq "--sourcedir") {
     17                $classpath = "../../build/i2p.jar:../../build/jbigi.jar";
     18        }
     19}
     20
     21$javacommand = "$runtime -cp $classpath -Dlogger.shutdownDelay=0";
    322
    423$failed = 0;
     
    2241foreach $testclass (@testclasses) {
    2342        print "[TEST] $testclass: ";
    24         if(! system("java -cp lib/i2p.jar:lib/jbigi.jar net.i2p.data.TestData test $testclass $testclass.dat > /dev/null 2>test.tmp")) {
     43        if(! system("$javacommand net.i2p.data.TestData test $testclass $testclass.dat > /dev/null 2>test.tmp")) {
    2544                print "OK\n";
    2645                $passed++;
     
    5271        if ($testclass eq "SessionEncryptionTest") {
    5372                print "[TEST] $testclass: ";
    54                 if(! system("java -cp lib/i2p.jar:lib/jbigi.jar net.i2p.crypto.SessionEncryptionTest > /dev/null 2>test.tmp")) {
     73                if(! system("$javacommand net.i2p.crypto.SessionEncryptionTest > /dev/null 2>test.tmp")) {
    5574                        print "OK\n";
    5675                        $passed++;
     
    6685        } else {
    6786                print "[TEST] $testclass:\n\n";
    68                 if(! system("java -cp lib/i2p.jar:lib/jbigi.jar net.i2p.crypto.$testclass")) {
     87                if(! system("$javacommand net.i2p.crypto.$testclass")) {
    6988                        $passed++;
    7089                } else {
     
    91110        if ($testclass eq "net.i2p.data.UnsignedInteger") {
    92111                print "[TEST] $testclass:\n\n";
    93                 if(! system("java -cp lib/i2p.jar:lib/jbigi.jar net.i2p.data.UnsignedInteger")) {
     112                if(! system("$javacommand net.i2p.data.UnsignedInteger")) {
    94113                        $passed++;
    95114                } else {
     
    99118        } else {
    100119                print "[TEST] $testclass: ";
    101                 if(! system("java -cp lib/i2p.jar:lib/jbigi.jar $testclass > /dev/null 2>test.tmp")) {
     120                if(! system("$javacommand $testclass > /dev/null 2>test.tmp")) {
    102121                        print "OK\n";
    103122                        $passed++;
Note: See TracChangeset for help on using the changeset viewer.