Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/helper: merge test-online-cpus into test-tool
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:48 +0000
(08:44 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000
(08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
t/helper/test-online-cpus.c
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
t/helper/test-tool.h
patch
|
blob
|
history
t/t3008-ls-files-lazy-init-name-hash.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
d9cc2c8
)
diff --git
a/Makefile
b/Makefile
index 3145a9b1b23af6a06a0f0bef4e497eaa3814ecf0..91af906d085354596d790524bf52f1d2978acc20 100644
(file)
--- a/
Makefile
+++ b/
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-mergesort.o
TEST_BUILTINS_OBJS += test-mktemp.o
TEST_BUILTINS_OBJS += test-match-trees.o
TEST_BUILTINS_OBJS += test-mergesort.o
TEST_BUILTINS_OBJS += test-mktemp.o
+TEST_BUILTINS_OBJS += test-online-cpus.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
TEST_PROGRAMS_NEED_X += test-fake-ssh
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-path-utils
TEST_PROGRAMS_NEED_X += test-prio-queue
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-path-utils
TEST_PROGRAMS_NEED_X += test-prio-queue
diff --git
a/t/helper/test-online-cpus.c
b/t/helper/test-online-cpus.c
index 06c09c6b886f843b2d3c6fdb8e00730afc7fe40b..8cb0d53840f3dc60d583fa1b72f95572d2148d11 100644
(file)
--- a/
t/helper/test-online-cpus.c
+++ b/
t/helper/test-online-cpus.c
@@
-1,7
+1,8
@@
+#include "test-tool.h"
#include "git-compat-util.h"
#include "thread-utils.h"
#include "git-compat-util.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());
return 0;
{
printf("%d\n", online_cpus());
return 0;
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index 421634aeaa6177045dbf1cf3bf7a8af2dc13949e..bca32f23fae4fa7d48a9abf2fe8a7bfb63f9bd29 100644
(file)
--- a/
t/helper/test-tool.c
+++ b/
t/helper/test-tool.c
@@
-23,6
+23,7
@@
static struct test_cmd cmds[] = {
{ "match-trees", cmd__match_trees },
{ "mergesort", cmd__mergesort },
{ "mktemp", cmd__mktemp },
{ "match-trees", cmd__match_trees },
{ "mergesort", cmd__mergesort },
{ "mktemp", cmd__mktemp },
+ { "online-cpus", cmd__online_cpus },
{ "sha1", cmd__sha1 },
};
{ "sha1", cmd__sha1 },
};
diff --git
a/t/helper/test-tool.h
b/t/helper/test-tool.h
index cf2598798acb18416bd5cefd270dae55920638c2..aeabc9740f807c394c6c431a118c90a81db33fb6 100644
(file)
--- a/
t/helper/test-tool.h
+++ b/
t/helper/test-tool.h
@@
-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__mergesort(int argc, const char **argv);
int cmd__mktemp(int argc, const char **argv);
int cmd__match_trees(int argc, const char **argv);
int cmd__mergesort(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);
#endif
int cmd__sha1(int argc, const char **argv);
#endif
diff --git
a/t/t3008-ls-files-lazy-init-name-hash.sh
b/t/t3008-ls-files-lazy-init-name-hash.sh
index 8df4aa7c99ca2966e56a07a455b1a1c8d51f56f8..08af596ba6c6b032eb1696c3beaba7c1776b4fd5 100755
(executable)
--- a/
t/t3008-ls-files-lazy-init-name-hash.sh
+++ b/
t/t3008-ls-files-lazy-init-name-hash.sh
@@
-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
skip_all='skipping lazy-init tests, single cpu'
test_done
then
skip_all='skipping lazy-init tests, single cpu'
test_done