How to set coverageEnabled to true in Multiple Projects

170 views
Skip to first unread message

dev....@gmail.com

unread,
Aug 12, 2015, 5:52:40 PM8/12/15
to Scala code coverage tool
Hi,

We have a multi project sbt set up. When i run "sbt clean coverage test", it just enable coverage to parent project and not the child modules. Is there anyway i can enabled it on command line.
If i specifically set coverageEnabled:=true in each project, it does fine but then coverage run for "sbt test" too which eats time. I just want to enable it for production system. Any idea or pointers ?

dev....@gmail.com

unread,
Aug 12, 2015, 6:23:04 PM8/12/15
to Scala code coverage tool, dev....@gmail.com
I created a small script for this :

#!/usr/bin/env bash

echo "****** Starting Coverage Report ******"
projects=(A B C D)


cd ../
current = pwd
echo "Current Directory : ${current}"

for project in ${projects[@]}; do
echo "****** Coverage Report For Project : ${project} ******"
sbt "project ${project}" coverage test
done

sbt coverageReport

sbt coverageAggregate
Reply all
Reply to author
Forward
0 new messages