]> git.donarmstrong.com Git - biopieces.git/commitdiff
added version test of perl and ruby
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Sat, 29 Jan 2011 10:24:44 +0000 (10:24 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Sat, 29 Jan 2011 10:24:44 +0000 (10:24 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1221 74ccb610-7750-0410-82ae-013aeee3265d

bp_test/lib/test.sh
bp_test/test_all

index fd2566d0c029e0f9d1d1189b39b8792f0bd037de..5d33f1db33710ef3f6303db70bbf619c082c55fd 100755 (executable)
@@ -96,3 +96,29 @@ function clean
         rm "$tmp"
     fi
 }
+
+function test_perl
+{
+    echo -n "Testing Perl version ... "
+
+    if error=$( perl -e 'use 5.8.0;' 2>&1 ); then
+        echo_green "OK"
+    else
+        echo $error | sed "s/, stopped.*//"
+        echo_red "FAIL"
+        exit
+    fi  
+}
+
+function test_ruby
+{
+    echo -n "Testing Ruby version ... "
+
+    if error=$( ruby -e 'raise "Ruby version 1.9 reqauired--this is only #{RUBY_VERSION}" if RUBY_VERSION < "1.9"' 2>&1 ); then
+        echo_green "OK"
+    else
+        echo $error | sed "s/.*: //"
+        echo_red "FAIL"
+        exit
+    fi  
+}
index 6e2ddc8993acb36b8f65d7de78abfd6b132536a4..397db6aa206af5235b7366d89816324299ec339f 100755 (executable)
@@ -6,6 +6,9 @@ if [ -f $log_file ]; then
     rm $log_file
 fi
 
+test_perl
+test_ruby
+
 count=0
 time0=`date +%s`