|
|
|
@ -6,6 +6,7 @@ package bmxx80
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
"flag"
|
|
|
|
"io/ioutil"
|
|
|
|
"io/ioutil"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
@ -610,10 +611,6 @@ func TestI2CSenseContinuous280_command_fail(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestI2CSenseContinuous280_sense_fail(t *testing.T) {
|
|
|
|
func TestI2CSenseContinuous280_sense_fail(t *testing.T) {
|
|
|
|
if !testing.Verbose() {
|
|
|
|
|
|
|
|
log.SetOutput(ioutil.Discard)
|
|
|
|
|
|
|
|
defer log.SetOutput(os.Stderr)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bus := i2ctest.Playback{
|
|
|
|
bus := i2ctest.Playback{
|
|
|
|
Ops: []i2ctest.IO{
|
|
|
|
Ops: []i2ctest.IO{
|
|
|
|
// Chip ID detection.
|
|
|
|
// Chip ID detection.
|
|
|
|
@ -1027,3 +1024,11 @@ type spiFail struct {
|
|
|
|
func (s *spiFail) Connect(f physic.Frequency, mode spi.Mode, bits int) (spi.Conn, error) {
|
|
|
|
func (s *spiFail) Connect(f physic.Frequency, mode spi.Mode, bits int) (spi.Conn, error) {
|
|
|
|
return nil, errors.New("failing")
|
|
|
|
return nil, errors.New("failing")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
|
|
|
|
flag.Parse()
|
|
|
|
|
|
|
|
if !testing.Verbose() {
|
|
|
|
|
|
|
|
log.SetOutput(ioutil.Discard)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
os.Exit(m.Run())
|
|
|
|
|
|
|
|
}
|
|
|
|
|