mswin-build 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea4522da05a50075fbbb6e7cfc25d221312a7e37
4
- data.tar.gz: 2c95e422c2abeb72b3e50c6fb6fc27b3a2fd1843
3
+ metadata.gz: ef8ffb17f2b65277994eb03de262f14ac5055bd6
4
+ data.tar.gz: 42b4bff8a9a4a37d7aa1345921e19ea499829f14
5
5
  SHA512:
6
- metadata.gz: 52f6c484f354119931fb4db8288441175e53ada21d86b7cd5814c2881f2989a111d6dba8137efd708bcc2fc485727e05e5a340965cf155f96821be8f088e332d
7
- data.tar.gz: 7ab23c4af24e811a00cd27255fde6f7d0377a989fa5ee2e98a133f0357a9c3d1b4d0e76e0ac979a7e9e5ec04c7fa98e00d3ca5000c0a424e4aa58650fe678229
6
+ metadata.gz: 801e3996986c90fc01854d61eaa675ba28fdbf8d99bf095a500515e9589fce4c6d68aec0c3192ab63e316fde0dd8c1d883a2818026dd106c1a6a9e28e89aa243
7
+ data.tar.gz: 5daafc2900cca3ce36c98fe167865ac00b09e1aab10f4dcc6044356c86ff1ad5bcb6ea081b374d6462dd274c4ccf95bf7c8efe20b5af41b0269c75d6160d690d
data/bin/tinyhttpd.rb CHANGED
@@ -1,4 +1,4 @@
1
- #! ruby
1
+ #!ruby
2
2
  # expected ruby 1.9.x or later.
3
3
 
4
4
  require "webrick"
@@ -7,9 +7,12 @@ class WEBrick::HTTPServer
7
7
  alias :__rewrite_old_service :service
8
8
  def service(req, res)
9
9
  ret = __rewrite_old_service(req, res)
10
- if /\.html\.gz\z/ =~ req.path
10
+ case req.path
11
+ when /\.html\.gz\z/
11
12
  res.header["content-encoding"] = "gzip"
12
13
  res.header["content-type"] = "text/html"
14
+ when /\.ltsv\z/
15
+ res.header["content-type"] = "text/plain"
13
16
  end
14
17
  end
15
18
  end
@@ -256,6 +256,7 @@ module MswinBuild
256
256
  io.puts "exit #{status.to_i}" unless status.nil?
257
257
  io.puts "failed(#{name})"
258
258
  @title << "failed(#{name})" if check_retval || status.nil?
259
+ @data["failure_#{name}"] = "failed(#{name})"
259
260
  @data[:result] = "failure"
260
261
  @links[name] << "failed"
261
262
  if $DEBUG
@@ -269,6 +270,7 @@ module MswinBuild
269
270
  io.puts $!.backtrace.join("\n| ")
270
271
  io.puts "failed(#{name} CommandTimeout)"
271
272
  @title << "failed(#{name} CommandTimeout)"
273
+ @data["failure_#{name}"] = "failed(#{name} CommandTimeout)"
272
274
  @data[:result] = "failure"
273
275
  @links[name] << "failed"
274
276
  if $DEBUG
@@ -399,8 +401,10 @@ module MswinBuild
399
401
  io.rewind
400
402
  if %r'^FAIL (\d+)/\d+' =~ io.read
401
403
  @title << "#{$1}BFail"
404
+ @data["failure_btest"] = "#{$1}BFail"
402
405
  else
403
406
  @title << "failed(btest)"
407
+ @data["failure_btest"] = "failed"
404
408
  end
405
409
  @data[:result] = "failure"
406
410
  end
@@ -412,8 +416,10 @@ module MswinBuild
412
416
  io.rewind
413
417
  if %r'^not ok/test: \d+ failed (\d+)' =~ io.read
414
418
  @title << "#{$1}NotOK"
419
+ @data["failure_test.rb"] = "#{$1}NotOK"
415
420
  else
416
421
  @title << "failed(test.rb)"
422
+ @data["failure_test.rb"] = "failed"
417
423
  end
418
424
  @data[:result] = "failure"
419
425
  end
@@ -468,9 +474,13 @@ module MswinBuild
468
474
  io.rewind
469
475
  if %r'^\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors, (\d+) skips' =~ io.read
470
476
  @title << "#{$1}F#{$2}E"
471
- @data[:result] = "failure" if $1.to_i + $2.to_i > 0
477
+ if $1.to_i + $2.to_i > 0
478
+ @data["failure_test-all"] = "#{$1}F#{$2}E"
479
+ @data[:result] = "failure"
480
+ end
472
481
  else
473
482
  @title << "failed(test-all)"
483
+ @data["failure_test-all"] = "failed"
474
484
  @data[:result] = "failure"
475
485
  end
476
486
  end
@@ -563,15 +573,27 @@ module MswinBuild
563
573
  end
564
574
  end
565
575
  end
566
- @title.insert(2, "#{warns}W") if warns > 0
576
+ title = @title[0, 2]
567
577
  @data[:warn] = "#{warns}W"
578
+ if warns > 0
579
+ @title.insert(2, @data[:warn])
580
+ title << @data[:warn]
581
+ end
568
582
  url = @data.delete(:svn_url)
569
583
  if revision
570
- @title.unshift("r#{revision}")
571
584
  @data[:ruby_rev] = "r#{revision}"
585
+ @title.unshift(@data[:ruby_rev])
586
+ title.unshift(@data[:ruby_rev])
572
587
  @data[:version] = "#{@data[:ruby_rev]} #{@data[:version]}"
573
588
  @data[url] = revision
574
589
  end
590
+ @data.each_pair do |k, v|
591
+ if k.is_a?(String) && /^failure_/ =~ k
592
+ v = "#{$'}:#{v}" if $' == "rubyspec"
593
+ title << v
594
+ end
595
+ end
596
+ @data[:title] = title.join(' ')
575
597
  open(logfile, "w") do |out|
576
598
  header(out)
577
599
  out.puts " <ul>"
@@ -626,7 +648,6 @@ module MswinBuild
626
648
  end
627
649
 
628
650
  title = @title.join(' ')
629
- @data[:title] = title
630
651
  time = @data[:start_time]
631
652
  latest = %'<a href="log/#{u time}.log.html.gz" name="#{u time}">#{h time}</a> #{h title} (<a href="log/#{u time}.diff.html.gz">#{@diff ? h(@diff) : "no diff"}</a>)<br>'
632
653
  if mode == :recent
@@ -683,7 +704,7 @@ module MswinBuild
683
704
  k = k.to_s
684
705
  k = k.gsub(/:/, '\\x3A')
685
706
  v = v.gsub(/\t/, ' ')
686
- k = %'"#{k}"' if /\W/ =~ k
707
+ k = %'"#{k}"' if /\\/ =~ k
687
708
  "#{k}:#{v}"
688
709
  }.join("\t")
689
710
  old.unshift(latest)
@@ -1,3 +1,3 @@
1
1
  module MswinBuild
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -201,7 +201,7 @@ env:
201
201
  assert_match(/\bresult:success\b/, recent)
202
202
  assert_match(/\bruby_rev:r12345\b/, recent)
203
203
  assert_match(/"http\\x3A\/\/[^:]+":12345\b/, recent)
204
- assert_not_match(/\btitle:[^\t]*\bfailed\b/, recent)
204
+ assert_not_match(/\btitle:[^\t]*\b(failed|success|\dE\dF)\b/, recent)
205
205
  end
206
206
 
207
207
  def test_run_btest_failure
@@ -228,6 +228,7 @@ env:
228
228
 
229
229
  recent = File.read(File.join(@tmpdir, "recent.ltsv"))
230
230
  assert_match(/\bresult:failure\b/, recent)
231
+ assert_match(/\bfailure_btest:3BFail\b/, recent)
231
232
  assert_match(/\btitle:[^\t]*\b3BFail\b/, recent)
232
233
  assert_not_match(/\btitle:[^\t]*\bfailed\b/, recent)
233
234
  end
@@ -256,6 +257,7 @@ env:
256
257
 
257
258
  recent = File.read(File.join(@tmpdir, "recent.ltsv"))
258
259
  assert_match(/\bresult:failure\b/, recent)
260
+ assert_match(/\bfailure_test.rb:4NotOK\b/, recent)
259
261
  assert_match(/\btitle:[^\t]*\b4NotOK\b/, recent)
260
262
  assert_not_match(/\btitle:[^\t]*\bfailed\b/, recent)
261
263
  end
@@ -284,6 +286,7 @@ env:
284
286
 
285
287
  recent = File.read(File.join(@tmpdir, "recent.ltsv"))
286
288
  assert_match(/\bresult:failure\b/, recent)
289
+ assert_match(/\bfailure_test-all:2F1E\b/, recent)
287
290
  assert_match(/\btitle:[^\t]*\b2F1E\b/, recent)
288
291
  assert_not_match(/\btitle:[^\t]*\bfailed\b/, recent)
289
292
  end
@@ -309,6 +312,7 @@ env:
309
312
 
310
313
  recent = File.read(File.join(@tmpdir, "recent.ltsv"))
311
314
  assert_match(/\bresult:failure\b/, recent)
315
+ assert_match(/\bfailure_test-all:failed\(test-all CommandTimeout\)/, recent)
312
316
  assert_match(/\btitle:[^\t]*\bfailed\(test-all CommandTimeout\)/, recent)
313
317
  end
314
318
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mswin-build
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - U.Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2017-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler