Skip to content

Commit c033cc1

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-online-cpus into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d9cc2c8 commit c033cc1

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,13 +668,13 @@ TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
668668
TEST_BUILTINS_OBJS += test-match-trees.o
669669
TEST_BUILTINS_OBJS += test-mergesort.o
670670
TEST_BUILTINS_OBJS += test-mktemp.o
671+
TEST_BUILTINS_OBJS += test-online-cpus.o
671672
TEST_BUILTINS_OBJS += test-sha1.o
672673

673674
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
674675
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
675676
TEST_PROGRAMS_NEED_X += test-fake-ssh
676677
TEST_PROGRAMS_NEED_X += test-line-buffer
677-
TEST_PROGRAMS_NEED_X += test-online-cpus
678678
TEST_PROGRAMS_NEED_X += test-parse-options
679679
TEST_PROGRAMS_NEED_X += test-path-utils
680680
TEST_PROGRAMS_NEED_X += test-prio-queue

t/helper/test-online-cpus.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
#include "test-tool.h"
12
#include "git-compat-util.h"
23
#include "thread-utils.h"
34

4-
int cmd_main(int argc, const char **argv)
5+
int cmd__online_cpus(int argc, const char **argv)
56
{
67
printf("%d\n", online_cpus());
78
return 0;

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ static struct test_cmd cmds[] = {
2323
{ "match-trees", cmd__match_trees },
2424
{ "mergesort", cmd__mergesort },
2525
{ "mktemp", cmd__mktemp },
26+
{ "online-cpus", cmd__online_cpus },
2627
{ "sha1", cmd__sha1 },
2728
};
2829

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ int cmd__lazy_init_name_hash(int argc, const char **argv);
1717
int cmd__match_trees(int argc, const char **argv);
1818
int cmd__mergesort(int argc, const char **argv);
1919
int cmd__mktemp(int argc, const char **argv);
20+
int cmd__online_cpus(int argc, const char **argv);
2021
int cmd__sha1(int argc, const char **argv);
2122

2223
#endif

t/t3008-ls-files-lazy-init-name-hash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_description='Test the lazy init name hash with various folder structures'
44

55
. ./test-lib.sh
66

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)
88
then
99
skip_all='skipping lazy-init tests, single cpu'
1010
test_done

0 commit comments

Comments
 (0)