Merge pull request #40 from kylelemons/coverage

Add test coverage reporting based on Coveralls
This commit is contained in:
zagrodzki
2017-03-22 19:13:57 +01:00
committed by GitHub
4 changed files with 31 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -3,6 +3,7 @@ Introduction
[![Build Status][ciimg]][ci]
[![GoDoc][docimg]][doc]
[![Coverage Status](https://coveralls.io/repos/github/kylelemons/gousb/badge.svg?branch=coverage)](https://coveralls.io/github/kylelemons/gousb?branch=coverage)
The gousb package is an attempt at wrapping the libusb library into a Go-like binding.

View File

@@ -16,12 +16,16 @@
package usb_test
import (
"os"
"testing"
. "github.com/kylelemons/gousb/usb"
)
func TestGetStringDescriptorAscii(t *testing.T) {
if os.Getenv("TRAVIS") == "true" {
t.Skip("test known to fail on Travis")
}
c := NewContext()
defer c.Close()
c.Debug(0)

View File

@@ -26,12 +26,18 @@ import (
)
func TestNoop(t *testing.T) {
if os.Getenv("TRAVIS") == "true" {
t.Skip("test known to fail on Travis")
}
c := NewContext()
defer c.Close()
c.Debug(0)
}
func TestEnum(t *testing.T) {
if os.Getenv("TRAVIS") == "true" {
t.Skip("test known to fail on Travis")
}
c := NewContext()
defer c.Close()
c.Debug(0)
@@ -83,6 +89,9 @@ func TestEnum(t *testing.T) {
}
func TestOpenDeviceWithVidPid(t *testing.T) {
if os.Getenv("TRAVIS") == "true" {
t.Skip("test known to fail on Travis")
}
c := NewContext()
defer c.Close()
c.Debug(0)
@@ -123,6 +132,9 @@ func TestOpenDeviceWithVidPid(t *testing.T) {
}
func TestMultipleContexts(t *testing.T) {
if os.Getenv("TRAVIS") == "true" {
t.Skip("test known to fail on Travis")
}
var buf bytes.Buffer
log.SetOutput(&buf)
for i := 0; i < 2; i++ {