Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ruby
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 24 Jan 2011 14:04:51 +0000 (14:04 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 24 Jan 2011 14:04:51 +0000 (14:04 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9480 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/AddTests.cmake
buildtools/pipol/ruby.pl

index 88b4bce..bd35dd3 100644 (file)
@@ -257,7 +257,10 @@ else(${ARCH_32_BITS})
 endif(${ARCH_32_BITS})
 
 if(HAVE_RUBY)
+# for the moment with ruby 1.9 -> undefined method `release'
 set_tests_properties(ruby-quicksort PROPERTIES WILL_FAIL true)
+set_tests_properties(ruby-ping-pong PROPERTIES WILL_FAIL true)
+set_tests_properties(ruby-masterslave PROPERTIES WILL_FAIL true)
 endif(HAVE_RUBY)
 
 endif(NOT enable_memcheck)
index fb86749..00708a2 100644 (file)
@@ -3,19 +3,32 @@ use strict;
 
 if( -e "/usr/bin/apt-get")
 {
-       my($ruby_version)=`apt-cache search ruby1.9.*-dev`;
+       my($ruby_version) = `apt-cache search ruby1.9.1-dev`;
+       
+       if( $ruby_version=~ /^$/){
+       $ruby_version = `apt-cache search ruby1.9-dev`;
+       }
+       
+       if( $ruby_version=~ /^$/){
+       return;
+       }
        
        $ruby_version =~ s/-dev.*//g;
        chomp $ruby_version;
        
        print "ruby to install $ruby_version $ruby_version-dev\n";
        `sudo apt-get install -y $ruby_version $ruby_version-dev`;
-       
-       print "ln -sf /usr/bin/$ruby_version /usr/bin/ruby\n";
        `sudo ln -sf /usr/bin/$ruby_version /usr/bin/ruby`;
        
+       $ruby_version=~ s/-dev//g;
+       $ruby_version=~ s/ruby/ruby\*/g;
+       my($ruby_lib)=`ls /usr/lib/lib$ruby_version.so`;
+       chomp $ruby_lib;
+       `sudo ln -sf "$ruby_lib" /usr/lib/libruby.so`;
+       
        $ruby_version=`ruby --version`;
        print "ruby = $ruby_version";
+       print "libruby = ".`ls /usr/lib/libruby.so`;
 }
 elsif(-e "/usr/bin/yum")
 {