Skip to content

Commit 37be519

Browse files
author
Tarmigan Casebolt
committed
Add travis-ci integration
1 parent 8f6b208 commit 37be519

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![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)
23

34
Serial
45
========

basic_test.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@
33
package serial
44

55
import (
6+
"os"
67
"testing"
78
"time"
89
)
910

1011
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}
1319

1420
s1, err := OpenPort(c0)
1521
if err != nil {

0 commit comments

Comments
 (0)