[Groonga-commit] droonga/drntest at fd2c232 [master] Remove leading "/suite/" from test suite name

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Dec 3 18:55:22 JST 2013


Kouhei Sutou	2013-12-03 18:55:22 +0900 (Tue, 03 Dec 2013)

  New Revision: fd2c2322fd16043c61502a32275fdae0c5e3638f
  https://github.com/droonga/drntest/commit/fd2c2322fd16043c61502a32275fdae0c5e3638f

  Message:
    Remove leading "/suite/" from test suite name
    
    /suite/groonga/select ->
           groonga/select
    -------

  Modified files:
    lib/drntest/tester.rb

  Modified: lib/drntest/tester.rb (+5 -2)
===================================================================
--- lib/drntest/tester.rb    2013-12-03 18:51:05 +0900 (178ce08)
+++ lib/drntest/tester.rb    2013-12-03 18:55:22 +0900 (376d616)
@@ -30,7 +30,6 @@ module Drntest
         tester = new
         option_parser = create_option_parser(tester)
         targets = option_parser.parse!(argv)
-        targets << tester.base_path + Path::SUITE if targets.empty?
         tester.run(*targets)
       end
 
@@ -142,6 +141,9 @@ module Drntest
     end
 
     def load_tests(*targets)
+      suite_path = @base_path + Path::SUITE
+      targets << suite_path if targets.empty?
+
       tests = []
       targets.each do |target|
         target_path = Pathname(target)
@@ -161,7 +163,8 @@ module Drntest
 
       unless @suite_pattern.nil?
         tests.select! do |test|
-          @suite_pattern === test.dirname.to_s.sub(@base_path.to_s, "")
+          test_suite_name = test.relative_path_from(suite_path).dirname.to_s
+          @suite_pattern === test_suite_name
         end
       end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index