source: tests/scripts/testjbigi.sh @ 6a9f73b

Last change on this file since 6a9f73b was 6a9f73b, checked in by zzz <zzz@…>, 10 years ago

quick jbigi test script

  • Property mode set to 100755
File size: 862 bytes
Line 
1#
2# Runs a test using each libjbigi-linux-*.so file
3# Returns nonzero on failure, but it will always
4# pass because NBI doesnt return an error code (yet).
5# But when it does, it will fail all the time since
6# your hardware probably can't run all versions.
7#
8# zzz 2011-05
9# public domain
10#
11
12cd `dirname $0`/../../installer/lib/jbigi
13
14TMP=/tmp/testjbigi$$
15mkdir $TMP
16for i in libjbigi-linux-*.so
17do
18        echo "Testing $i ..."
19        ln -s $PWD/$i $TMP/libjbigi.so
20        java -cp ../../../build/i2p.jar -Djava.library.path=$TMP net.i2p.util.NativeBigInteger | \
21             egrep 'java|native|However'
22        if [ $? -ne 0 ]
23        then
24                echo "********* FAILED CHECK FOR $i *************"
25                FAIL=1
26        fi
27        rm $TMP/libjbigi.so
28        echo
29done
30
31if [ "$FAIL" != "" ]
32then
33        echo "******** At least one file failed check *********"
34else
35        echo "All files passed"
36fi
37rm -rf $TMP
38exit $FAIL
Note: See TracBrowser for help on using the repository browser.