t/helper: merge test-online-cpus into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d9cc2c8780
commit
c033cc1508
2
Makefile
2
Makefile
@ -668,13 +668,13 @@ TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
|
|||||||
TEST_BUILTINS_OBJS += test-match-trees.o
|
TEST_BUILTINS_OBJS += test-match-trees.o
|
||||||
TEST_BUILTINS_OBJS += test-mergesort.o
|
TEST_BUILTINS_OBJS += test-mergesort.o
|
||||||
TEST_BUILTINS_OBJS += test-mktemp.o
|
TEST_BUILTINS_OBJS += test-mktemp.o
|
||||||
|
TEST_BUILTINS_OBJS += test-online-cpus.o
|
||||||
TEST_BUILTINS_OBJS += test-sha1.o
|
TEST_BUILTINS_OBJS += test-sha1.o
|
||||||
|
|
||||||
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
|
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
|
||||||
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
|
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
|
||||||
TEST_PROGRAMS_NEED_X += test-fake-ssh
|
TEST_PROGRAMS_NEED_X += test-fake-ssh
|
||||||
TEST_PROGRAMS_NEED_X += test-line-buffer
|
TEST_PROGRAMS_NEED_X += test-line-buffer
|
||||||
TEST_PROGRAMS_NEED_X += test-online-cpus
|
|
||||||
TEST_PROGRAMS_NEED_X += test-parse-options
|
TEST_PROGRAMS_NEED_X += test-parse-options
|
||||||
TEST_PROGRAMS_NEED_X += test-path-utils
|
TEST_PROGRAMS_NEED_X += test-path-utils
|
||||||
TEST_PROGRAMS_NEED_X += test-prio-queue
|
TEST_PROGRAMS_NEED_X += test-prio-queue
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
#include "test-tool.h"
|
||||||
#include "git-compat-util.h"
|
#include "git-compat-util.h"
|
||||||
#include "thread-utils.h"
|
#include "thread-utils.h"
|
||||||
|
|
||||||
int cmd_main(int argc, const char **argv)
|
int cmd__online_cpus(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
printf("%d\n", online_cpus());
|
printf("%d\n", online_cpus());
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -23,6 +23,7 @@ static struct test_cmd cmds[] = {
|
|||||||
{ "match-trees", cmd__match_trees },
|
{ "match-trees", cmd__match_trees },
|
||||||
{ "mergesort", cmd__mergesort },
|
{ "mergesort", cmd__mergesort },
|
||||||
{ "mktemp", cmd__mktemp },
|
{ "mktemp", cmd__mktemp },
|
||||||
|
{ "online-cpus", cmd__online_cpus },
|
||||||
{ "sha1", cmd__sha1 },
|
{ "sha1", cmd__sha1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ int cmd__lazy_init_name_hash(int argc, const char **argv);
|
|||||||
int cmd__match_trees(int argc, const char **argv);
|
int cmd__match_trees(int argc, const char **argv);
|
||||||
int cmd__mergesort(int argc, const char **argv);
|
int cmd__mergesort(int argc, const char **argv);
|
||||||
int cmd__mktemp(int argc, const char **argv);
|
int cmd__mktemp(int argc, const char **argv);
|
||||||
|
int cmd__online_cpus(int argc, const char **argv);
|
||||||
int cmd__sha1(int argc, const char **argv);
|
int cmd__sha1(int argc, const char **argv);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,7 +4,7 @@ test_description='Test the lazy init name hash with various folder structures'
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
if test 1 -eq $($GIT_BUILD_DIR/t/helper/test-online-cpus)
|
if test 1 -eq $($GIT_BUILD_DIR/t/helper/test-tool online-cpus)
|
||||||
then
|
then
|
||||||
skip_all='skipping lazy-init tests, single cpu'
|
skip_all='skipping lazy-init tests, single cpu'
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user