Skip to content

Commit

Permalink
Travis build should now calculate code coverage and upload it to cove…
Browse files Browse the repository at this point in the history
…ralls
  • Loading branch information
PawelTroka committed Feb 21, 2017
1 parent 45ce3d2 commit 5f1e06d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,5 @@ script:
- ./build-mono/build.sh

after_script:
- ./build-mono/test.sh
- ./build-mono/test.sh
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./build-mono/coverage.sh; fi
11 changes: 9 additions & 2 deletions build-mono/coverage.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
if [ -z "$build_config" ]; then export build_config="Release"; fi #default is Release

sudo apt-get install libgtk2.0-dev
curl -sS https://api.nuget.org/packages/mono.cecil.0.9.5.4.nupkg > /tmp/mono.cecil.0.9.5.4.nupkg.zip
unzip /tmp/mono.cecil.0.9.5.4.nupkg.zip -d /tmp/cecil
cp /tmp/cecil/lib/net40/Mono.Cecil.dll .
cp /tmp/cecil/lib/net40/Mono.Cecil.dll /tmp/cecil/
git clone --depth=50 git://github.com/csMACnz/monocov.git ../../csMACnz/monocov
cd ../../csMACnz/monocov && cp /tmp/cecil/Mono.Cecil.dll . && ./configure && make && sudo make install
git clone --depth=50 git://github.com/csMACnz/monocov.git ../csMACnz/monocov
cd ../csMACnz/monocov
cp /tmp/cecil/Mono.Cecil.dll .
./configure
make
sudo make install
cd ../../Computator.NET

nuget install NUnit.Console -Version 3.6.0 -OutputDirectory testrunner
nuget install coveralls.net -Version 0.7.0 -OutputDirectory codecoveragetools

export LD_LIBRARY_PATH=/usr/local/lib
mono --debug --profile=monocov:outfile=monocovCoverage.cov,+[Computator.NET*]*,-[Computator.NET.Core]Computator.NET.Core.Properties.*,-[Computator.NET.Tests]*,-[Computator.NET.IntegrationTests]* ./testrunner/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe --noresult --inprocess --domain=Single --where:cat!=LongRunningTests ""Computator.NET.Tests/bin/"$build_config"/Computator.NET.Tests.dll"" ""Computator.NET.IntegrationTests/bin/"$build_config"/Computator.NET.IntegrationTests.dll""
monocov --export-xml=monocovCoverage monocovCoverage.cov

Expand Down
4 changes: 3 additions & 1 deletion build-mono/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ sudo apt-get install libc6-*
sudo apt-get install mono-complete
sudo apt-get install monodevelop --fix-missing
sudo apt-get install libmono-webbrowser4.0-cil
sudo apt-get install libgluezilla
sudo apt-get install libgluezilla
sudo apt-get install curl
sudo apt-get install libgtk2.0-dev

0 comments on commit 5f1e06d

Please sign in to comment.