Skip if raspivid not present.

This commit is contained in:
scruzin 2019-03-08 20:43:01 +10:30
parent e0471d5e2c
commit db265404eb
1 changed files with 11 additions and 5 deletions

View File

@ -9,10 +9,16 @@ import (
"bitbucket.org/ausocean/iot/pi/netsender"
)
// Supress all test logging, except for t.Errorf output.
const raspividPath = "/usr/local/bin/raspivid"
// Suppress all test logging, except for t.Errorf output.
var silent bool
func TestRaspivid(t *testing.T) {
if _, err := os.Stat(raspividPath); os.IsNotExist(err) {
t.Skip("Skipping TestRaspivid since no raspivid found.")
}
var logger testLogger
ns, err := netsender.New(&logger, nil, nil, nil)
if err != nil {