[Groonga-commit] groonga/grntest [master] Support no tests ran case

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 12 12:50:08 JST 2012


Kouhei Sutou	2012-10-12 12:50:08 +0900 (Fri, 12 Oct 2012)

  New Revision: 8ff695e0a323ec0831a524a6ea0884ea5c5fb54c
  https://github.com/groonga/grntest/commit/8ff695e0a323ec0831a524a6ea0884ea5c5fb54c

  Log:
    Support no tests ran case

  Modified files:
    lib/grntest/tester.rb

  Modified: lib/grntest/tester.rb (+5 -1)
===================================================================
--- lib/grntest/tester.rb    2012-10-12 11:43:55 +0900 (196a838)
+++ lib/grntest/tester.rb    2012-10-12 12:50:08 +0900 (47713d7)
@@ -2146,7 +2146,11 @@ EOF
       def draw_progress_line
         n_done_tests = @test_suites_result.n_tests
         n_total_tests = @test_suites_result.n_total_tests
-        finished_test_ratio = n_done_tests.to_f / n_total_tests
+        if n_total_tests.zero?
+          finished_test_ratio = 0.0
+        else
+          finished_test_ratio = n_done_tests.to_f / n_total_tests
+        end
 
         start_mark = "|"
         finish_mark = "|"
-------------- next part --------------
HTML����������������������������...
Download 



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