Merge pull request #155 from shirou/add_circleci

add circle.yml.
pull/158/head
shirou 9 years ago
commit 614df95d72

@ -1,8 +1,8 @@
gopsutil: psutil for golang
==============================
.. image:: https://drone.io/github.com/shirou/gopsutil/status.png
:target: https://drone.io/github.com/shirou/gopsutil
.. image:: https://circleci.com/gh/shirou/gopsutil.svg?&style=shield
:target: https://circleci.com/gh/shirou/gopsutil
.. image:: https://coveralls.io/repos/shirou/gopsutil/badge.svg?branch=master
:target: https://coveralls.io/r/shirou/gopsutil?branch=master

@ -0,0 +1,3 @@
machine:
timezone:
Asia/Tokyo

@ -2,6 +2,7 @@ package cpu
import (
"fmt"
"os"
"runtime"
"testing"
"time"
@ -71,8 +72,11 @@ func testCPUPercent(t *testing.T, percpu bool) {
if err != nil {
t.Errorf("error %v", err)
}
if (percpu && len(v) != numcpu) || (!percpu && len(v) != 1) {
t.Fatalf("wrong number of entries from CPUPercent: %v", v)
// Skip CircleCI which CPU num is different
if os.Getenv("CIRCLECI") != "true" {
if (percpu && len(v) != numcpu) || (!percpu && len(v) != 1) {
t.Fatalf("wrong number of entries from CPUPercent: %v", v)
}
}
}
for i := 0; i < testCount; i++ {

Loading…
Cancel
Save