fx-core /support/rake/display_ocunit_failures_at_end.rb

Language Ruby Lines 38
MD5 Hash 3508b9c911786d510fe5c53175d270de Estimated Cost $776 (why?)
Repository git://github.com/framework-x/fx-core.git View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
failures = []
STDIN.each_line do |line|
  # puts line
  # next
  if line =~ /UnitTests.+finished/
    @finished = true
  end
  case line
  when /^Test Case .+ failed /
    failures << line.strip
    print "F"
  when /Test\.m:\d+: error/
    failures << line.strip
  when /^Test Case .+ passed /, /^Test Suite .+ started /, /^Test Suite .+ finished /
    print "."
  when /Executed.+test.+failure.+seconds/
    if @finished
      print "\n"
      puts line
    end
  when /is missing/, /unrecognized selector sent/, /set a breakpoint in/, /NSFileManagerXTest_file_that_does_not_exist/,
       /^Error, could not create MachMessagePort for database doctor/, /double free/
  else
    unless line.strip.empty?
      print "\n"
      puts line
    end
  end
  $stdout.flush
end
if failures.any?
  puts ""
  puts failures.join("\n")
  puts "#{failures.grep(/failed/).size} failures"
  puts ""
end
Back to Top