2014-07-23 00:16:54 +08:00
|
|
|
#!/bin/bash
|
2016-12-20 20:25:22 +08:00
|
|
|
PACKAGES=('gobot' 'gobot/api' 'gobot/sysfs' 'gobot/drivers/gpio' 'gobot/drivers/aio' 'gobot/drivers/i2c' 'gobot/platforms/firmata/client' 'gobot/platforms/intel-iot/edison' 'gobot/platforms/intel-iot/joule' 'gobot/platforms/parrot/ardrone' 'gobot/platforms/parrot/bebop' 'gobot/platforms/parrot/minidrone' 'gobot/platforms/sphero/ollie' 'gobot/platforms/sphero/bb8' $(ls ./platforms | sed -e 's/^/gobot\/platforms\//'))
|
2014-07-23 00:16:54 +08:00
|
|
|
EXITCODE=0
|
|
|
|
|
2014-12-20 03:26:44 +08:00
|
|
|
echo "mode: set" > profile.cov
|
2014-07-23 00:16:54 +08:00
|
|
|
touch tmp.cov
|
|
|
|
for package in "${PACKAGES[@]}"
|
|
|
|
do
|
2016-12-08 20:24:03 +08:00
|
|
|
go test -a -coverprofile=tmp.cov gobot.io/x/$package
|
2014-07-23 00:16:54 +08:00
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then
|
|
|
|
EXITCODE=1
|
|
|
|
fi
|
2014-12-20 03:26:44 +08:00
|
|
|
cat tmp.cov | grep -v "mode: set" >> profile.cov
|
2014-07-23 00:16:54 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
if [ $EXITCODE -ne 0 ]
|
|
|
|
then
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2016-02-05 04:47:58 +08:00
|
|
|
|
|
|
|
export PATH=$PATH:$HOME/gopath/bin/
|
|
|
|
goveralls -v -coverprofile=profile.cov -service=travis-ci -repotoken=sFrR9ZmLP5FLc34lOaqir67RPzYOvFPUB
|