#!/usr/bin/perl # pretty-printing sub prettysuffix { my $suffix = shift; return " C++0x" if ($suffix eq '_0x'); return " x64" if ($suffix eq '_x64'); return " CLR" if ($suffix eq '_clr'); return " CLR x64" if ($suffix eq '_clr_x64'); return " PPC" if ($suffix eq '_ppc'); return " WinCE" if ($suffix eq '_wince'); return " ARM" if ($suffix eq '_arm'); return ""; } 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 "Sun C++ 5.10" . prettysuffix($1) if ($toolset =~ /^suncc(.*)$/); return "Intel C++ Compiler $1.0" . prettysuffix($2) if ($toolset =~ /^ic(\d+)(.*)$/); return "MinGW (GCC $1.$2)" . prettysuffix($3) if ($toolset =~ /^mingw(\d)(\d)(.*)$/); return "Microsoft Visual C++ 7.1" if ($toolset eq 'msvc71'); return "Microsoft Visual C++ $1.0" . prettysuffix($2) if ($toolset =~ /^msvc(\d+)(.*)$/); return "GNU C++ Compiler $1" . prettysuffix($2) if ($toolset =~ /^gcc([\d.]*)(.*)$/); return "Microsoft Xbox360 Compiler" if ($toolset =~ /^xbox360/); return "Sony PlayStation3 GCC" if ($toolset =~ /^ps3_gcc/); return "Sony PlayStation3 SNC" if ($toolset =~ /^ps3_snc/); return "Android NDK (GCC)" . ($1 eq '_stlport' ? " STLport" : "") if ($toolset =~ /^android(.*)$/); return "bada SDK (GCC)" if ($toolset =~ /^bada$/); return "BlackBerry NDK (GCC)" if ($toolset =~ /^blackberry$/); $toolset; } sub prettyplatform { my ($platform, $toolset) = @_; return "solaris" if ($platform =~ /solaris/); return "macos" if ($platform =~ /darwin/); return "linux64" if ($platform =~ /64-linux/); return "linux32" if ($platform =~ /86-linux/); return "fbsd64" if ($platform =~ /64-freebsd/); return "fbsd32" if ($platform =~ /86-freebsd/); return "x360" if ($toolset =~ /^xbox360/); return "ps3" if ($toolset =~ /^ps3/); return "arm" if ($toolset =~ /_arm$/); return "arm" if ($toolset =~ /_wince$/); return "arm" if ($toolset =~ /^android/); return "arm" if ($toolset =~ /^bada/); return "arm" if ($toolset =~ /^blackberry/); return "win64" if ($platform =~ /MSWin32-x64/); return "win32" if ($platform =~ /MSWin32/); $platform; } sub prettybox { my $enabled = shift; my $color = $enabled ? "#cccccc" : "#ffffff"; "
optimization | "; print &prettybox((split /\s+/)[0] eq 'release') foreach (@configurationarray); print "|||||
$define | "; foreach (@configurationarray) { my $present = ($_ =~ /\b$define\b/); print &prettybox($present); } print "|||||
$platform | "; } elsif ($$info{result} eq "success") { my $coverage = $$info{coverage}; print " | pass";
if ($coverage > 0)
{
print " " . ($coverage + 0) . "%"; } print " | ";
}
elsif ($$info{result} eq "skiprun")
{
print "pass | " } else { print "fail | " } } print "