diff --git a/README.rst b/README.rst index 3aeb534..e16d591 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..754bc0b --- /dev/null +++ b/circle.yml @@ -0,0 +1,3 @@ +machine: + timezone: + Asia/Tokyo \ No newline at end of file diff --git a/cpu/cpu_test.go b/cpu/cpu_test.go index 9695e35..b735201 100644 --- a/cpu/cpu_test.go +++ b/cpu/cpu_test.go @@ -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++ { diff --git a/process/expected/darwin/%2Fbin%2Fps-x-opid_fail b/process/expected/darwin/%2Fbin%2Fps-ax-opid_fail similarity index 100% rename from process/expected/darwin/%2Fbin%2Fps-x-opid_fail rename to process/expected/darwin/%2Fbin%2Fps-ax-opid_fail