shirou
e9591b5b01
rename redundant test function names, such as TestCPU in cpu package
2024-05-28 22:27:17 +09:00
shirou
bc060cc227
add SPDX License, remove old build tag, and replace import
2024-05-28 22:27:17 +09:00
Jeff Weiss
f850a69ba1
get tests passing on s390x
2023-02-07 14:12:31 -08:00
Eng Zer Jun
37894e9b28
test: use T.Setenv
to set env vars in tests
...
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-12-20 13:13:01 +08:00
Ville Skyttä
f7e1f36418
refactor: remove unnecessary exec.LookPath calls
...
Executing the command does the lookup if needed and returns the same
error when not found, no need to do it separately.
2022-03-04 18:56:33 +02:00
Lomanic
6589c5c274
[cpu][linux] Fix #1037 only count logical cores where 2nd field is a number
2021-02-22 00:28:56 +01:00
Lomanic
bb6f6e4968
[cpu][linux] Test Counts against lscpu results
2020-09-15 21:39:25 +02:00
WAKAYAMA Shirou
4c9fd1f200
[cpu]linux: add testcode with testdata.
2017-09-20 15:58:30 +09:00