]> git.donarmstrong.com Git - biopieces.git/blob - bp_test/test_all
added version test of perl and ruby
[biopieces.git] / bp_test / test_all
1 #!/bin/bash
2
3 source "$BP_DIR/bp_test/lib/test.sh"
4
5 if [ -f $log_file ]; then
6     rm $log_file
7 fi
8
9 test_perl
10 test_ruby
11
12 count=0
13 time0=`date +%s`
14
15 for i in `ls "$BP_DIR/bp_test/test/"`; do
16     "$BP_DIR/bp_test/test/$i"
17     count=$[ $count + 1 ]
18 done
19
20 time1=`date +%s`
21 time=$[ $time1 - $time0 ]
22
23 test_count=`cat $log_file | wc -l | sed "s/ //g"`
24 test_ok=`grep -c "OK" $log_file`
25
26 test_fail=$[ $test_count - $test_ok ]
27
28 report="Biopieces tested: $count   Tests run: $test_count   OK: $test_ok   FAIL: $test_fail   Time: $time secs"
29
30 if [ $test_fail = 0 ]; then
31     echo_green "$report"
32 else
33     echo_red "$report"
34 fi