Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-24 10:44:48 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-27 18:45:47 +0300
commitc033cc15087da35edf2c4d634d664a73eed6c5e8 (patch)
treeea263c3d0f095d39824350c115020a28caba19e7 /t
parentd9cc2c87805dfde54a37c0bb33fdfa19122312b4 (diff)
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>
Diffstat (limited to 't')
-rw-r--r--t/helper/test-online-cpus.c3
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
-rwxr-xr-xt/t3008-ls-files-lazy-init-name-hash.sh2
4 files changed, 5 insertions, 2 deletions
diff --git a/t/helper/test-online-cpus.c b/t/helper/test-online-cpus.c
index 06c09c6b88..8cb0d53840 100644
--- 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"
-int cmd_main(int argc, const char **argv)
+int cmd__online_cpus(int argc, const char **argv)
{
printf("%d\n", online_cpus());
return 0;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 421634aeaa..bca32f23fa 100644
--- 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 },
+ { "online-cpus", cmd__online_cpus },
{ "sha1", cmd__sha1 },
};
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index cf2598798a..aeabc9740f 100644
--- 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__online_cpus(int argc, const char **argv);
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 8df4aa7c99..08af596ba6 100755
--- 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
-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