From c54ae65e78155d74d2a8d7c8df499336737eeb12 Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Fri, 12 Feb 2016 22:28:52 +0900 Subject: [PATCH 1/4] add circle.yml. --- circle.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 circle.yml 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 From 7f22150707307ce2fa64d31004b450fabe0e75ed Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Fri, 12 Feb 2016 22:44:17 +0900 Subject: [PATCH 2/4] CPU num is different on the CircleCI environemnt, so we skip it. --- cpu/cpu_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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++ { From 5a09d40f6b24b8b9fa41a6b0bd6cd3bf217dce92 Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Fri, 12 Feb 2016 22:50:06 +0900 Subject: [PATCH 3/4] [process]darwin: expected ps file was changed. --- process/expected/darwin/%2Fbin%2Fps-ax-opid_fail | 10 ++++++++++ process/expected/darwin/%2Fbin%2Fps-x-opid_fail | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 process/expected/darwin/%2Fbin%2Fps-ax-opid_fail delete mode 100644 process/expected/darwin/%2Fbin%2Fps-x-opid_fail diff --git a/process/expected/darwin/%2Fbin%2Fps-ax-opid_fail b/process/expected/darwin/%2Fbin%2Fps-ax-opid_fail new file mode 100644 index 0000000..fce59ef --- /dev/null +++ b/process/expected/darwin/%2Fbin%2Fps-ax-opid_fail @@ -0,0 +1,10 @@ + PID + 245 + 247 + 248 + 249 + 254 + 262 + 264 + 265 + 267 diff --git a/process/expected/darwin/%2Fbin%2Fps-x-opid_fail b/process/expected/darwin/%2Fbin%2Fps-x-opid_fail deleted file mode 100644 index fce59ef..0000000 --- a/process/expected/darwin/%2Fbin%2Fps-x-opid_fail +++ /dev/null @@ -1,10 +0,0 @@ - PID - 245 - 247 - 248 - 249 - 254 - 262 - 264 - 265 - 267 From fe4c9f8ffa3b80648f1c850038cae0b5dd129356 Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Fri, 12 Feb 2016 22:53:22 +0900 Subject: [PATCH 4/4] change CI status badge to CircleCI. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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