Development

Changeset 19720

You must first sign up to be able to contribute.

Changeset 19720

Show
Ignore:
Timestamp:
06/30/09 19:08:39 (5 years ago)
Author:
fabien
Message:

[lime] added a verbose mode to lime_harness

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/lime/trunk/lib/lime.php

    r19716 r19720  
    639639      'force_colors' => false, 
    640640      'output'       => null, 
     641      'verbose'      => false, 
    641642    ), $options); 
    642643 
     
    845846        $nb_tests > 0 ? ($nb_tests - $nb_failed_tests) * 100 / $nb_tests : 0 
    846847      )); 
     848 
     849      if ($this->options['verbose']) 
     850      { 
     851        foreach ($this->to_array() as $testsuite) 
     852        { 
     853          $first = true; 
     854          foreach ($testsuite['stats']['failed'] as $testcase) 
     855          { 
     856            if (!isset($testsuite['tests'][$testcase]['file'])) 
     857            { 
     858              continue; 
     859            } 
     860 
     861            if ($first) 
     862            { 
     863              $this->output->echoln(''); 
     864              $this->output->error($testsuite['file']); 
     865              $first = false; 
     866            } 
     867 
     868            $this->output->comment(sprintf('  at %s line %s', $testsuite['tests'][$testcase]['file'], $testsuite['tests'][$testcase]['line'])); 
     869            $this->output->info('  '.$testsuite['tests'][$testcase]['message']); 
     870            $this->output->echoln($testsuite['tests'][$testcase]['error']); 
     871          } 
     872        } 
     873      } 
    847874    } 
    848875    else