Commit 614df95d authored by shirou's avatar shirou

Merge pull request #155 from shirou/add_circleci

add circle.yml.
parents 7fd975a4 fe4c9f8f
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
......
machine:
timezone:
Asia/Tokyo
\ No newline at end of file
......@@ -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++ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment