[前][次][番号順一覧][スレッド一覧]

ruby-changes:35265

From: hsbt <ko1@a...>
Date: Tue, 2 Sep 2014 16:59:33 +0900 (JST)
Subject: [ruby-changes:35265] hsbt:r47347 (trunk): * test/runner.rb: reporting test coverage for test-all with COVERAGE env.

hsbt	2014-09-02 16:59:18 +0900 (Tue, 02 Sep 2014)

  New Revision: 47347

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47347

  Log:
    * test/runner.rb: reporting test coverage for test-all with COVERAGE env.
      [Feature #10189][ruby-core:64681]
    * Makefile.in: added task for coverage report.
    * common.mk: added definition of forked simplecov url.
    * .gitignore: ignored coverage directory.

  Modified files:
    trunk/.gitignore
    trunk/ChangeLog
    trunk/Makefile.in
    trunk/common.mk
    trunk/test/runner.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47346)
+++ ChangeLog	(revision 47347)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Sep  2 16:58:03 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* test/runner.rb: reporting test coverage for test-all with COVERAGE env.
+	  [Feature #10189][ruby-core:64681]
+	* Makefile.in: added task for coverage report.
+	* common.mk: added definition of forked simplecov url.
+	* .gitignore: ignored coverage directory.
+
 Mon Sep  1 20:11:02 2014  Masaki Suketa <masaki.suketa@n...>
 
 	* ext/win32ole/win32ole.c (rbtime2vtdate): try to convert millisecond
Index: common.mk
===================================================================
--- common.mk	(revision 47346)
+++ common.mk	(revision 47347)
@@ -18,6 +18,8 @@ SPEC_GIT_BASE = git://github.com/nurse https://github.com/ruby/ruby/blob/trunk/common.mk#L18
 MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git
 RUBYSPEC_GIT_URL = $(SPEC_GIT_BASE)/rubyspec.git
 
+SIMPLECOV_GIT_URL = git://github.com/hsbt/simplecov.git
+
 STATIC_RUBY   = static-ruby
 
 EXTCONF       = extconf.rb
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 47346)
+++ Makefile.in	(revision 47347)
@@ -466,6 +466,18 @@ update-rubyspec: update-mspec https://github.com/ruby/ruby/blob/trunk/Makefile.in#L466
 test-rubyspec-precheck:
 	@if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here.  make update-rubyspec first.; exit 1; fi
 
+update-coverage:
+	@$(CHDIR) $(srcdir); \
+	if [ -d coverage/simplecov ]; then \
+	  cd coverage/simplecov; \
+	  echo updating simplecov ...; \
+	  exec git pull; \
+	else \
+	  echo retrieving simplecov ...; \
+	  exec git clone $(SIMPLECOV_GIT_URL) coverage/simplecov; \
+	  cd coverage/simplecov; \
+	fi
+
 INSNS	= opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
 	  vmtc.inc vm.inc
 
Index: test/runner.rb
===================================================================
--- test/runner.rb	(revision 47346)
+++ test/runner.rb	(revision 47347)
@@ -31,6 +31,12 @@ module Test::Unit https://github.com/ruby/ruby/blob/trunk/test/runner.rb#L31
   end
 end
 
+if ENV['COVERAGE']
+  $LOAD_PATH.unshift "#{src_testdir}/../coverage/simplecov/lib"
+  require 'simplecov'
+  SimpleCov.start
+end
+
 begin
   exit Test::Unit::AutoRunner.run(true, src_testdir)
 rescue NoMemoryError
Index: .gitignore
===================================================================
--- .gitignore	(revision 47346)
+++ .gitignore	(revision 47347)
@@ -55,6 +55,7 @@ y.tab.c https://github.com/ruby/ruby/blob/trunk/.gitignore#L55
 /config.status
 /config.status.lineno
 /configure
+/coverage
 /doc/capi
 /enc.mk
 /encdb.h

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]