[Groonga-commit] droonga/drntest at 054ddac [master] Output actual and reject results with configuration name if it is given by the testcase

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jun 3 11:58:28 JST 2015


YUKI Hiroshi	2015-06-03 11:58:28 +0900 (Wed, 03 Jun 2015)

  New Revision: 054ddacd0881661b4e9bfecb724e3c481d30665c
  https://github.com/droonga/drntest/commit/054ddacd0881661b4e9bfecb724e3c481d30665c

  Message:
    Output actual and reject results with configuration name if it is given by the testcase

  Modified files:
    lib/drntest/test-runner.rb

  Modified: lib/drntest/test-runner.rb (+10 -4)
===================================================================
--- lib/drntest/test-runner.rb    2015-06-03 11:53:56 +0900 (248fe5c)
+++ lib/drntest/test-runner.rb    2015-06-03 11:58:28 +0900 (422774c)
@@ -33,6 +33,12 @@ module Drntest
     def initialize(config, target)
       @config = config
       @target_path = Pathname(target).expand_path
+      @target_base_path = @target_path.dirname + @target_path.basename(".#{@config.engine_config}")
+      if @target_path != @target_base_path
+        @target_suffix = ".#{@config.engine_config}"
+      else
+        @target_suffix = ""
+      end
       @engine = Engine.new(@config)
     end
 
@@ -97,19 +103,19 @@ module Drntest
     end
 
     def expected_path
-      expected_for_config = @target_path.sub_ext(".expected.#{@config.engine_config}")
+      expected_for_config = @target_base_path.sub_ext(".expected#{@target_suffix}")
       if expected_for_config.exist?
         return expected_for_config
       end
-      @target_path.sub_ext(".expected")
+      @target_base_path.sub_ext(".expected")
     end
 
     def reject_path
-      @target_path.sub_ext(".reject")
+      @target_base_path.sub_ext(".reject#{@target_suffix}")
     end
 
     def actual_path
-      @target_path.sub_ext(".actual")
+      @target_base_path.sub_ext(".actual#{@target_suffix}")
     end
 
     def remove_reject_file
-------------- next part --------------
HTML����������������������������...
Download 



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