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>
Nguyễn Thái Ngọc Duy committed
Mar 24, 2018 at 08:44 UTC
c033cc15087da35edf2c4d634d664a73eed6c5e8
5 files changed
+6
-3
Makefile
+1
-1
@@ -668,13 +668,13 @@ TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
668
TEST_BUILTINS_OBJS += test-match-trees.o
669
TEST_BUILTINS_OBJS += test-mergesort.o
670
TEST_BUILTINS_OBJS += test-mktemp.o
671
+TEST_BUILTINS_OBJS += test-online-cpus.o
672
TEST_BUILTINS_OBJS += test-sha1.o
673
674
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
675
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
676
TEST_PROGRAMS_NEED_X += test-fake-ssh
677
TEST_PROGRAMS_NEED_X += test-line-buffer
677
-TEST_PROGRAMS_NEED_X += test-online-cpus
678
TEST_PROGRAMS_NEED_X += test-parse-options
679
TEST_PROGRAMS_NEED_X += test-path-utils
680
TEST_PROGRAMS_NEED_X += test-prio-queue
t/helper/test-online-cpus.c
+2
-1
@@ -1,7 +1,8 @@
1
+#include "test-tool.h"
2
#include "git-compat-util.h"
3
#include "thread-utils.h"
4
4
-int cmd_main(int argc, const char **argv)
5
+int cmd__online_cpus(int argc, const char **argv)
6
{
7
printf("%d\n", online_cpus());
8
return 0;
t/helper/test-tool.c
+1
@@ -23,6 +23,7 @@ static struct test_cmd cmds[] = {
23
{ "match-trees", cmd__match_trees },
24
{ "mergesort", cmd__mergesort },
25
{ "mktemp", cmd__mktemp },
26
+ { "online-cpus", cmd__online_cpus },
27
{ "sha1", cmd__sha1 },
28
};
29
t/helper/test-tool.h
+1
@@ -17,6 +17,7 @@ int cmd__lazy_init_name_hash(int argc, const char **argv);
17
int cmd__match_trees(int argc, const char **argv);
18
int cmd__mergesort(int argc, const char **argv);
19
int cmd__mktemp(int argc, const char **argv);
20
+int cmd__online_cpus(int argc, const char **argv);
21
int cmd__sha1(int argc, const char **argv);
22
23
#endif
t/t3008-ls-files-lazy-init-name-hash.sh
+1
-1
@@ -4,7 +4,7 @@ test_description='Test the lazy init name hash with various folder structures'
4
5
. ./test-lib.sh
6
7
-if test 1 -eq $($GIT_BUILD_DIR/t/helper/test-online-cpus)
7
+if test 1 -eq $($GIT_BUILD_DIR/t/helper/test-tool online-cpus)
8
then
9
skip_all='skipping lazy-init tests, single cpu'
10
test_done