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

ruby-changes:46803

From: nobu <ko1@a...>
Date: Sat, 27 May 2017 12:43:08 +0900 (JST)
Subject: [ruby-changes:46803] nobu:r58918 (trunk): mspec/commands/mspec.rb: formatter for multi_exec

nobu	2017-05-27 12:43:02 +0900 (Sat, 27 May 2017)

  New Revision: 58918

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

  Log:
    mspec/commands/mspec.rb: formatter for multi_exec
    
    * spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#multi_exec):
      as multi_exec children must run with yaml formatter, append the
      option for it after other options to override another formatter
      option with a warning if it is given.

  Modified files:
    trunk/.travis.yml
    trunk/spec/mspec/lib/mspec/commands/mspec.rb
Index: .travis.yml
===================================================================
--- .travis.yml	(revision 58917)
+++ .travis.yml	(revision 58918)
@@ -62,7 +62,7 @@ before_script: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L62
 script:
   - "make -s test TESTOPTS=--color=never"
   - "make -s $JOBS test-all TESTOPTS='-q --color=never --job-status=normal'"
-  - "make -s $JOBS test-rubyspec MSPECOPT=-fm"
+  - "make -s $JOBS test-rubyspec MSPECOPT=-j"
 
 # Branch matrix.  Not all branches are Travis-ready so we limit branches here.
 branches:
Index: spec/mspec/lib/mspec/commands/mspec.rb
===================================================================
--- spec/mspec/lib/mspec/commands/mspec.rb	(revision 58917)
+++ spec/mspec/lib/mspec/commands/mspec.rb	(revision 58918)
@@ -44,7 +44,6 @@ class MSpecMain < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec.rb#L44
 
     options.on("-j", "--multi", "Run multiple (possibly parallel) subprocesses") do
       config[:multi] = true
-      config[:options] << "-fy"
     end
 
     options.version MSpec::VERSION do
@@ -94,6 +93,9 @@ class MSpecMain < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec.rb#L93
 
     require 'mspec/runner/formatters/multi'
     formatter = MultiFormatter.new
+    if config[:formatter]
+      warn "formatter options is ignored due to multi option"
+    end
 
     output_files = []
     processes = [cores, @files.size].min
@@ -105,7 +107,7 @@ class MSpecMain < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec.rb#L107
         "SPEC_TEMP_DIR" => "rubyspec_temp_#{i}",
         "MSPEC_MULTI" => i.to_s
       }
-      command = argv + ["-o", name]
+      command = argv + ["-fy", "-o", name]
       $stderr.puts "$ #{command.join(' ')}" if $MSPEC_DEBUG
       IO.popen([env, *command], "rb+")
     }

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

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