edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/common.rb;C503216
File: common.rb
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/common.rb;C503216  (server)    8/5/2008 1:33 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/common.rb;interpret1
@@ -15,7 +15,7 @@
 
 module TestPath
     def TestPath.get_environment_variable(x)
-        ENV[x.upcase] or ENV[x.downcase]
+        ENV[x.to_s]
     end 
     
     def TestPath.get_directory_name(dir)
@@ -68,8 +68,10 @@
             @log_name = File.join(TestPath::RESULT_DIR, "#{prefix}_#{current}.log")
         end 
         
-        def append(line)
-            open(@log_name, "a+") { |f| f << line << "\n" }
+        def append(*lines)
+            lines.each do |line|
+                open(@log_name, "a+") { |f| f << line << "\n" }
+            end
         end 
         
         def to_s
@@ -100,13 +102,11 @@
         def run(f, log_file)
             begin 
                 saved = change_dir_to_file(f)
-                if log_file.nil?
-                    cmd_line = get_command_line(f)
-                else
-                    cmd_line = get_command_line(f) + " #{@append_to_log ? ">>" : ">"} #{log_file} #{@redirect_error ? "2>&1" : ""}"
+                cmd_line = get_command_line(f)
+                if log_file
+                    cmd_line << " #{@append_to_log ? ">>" : ">"} #{log_file} #{@redirect_error ? "2>&1" : ""}"
                 end
-                @logger.append("cd /d #{saved}")
-                @logger.append(cmd_line)
+                @logger.append("cd /d #{saved}", cmd_line)
                 system(cmd_line)
                 return $?.exitstatus
             ensure 
@@ -133,9 +133,9 @@
         attr_reader :mode
         
         @@mode_mapping = {
-            1 => "-D -X:SaveAssemblies",
-            2 => "-D -X:LightweightScopes",
-            3 => "-D -X:Interpret",
+            1 => "-D -X:Interpret",
+            2 => "-D",
+            3 => "-D -X:SaveAssemblies",
         }
         
         def initialize(mode, name, redirect_error=true, append_to_log=true)
@@ -163,8 +163,7 @@
                 saved = Dir.pwd
                 Dir.chdir(TestPath::CORECLR_ROOT)
                 cmd_line = "fxprun.exe thost.exe -fxprun_byname /nologo /lang:rb /run:#{f} /paths:#{File.dirname(f)} #{@append_to_log ? ">>" : ">"} #{logfile} #{@redirect_error ? "2>&1" : ""}"
-                @logger.append("cd /d #{TestPath::CORECLR_ROOT}")
-                @logger.append(cmd_line)
+                @logger.append("cd /d #{TestPath::CORECLR_ROOT}", cmd_line)
                 system(cmd_line)
                 return $?.exitstatus
             ensure
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/run.bat;C390406
File: run.bat
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/run.bat;C390406  (server)    8/5/2008 1:33 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/run.bat;interpret1
@@ -17,7 +17,7 @@
 set RubyOpt_Old=%RubyOpt%
 set RubyOpt=
 
-%MERLIN_ROOT%\..\external\languages\ruby\ruby-1.8.6\bin\ruby.exe %~dp0run.rb -desktop %*
+%MERLIN_ROOT%\..\external\languages\ruby\ruby-1.8.6\bin\ruby.exe %~dp0run.rb -checkin %*
 set EXITCODE=%ERRORLEVEL%
 
 set RubyOpt=%RubyOpt_Old%
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/run.rb;C503216
File: run.rb
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/run.rb;C503216  (server)    8/5/2008 1:33 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/run.rb;interpret1
@@ -19,23 +19,24 @@
     exit(-1)
 }
 
-THIS_DIRECTORY = File.expand_path(File.dirname(__FILE__)).downcase
-CURR_DIRECTORY = Dir.pwd.downcase
+THIS_DIRECTORY = File.expand_path(File.dirname(__FILE__))
+CURR_DIRECTORY = Dir.pwd
 
-require File.join(THIS_DIRECTORY, 'common')
+require 'common'
+require 'benchmark'
 
 $failures = 0
 
 class TestListFile
     def TestListFile.load
         test_lst_file = File.join(THIS_DIRECTORY, "test.lst")
+        lines = ''
         
         # filter empty line and comment line
-        lines = open(test_lst_file, 'r').readlines.find_all { |l| l.chop.strip != "" and l.index("#") != 0  } 
+        File.open(test_lst_file, 'r') do |f| 
+            lines = f.readlines.grep(/^[^#\s]+/)
+        end
         
-        # remove \r\n, space 
-        lines.collect! { |l| l.chop.strip }
-        
         lines.collect do |l|
             parts = l.split
             raise "unexpected test entry: #{l}" if parts.length > 2
@@ -60,24 +61,22 @@
     end 
     
     def run_by(driver)
-        if not should_run_with? driver
-            printf "s"
-        else 
-            if driver.run(@file_name, driver.logger.log_name) == 0
-                printf "."
-            else
-                $failures += 1
-                printf "x(%s)", File.basename(@file_name)
-            end 
-        end
+        if !should_run_with? driver
+            print "s"
+        elsif driver.run(@file_name, driver.logger.log_name) == 0
+            print "."
+        else
+            $failures += 1
+            print "x(#{File.basename(@file_name)})"
+        end 
     end
     
     def run_skipped_by(driver)
-        if not should_run_with? driver
+        if !should_run_with? driver
             if driver.run(@file_name, driver.logger.log_name) == 0
                 printf "p(%s)", File.basename(@file_name)
             else
-                printf "f"
+                print "f"
             end 
         end
     end 
@@ -86,32 +85,56 @@
 # current options which are running inside SNAP:
 #   -checkin
 #   -fast
-#   -coreclr
 
 # drivers
-applicable_drivers = [ Test::CRuby, Test::Iron_m1, Test::Iron_m2 ]
-applicable_drivers = [ Test::CRuby, Test::Iron_m1, Test::Iron_m2, Test::Iron_cc, ] if ARGV.include? "-all"
-applicable_drivers = [ Test::Iron_cc ]  if ARGV.include? "-coreclr"
-applicable_drivers = [ Test::Iron_m1 ]  if ARGV.include? "-fast"
-applicable_drivers = [ Test::CRuby, Test::Iron_m2 ]  if ARGV.include? "-checkin"
+applicable_drivers = []
+ARGV.each do |option|
+    case option
+    when /all/
+        applicable_drivers << Test::Iron_m2 << Test::Iron_m3 << Test::Iron_cc
+    when /coreclr/
+        applicable_drivers << Test::Iron_cc
+    when /fast|interpret/
+        applicable_drivers << Test::Iron_m1
+    when /compile/
+        applicable_drivers << Test::Iron_m2
+    when /verify/
+        applicable_drivers << Test::Iron_m3
+    when /cruby/
+        applicable_drivers << Test::Cruby
+    when /checkin/
+        applicable_drivers << Test::Iron_m2 << Test::Iron_m3 << Test::CRuby
+    when /neg/
+    else
+        p "Invalid option: #{option}"
+    end
+end
+applicable_drivers = [ Test::CRuby, Test::Iron_m1 ] if applicable_drivers.empty?
+applicable_drivers.uniq!
 
 test_files = TestListFile::load 
 
+bms = []
 applicable_drivers.each do |driver|
-    puts ">>> Running under #{driver}  \n"
-    puts "    log @ #{driver.logger} \n"
-    if ARGV.include? "-neg"
-        test_files.each { |tf| tf.run_skipped_by(driver) }
-    else
-        test_files.each { |tf| tf.run_by(driver) }
-    end
-    puts "\n\n"
+	bms << Benchmark.measure(driver.to_s) do
+		puts "#{driver}"
+		puts "    log @ #{driver.logger} \n"
+	    
+		if ARGV.include? "-neg"
+			test_files.each { |tf| tf.run_skipped_by(driver) }
+		else
+			test_files.each { |tf| tf.run_by(driver) }
+		end
+		puts "\n\n"
+   end		
 end
 
-if applicable_drivers.include? Test::Iron_m2 and not ARGV.include? "-fast"
+bms.each { |t| puts t.format("%n\n%10.6r\n") }
+
+if applicable_drivers.include? Test::Iron_m2 and !ARGV.include? "-fast"
     [
         'syntax',
-        'compat',
+        'compat'
     ].each do |s|
         puts ">>> Running #{s} test \n"
         ret = Test::CRuby.run(File.join(TestPath::TEST_DIR, "#{s}/run_#{s}.rb -snap "), nil)
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/test.lst;C503216
File: test.lst
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/test.lst;C503216  (server)    8/5/2008 1:33 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Tests/test.lst;interpret1
@@ -37,7 +37,7 @@
 # end 
 
 # begin
-interop\test_basic.rb                                       ironm1,ironm2
+interop\test_basic.rb                                       ironm3
 # end
 
 # begin
===================================================================
edit: $/Merlin_External/Languages/Ruby/ruby-1.8.6/bin/rake.cmd;C477882
File: rake.cmd
===================================================================
--- $/Merlin_External/Languages/Ruby/ruby-1.8.6/bin/rake.cmd;C477882  (server)    8/5/2008 1:33 PM
+++ Shelved Change: $/Merlin_External/Languages/Ruby/ruby-1.8.6/bin/rake.cmd;interpret1
@@ -1,1 +1,1 @@
-@ruby "D:/Users/Luis/projects/oss/installer2-trunk/ruby/bin/rake" %*
+@ruby "%~dp0/rake" %*
===================================================================
