Commit Graph

8 Commits (b339e38e1d9a00a72eb58ed5d2afb03f84f3fade)

Author SHA1 Message Date
shirou e9591b5b01 rename redundant test function names, such as TestCPU in cpu package 10 months ago
shirou bc060cc227 add SPDX License, remove old build tag, and replace import 10 months ago
Jeff Weiss f850a69ba1 get tests passing on s390x 2 years ago
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>
2 years ago
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.
3 years ago
Lomanic 6589c5c274 [cpu][linux] Fix #1037 only count logical cores where 2nd field is a number 4 years ago
Lomanic bb6f6e4968 [cpu][linux] Test Counts against lscpu results 5 years ago
WAKAYAMA Shirou 4c9fd1f200 [cpu]linux: add testcode with testdata. 8 years ago