diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2017-04-03 15:16:41 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-12 23:17:19 -0700 |
commit | e3482ccf27b8278289f899cbb294696389a9e1c8 (patch) | |
tree | 0874a33fc9b58abf661f580d59bc4f8c8fd4d83a /t/helper/test-online-cpus.c | |
parent | 2a1bd45b2e44a7ba23dfe67307e7755d0a22e5d6 (diff) | |
download | git-e3482ccf27b8278289f899cbb294696389a9e1c8.tar.gz git-e3482ccf27b8278289f899cbb294696389a9e1c8.tar.xz |
test-online-cpus: helper to return cpu count
Created helper executable to print the value of online_cpus()
allowing multi-threaded tests to be skipped when appropriate.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-online-cpus.c')
-rw-r--r-- | t/helper/test-online-cpus.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/helper/test-online-cpus.c b/t/helper/test-online-cpus.c new file mode 100644 index 000000000..06c09c6b8 --- /dev/null +++ b/t/helper/test-online-cpus.c @@ -0,0 +1,8 @@ +#include "git-compat-util.h" +#include "thread-utils.h" + +int cmd_main(int argc, const char **argv) +{ + printf("%d\n", online_cpus()); + return 0; +} |