forked from sass/node-sass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sass#503 from mgreter/feature/coveralls-metrics
Fixes build to report correctly to coveralls.io
- Loading branch information
Showing
10 changed files
with
140 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use JSON; | ||
use File::Slurp; | ||
my $json = JSON->new; | ||
my $file = read_file('coveralls.json', { binmode => ':utf8' }); | ||
my $rv = $json->decode($file); | ||
my $sources = $rv->{'source_files'}; | ||
print STDERR join ", ", keys %{$rv}, "\n"; | ||
foreach my $source (sort { | ||
$a->{'name'} cmp $b->{'name'} | ||
} @{$sources}) | ||
{ | ||
my $sum = 0; | ||
my $undefs = 0; | ||
my $coverages = $source->{'coverage'}; | ||
foreach my $coverage (@{$coverages}) | ||
{ | ||
if (defined $coverage) | ||
{ $sum += $coverage } | ||
else { $undefs ++; } | ||
} | ||
if ($sum > 0) | ||
{ | ||
print STDERR $source->{'name'}; | ||
print STDERR " [sum: $sum]"; | ||
print STDERR " [undefs: $undefs]"; | ||
print STDERR "\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
if [ "x$CXX" = "xg++" ]; then | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
sudo apt-get update -qq | ||
sudo apt-get install -qq g++-4.8 | ||
sudo rm /usr/bin/cpp | ||
sudo rm /usr/bin/gcc | ||
sudo rm /usr/bin/c++ | ||
sudo rm /usr/bin/g++ | ||
sudo rm /usr/bin/gcov | ||
sudo ln -s /usr/bin/cpp-4.8 /usr/bin/cpp | ||
sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc | ||
sudo ln -s /usr/bin/c++-4.8 /usr/bin/c++ | ||
sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++ | ||
sudo ln -s /usr/bin/gcov-4.8 /usr/bin/gcov | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters