提交 e3482ccf 编写于 作者: J Jeff Hostetler 提交者: Junio C Hamano

test-online-cpus: helper to return cpu count

Created helper executable to print the value of online_cpus()
allowing multi-threaded tests to be skipped when appropriate.
Signed-off-by: NJeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 2a1bd45b
......@@ -619,6 +619,7 @@ TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-match-trees
TEST_PROGRAMS_NEED_X += test-mergesort
TEST_PROGRAMS_NEED_X += test-mktemp
TEST_PROGRAMS_NEED_X += test-online-cpus
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-path-utils
TEST_PROGRAMS_NEED_X += test-prio-queue
......
......@@ -16,6 +16,7 @@
/test-match-trees
/test-mergesort
/test-mktemp
/test-online-cpus
/test-parse-options
/test-path-utils
/test-prio-queue
......
#include "git-compat-util.h"
#include "thread-utils.h"
int cmd_main(int argc, const char **argv)
{
printf("%d\n", online_cpus());
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册