File tree 3 files changed +18
-2
lines changed
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change
1
+ language : go
2
+ go :
3
+ - 1.4
4
+ - 1.6
5
+ - tip
6
+ env :
7
+ - GOOS=linux CGO=1
8
+ - GOOS=linux CGO=0
9
+ - GOOS=windows GOARCH=386
Original file line number Diff line number Diff line change 1
1
[ ![ GoDoc] ( https://godoc.org/github.com/tarm/serial?status.svg )] ( http://godoc.org/github.com/tarm/serial )
2
+ [ ![ Build Status] ( https://travis-ci.org/tarm/serial.svg?branch=master )] ( https://travis-ci.org/tarm/serial )
2
3
3
4
Serial
4
5
========
Original file line number Diff line number Diff line change 3
3
package serial
4
4
5
5
import (
6
+ "os"
6
7
"testing"
7
8
"time"
8
9
)
9
10
10
11
func TestConnection (t * testing.T ) {
11
- c0 := & Config {Name : "/dev/ttyUSB0" , Baud : 115200 }
12
- c1 := & Config {Name : "/dev/ttyUSB1" , Baud : 115200 }
12
+ port0 := os .Getenv ("PORT0" )
13
+ port1 := os .Getenv ("PORT1" )
14
+ if port0 == "" || port1 == "" {
15
+ t .Skip ("Skipping test because PORT0 or PORT1 environment variable is not set" )
16
+ }
17
+ c0 := & Config {Name : port0 , Baud : 115200 }
18
+ c1 := & Config {Name : port1 , Baud : 115200 }
13
19
14
20
s1 , err := OpenPort (c0 )
15
21
if err != nil {
You can’t perform that action at this time.
0 commit comments