Development

Changeset 19794

You must first sign up to be able to contribute.

Changeset 19794

Show
Ignore:
Timestamp:
07/01/09 16:56:32 (5 years ago)
Author:
fabien
Message:

[lime] made lime_harness verbose mode output relative filenames

Files:

Legend:

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

    r19792 r19794  
    3636 
    3737    $this->options = array_merge(array( 
    38       'base_dir'     => null, 
    3938      'force_colors' => false, 
    4039      'output'       => null, 
     
    4342 
    4443    $this->output = $this->options['output'] ? $this->options['output'] : new lime_output($this->options['force_colors']); 
    45     $this->options['base_dir'] = realpath($this->options['base_dir']); 
    4644 
    4745    $caller = $this->find_caller(debug_backtrace()); 
     
    532530    // return the first call 
    533531    $last = count($traces) - 1; 
    534     $file = $traces[$last]['file']; 
    535     if ($this->options['base_dir']) 
    536     { 
    537       $file = str_replace(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->options['base_dir']), '', str_replace(array('/', '\\'), $file)); 
    538     } 
    539     return array($file, $traces[$last]['line']); 
     532    return array($traces[$last]['file'], $traces[$last]['line']); 
    540533  } 
    541534} 
     
    895888            { 
    896889              $this->output->echoln(''); 
    897               $this->output->error($testsuite['file']); 
     890              $this->output->error($this->get_relative_file($testsuite['file']).$this->extension); 
    898891              $first = false; 
    899892            } 
    900893 
    901             $this->output->comment(sprintf('  at %s line %s', $testsuite['tests'][$testcase]['file'], $testsuite['tests'][$testcase]['line'])); 
     894            $this->output->comment(sprintf('  at %s line %s', $this->get_relative_file($testsuite['tests'][$testcase]['file']).$this->extension, $testsuite['tests'][$testcase]['line'])); 
    902895            $this->output->info('  '.$testsuite['tests'][$testcase]['message']); 
    903896            $this->output->echoln($testsuite['tests'][$testcase]['error'], null, false);