From 436ad8765ebfa5dc12392de8d14167e88baef402 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Wed, 12 May 2010 22:05:01 +0000 Subject: tests: Improved platform/toolset formatting git-svn-id: http://pugixml.googlecode.com/svn/trunk@420 99668b35-9821-0410-8761-19e4c4f06640 --- tests/autotest-report.pl | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/autotest-report.pl b/tests/autotest-report.pl index 7f269c9..9265387 100644 --- a/tests/autotest-report.pl +++ b/tests/autotest-report.pl @@ -1,5 +1,39 @@ #!/usr/bin/perl +# pretty-printing +sub prettytoolset +{ + my $toolset = shift; + + return "Borland C++ 5.82" if ($toolset eq 'bcc'); + return "Metrowerks CodeWarrior 8" if ($toolset eq 'cw'); + return "Digital Mars C++ 8.51" if ($toolset eq 'dmc'); + + return "Intel C++ Compiler $1.0" if ($toolset =~ /^ic(\d+)$/); + return "MinGW32 (GCC $1.$2)" if ($toolset =~ /^mingw(\d)(\d)$/); + return "Microsoft Visual C++ 7.1" if ($toolset eq 'msvc71'); + return "Microsoft Visual C++ $1.0" if ($toolset =~ /^msvc(\d+)$/); + return "Microsoft Visual C++ $1.0 x64" if ($toolset =~ /^msvc(\d+)_x64$/); + + $toolset; +} + +sub prettyplatform +{ + my $platform = shift; + + return "linux64" if ($platform =~ /64-linux/); + return "linux32" if ($platform =~ /86-linux/); + + return "freebsd64" if ($platform =~ /64-freebsd/); + return "freebsd32" if ($platform =~ /86-freebsd/); + + return "win64" if ($platform =~ /MSWin32-x64/); + return "win32" if ($platform =~ /MSWin32/); + + $platform; +} + # parse build log %results = (); %toolsets = (); @@ -22,7 +56,7 @@ while (<>) die "Detected duplicate build information $_\n" if defined $results{"$toolset $platform"}{$configuration}{$defineset}; - my $fulltool = "$toolset $platform"; + my $fulltool = &prettyplatform($platform) . ' ' . &prettytoolset($toolset); my $fullconf = "$configuration $defineset"; $results{$fulltool}{$fullconf}{result} = $result; @@ -51,14 +85,14 @@ print <configuration"; +print "configuration"; print "".(split /\s+/)[0]."" foreach (@configurationarray); print "\n"; # print defines header (one row for each define) foreach $define (sort {$a cmp $b} keys %defines) { - print "$define"; + print "$define"; foreach (@configurationarray) { @@ -72,7 +106,8 @@ foreach $define (sort {$a cmp $b} keys %defines) # print data (one row for each toolset) foreach $tool (@toolsetarray) { - print "$tool"; + my ($platform, $toolset) = split(/\s+/, $tool, 2); + print "$platform$toolset"; foreach (@configurationarray) { -- cgit v1.2.3