]> git.donarmstrong.com Git - biopieces.git/commitdiff
polishing testing suite
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 12 Aug 2010 09:59:26 +0000 (09:59 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 12 Aug 2010 09:59:26 +0000 (09:59 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1056 74ccb610-7750-0410-82ae-013aeee3265d

18 files changed:
bp_test/lib/test.sh
bp_test/test/test_add_ident
bp_test/test/test_align_seq
bp_test/test/test_analyze_gc
bp_test/test/test_analyze_vals
bp_test/test/test_blast_seq
bp_test/test/test_grab
bp_test/test/test_lowercase_seq
bp_test/test/test_read_blast_tab
bp_test/test/test_read_fasta
bp_test/test/test_read_solexa
bp_test/test/test_read_tab
bp_test/test/test_swapcase_seq
bp_test/test/test_uppercase_seq
bp_test/test/test_write_blast
bp_test/test/test_write_fasta
bp_test/test/test_write_tab
code_python/Cjung/Args.pyc

index 84ff16c330dfb0e937f464bc09fc1f77015950e9..fd2566d0c029e0f9d1d1189b39b8792f0bd037de 100755 (executable)
@@ -27,6 +27,18 @@ function assert_no_diff
     local src=$1
     local dst=$2
 
+    if [ ! -f $src ]; then
+        echo_red "FAIL"
+        log "FAIL"
+        return
+    fi
+
+    if [ ! -f $dst ]; then
+        echo_red "FAIL"
+        log "FAIL"
+        return
+    fi
+
     local diff=`diff -q $src $dst`
      
     if [ "$diff" != "" ]; then
@@ -77,3 +89,10 @@ function echo_red
 
     echo -e "\033[31;38m$msg\033[0m"
 }
+
+function clean
+{
+    if [ -f "$tmp" ]; then
+        rm "$tmp"
+    fi
+}
index a35b9904a27afdb91e675c15621f5589f470d104..6e32ab6be91e9329e68420dc6c1060b0f41cda65 100755 (executable)
@@ -4,12 +4,12 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in -k CUSTOM_KEY -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in -p PREFIX -O $tmp"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
index 4266db8615e96094938fc886e5d4902d3ef70b56..61c570925c960531a3e4b24eb994deff0d49ef25 100755 (executable)
@@ -4,4 +4,4 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
index 4266db8615e96094938fc886e5d4902d3ef70b56..61c570925c960531a3e4b24eb994deff0d49ef25 100755 (executable)
@@ -4,4 +4,4 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
index 4fa0b2eb0606f036ba7cdc2521aeacf06c60ee18..1e4b18010be45723e6c69a8f9f062f9288a86ea8 100755 (executable)
@@ -4,12 +4,12 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -o $tmp -x"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in -k V0 -o $tmp -x"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in -K V0 -o $tmp -x"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
index f6b6430875577a47f10471b2986304339e0af915..5c3c52b155aea10ca89d60cfb4defb0f7ad3a067 100755 (executable)
@@ -7,22 +7,22 @@ run_quiet "create_blast_index -I $in.3 -d $tmp_dir -i 'protein' -x"
 
 run "$bp -I $in.2 -d $tmp_dir/nucleotide -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in.2 -d $tmp_dir/protein -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in.4 -d $tmp_dir/nucleotide -O $tmp"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
 
 run "$bp -I $in.4 -d $tmp_dir/protein -O $tmp"
 assert_no_diff $tmp $out.4
-rm $tmp
+clean
 
 run "$bp -I $in.2 -d $tmp_dir/nucleotide -p tblastx -O $tmp"
 assert_no_diff $tmp $out.5
-rm $tmp
+clean
 
 rm -rf $tmp_dir
index 4d97be063b9155132296d4ec327d3f5142964b0b..4172e9b21fc7debc883da5679fc7a181a6a3f182 100755 (executable)
@@ -4,40 +4,40 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -p SEQ -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in -p SEQ,COUNT -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in -P $in.pat -O $tmp"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
 
 run "$bp -I $in -p SEQ -i -O $tmp"
 assert_no_diff $tmp $out.4
-rm $tmp
+clean
 
 run "$bp -I $in -p SEQ -K -O $tmp"
 assert_no_diff $tmp $out.5
-rm $tmp
+clean
 
 run "$bp -I $in -p SEQ -V -O $tmp"
 assert_no_diff $tmp $out.6
-rm $tmp
+clean
 
 run "$bp -I $in -p SEQ -k PAT -O $tmp"
 assert_no_diff $tmp $out.7
-rm $tmp
+clean
 
 run "$bp -I $in -r a -k SEQ -O $tmp"
 assert_no_diff $tmp $out.8
-rm $tmp
+clean
 
 run "$bp -I $in -r a -k SEQ -c -O $tmp"
 assert_no_diff $tmp $out.9
-rm $tmp
+clean
 
 run "$bp -I $in -e 'SEQ_LEN<10' -O $tmp"
 assert_no_diff $tmp $out.10
-rm $tmp
+clean
index 4266db8615e96094938fc886e5d4902d3ef70b56..61c570925c960531a3e4b24eb994deff0d49ef25 100755 (executable)
@@ -4,4 +4,4 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
index cc459f89673e9cc11284834f1c2f9d3c3b9fb63c..bff0470123b1fce4ebc13dee37ad12bfe3a54349 100755 (executable)
@@ -4,8 +4,8 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -i $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -i $in -n 1 -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
index cc459f89673e9cc11284834f1c2f9d3c3b9fb63c..bff0470123b1fce4ebc13dee37ad12bfe3a54349 100755 (executable)
@@ -4,8 +4,8 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -i $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -i $in -n 1 -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
index 63a1ad06cfe185d1980893a05a927f9c5670cbf4..5d0a58bc9ee8a4c3619d2c130bb8b1e0afcde9d1 100755 (executable)
@@ -4,20 +4,20 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -i $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -i $in -n 1 -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -i $in -c -O $tmp"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
 
 run "$bp -i $in -s -O $tmp"
 assert_no_diff $tmp $out.4
-rm $tmp
+clean
 
 run "$bp -i $in -s -C 30 -O $tmp"
 assert_no_diff $tmp $out.5
-rm $tmp
+clean
index ed2da1a7d4cd3b15bb7a14b51352d6f95c356085..62adfcce421d96f3fa379b3852a67241bb9ef746 100755 (executable)
@@ -4,32 +4,32 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -i $in.1 -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -i $in.1 -s 1 -O $tmp"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -i $in.1 -s 1 -k ORGANISM,SEQ,COUNT -O $tmp"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
 
 run "$bp -i $in.1 -s 1 -c 2,1 -O $tmp"
 assert_no_diff $tmp $out.4
-rm $tmp
+clean
 
 run "$bp -i $in.1 -s 1 -c 2,1 -k COUNT,SEQ -O $tmp"
 assert_no_diff $tmp $out.5
-rm $tmp
+clean
 
 run "$bp -i $in.2 -O $tmp"
 assert_no_diff $tmp $out.6
-rm $tmp
+clean
 
 run "$bp -i $in.2 -n 1 -O $tmp"
 assert_no_diff $tmp $out.7
-rm $tmp
+clean
 
 run "$bp -i $in.3 -d ';' -O $tmp"
 assert_no_diff $tmp $out.8
-rm $tmp
+clean
index 4266db8615e96094938fc886e5d4902d3ef70b56..61c570925c960531a3e4b24eb994deff0d49ef25 100755 (executable)
@@ -4,4 +4,4 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
index 4266db8615e96094938fc886e5d4902d3ef70b56..61c570925c960531a3e4b24eb994deff0d49ef25 100755 (executable)
@@ -4,4 +4,4 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -O $tmp"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
index 87ed9e02436517becbfbb98fb89be01568aa2626..741eb9572aba33f1c6a1ffb86862c9c105130c75 100755 (executable)
@@ -4,13 +4,13 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -o $tmp -x"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in -c -o $tmp -x"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in -Z -o $tmp.gz -x"
 gunzip $tmp.gz
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
index 63b1ecf9d2112e707e45f78f6b07a64e8489e33e..68f37ce7e5ec796a6a7009a4b9f1a5c01513fd7b 100755 (executable)
@@ -4,13 +4,13 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -o $tmp -x"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in -w 4 -o $tmp -x"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in -w 4 -Z -o $tmp.gz -x"
 gunzip $tmp.gz
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
index 21e9e352c3e1f8619efface21ce76601225bad93..7209fd78f21f2f86fd9a47afe5f8741bbd077109 100755 (executable)
@@ -4,25 +4,25 @@ source "$BP_DIR/bp_test/lib/test.sh"
 
 run "$bp -I $in -o $tmp -x"
 assert_no_diff $tmp $out.1
-rm $tmp
+clean
 
 run "$bp -I $in -c -o $tmp -x"
 assert_no_diff $tmp $out.2
-rm $tmp
+clean
 
 run "$bp -I $in -d ',' -o $tmp -x"
 assert_no_diff $tmp $out.3
-rm $tmp
+clean
 
 run "$bp -I $in -Z -o $tmp.gz -x"
 gunzip $tmp.gz
 assert_no_diff $tmp $out.4
-rm $tmp
+clean
 
 run "$bp -I $in -k 'Count' -o $tmp -x"
 assert_no_diff $tmp $out.5
-rm $tmp
+clean
 
 run "$bp -I $in -K 'Count' -o $tmp -x"
 assert_no_diff $tmp $out.6
-rm $tmp
+clean
index 4c39c4a68733e7fdac49e939fe26d08e98449439..795e1a5b55df1872c78e3b6dd439ae10af66b542 100644 (file)
Binary files a/code_python/Cjung/Args.pyc and b/code_python/Cjung/Args.pyc differ