Properly sort both the versioned and the scratch builds against each other.

This commit is contained in:
Jan Kratochvil 2007-01-07 22:47:44 +00:00
parent 803b8bdf52
commit b76482a34c
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/perl
# $Id$
# $Id: gdbcompare,v 1.1 2006/12/12 22:56:16 jkratoch Exp $
use strict;
@ -25,7 +25,8 @@ for (values(%arch)) {
system("rm -f tests/gdbcompare-*.diff") and die;
for my $arch (sort keys(%arch)) {
my @sorted=sort { ($a=~/([-.])[^-.]+[.]\w+$/)[0] cmp ($b=~/([-.])[^-.]+[.]\w+$/)[0];; } @{$arch{$arch}};
sub trans { return {"."=>0,"-"=>1}->{($_[0]=~/([-.])[^-.]+[.]\w+$/)[0]}.$_[0]; };
my @sorted=sort { my $a1=trans $a; my $b1=trans $b; $b1 cmp $a1; } @{$arch{$arch}};
do { system $_ and die $_; } for "diff -u tests/'".$sorted[1]."' tests/'".$sorted[0]."' >tests/gdbcompare-'$arch'.diff;true";
}