]> git.donarmstrong.com Git - biopieces.git/blob - bp_test/test_all
4a1aa1369d5d1d61bfbc557d6cfb4261fbf97eb7
[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_perl_module "Inline"
11 test_perl_module "JSON::XS"
12 test_perl_module "SVG"
13 test_perl_module "Bit::Vector"
14 test_perl_module "Time::HiRes"
15 test_ruby
16 test_ruby_gem "gnuplot"
17 test_ruby_gem "narray"
18 test_ruby_gem "RubyInline"
19 test_aux_program "blastall"
20 test_aux_program "blat"
21 test_aux_program "bwa"
22 test_aux_program "bowtie"
23 test_aux_program "formatdb"
24 test_aux_program "gnuplot"
25 test_aux_program "idba"
26 test_aux_program "muscle"
27 test_aux_program "mummer"
28 test_aux_program "mysql"
29 test_aux_program "prodigal"
30 test_aux_program "Ray"
31 test_aux_program "scan_for_matches"
32 test_aux_program "usearch"
33 test_aux_program "velveth"
34 test_aux_program "velvetg"
35 test_aux_program "vmatch"
36
37 count=0
38 time0=`date +%s`
39
40 for i in `ls "$BP_DIR/bp_test/test/"`; do
41     "$BP_DIR/bp_test/test/$i"
42     count=$[ $count + 1 ]
43 done
44
45 time1=`date +%s`
46 time=$[ $time1 - $time0 ]
47
48 test_count=`cat $log_file | wc -l | sed "s/ //g"`
49 test_ok=`grep -c "OK" $log_file`
50 test_fail=`grep -c "FAIL" $log_file`
51 test_warn=`grep -c "WARNING" $log_file`
52
53 report="Biopieces tested: $count  Tests run: $test_count  OK: $test_ok  FAIL: $test_fail  WARNING: $test_warn  Time: $time secs"
54
55 if (($test_fail > 0)); then
56     echo_red "$report"
57 elif (($test_warn > 0)); then
58     echo_yellow "$report"
59 else
60     echo_green "$report"
61 fi