aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-12-09 11:02:54 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-12-09 11:34:20 +0100
commit9408ad93b351c9194b0b2d355f86b28c7be93404 (patch)
tree7f2618813e3252b4f3ba455bc05115968ec98d29 /scripts
parentbeede7d7cff3e740ec0b0053ae9e382693e7f42c (diff)
test2tasks.pl: Fix differing output format of testlib on Unix.
Change-Id: I37fb39fa00e7e4a45ac843eba9f50d2d95a56ae1 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test2tasks.pl22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/test2tasks.pl b/scripts/test2tasks.pl
index abaf6ae77a..7e60fdc12d 100755
--- a/scripts/test2tasks.pl
+++ b/scripts/test2tasks.pl
@@ -39,18 +39,24 @@ my $lastLine = '';
while (my $line = <STDIN> ) {
chomp($line);
# --- Continuation line?
- if (substr($line, 0, 1) eq ' ') {
+ if (substr($line, 0, 1) eq ' ' && index($line, 'Loc: [') < 0) {
$lastLine .= $line;
next;
}
- # --- extract file name based matching '[..\].\tst_lancelot.cpp(258) : failure location'
- if ($line =~ /^([^(]+)\((\d+)\) : failure location$/) {
- my $slashPos = rindex($1, '/');
- $slashPos = rindex($1, "\\") if $slashPos < 0;
- my $fileName = $slashPos > 0 ? substr($1, $slashPos + 1) : $1;
+ # --- extract file name based matching:
+ # Windows: '[..\].\tst_lancelot.cpp(258) : failure location'
+ # Unix: ' Loc: [file(1596)]'
+ if ($line =~ /^([^(]+)\((\d+)\) : failure location$/
+ || $line =~ /^\s*Loc:\s*\[([^(]+)\((\d+)\).*$/) {
+ my $fullFileName = $1;
my $line = $2;
- my $fullFileName = $fileHash{$fileName};
- $fullFileName = $fileName unless defined $fullFileName;
+ if (index($fullFileName, '/') != 0) { # Unix has absolute file names, Windows may not
+ my $slashPos = rindex($fullFileName, '/');
+ $slashPos = rindex($fullFileName, "\\") if $slashPos < 0;
+ my $fileName = $slashPos > 0 ? substr($1, $slashPos + 1) : $fullFileName;
+ $fullFileName = $fileHash{$fileName};
+ $fullFileName = $fileName unless defined $fullFileName;
+ }
my $type = index($lastLine, 'FAIL') == 0 ? 'err' : 'unknown';
print $fullFileName, "\t", $line, "\t", $type, "\t", $lastLine,"\n";
}