|
|
|
#ifndef TEST_TOOL_H
|
|
|
|
#define TEST_TOOL_H
|
|
|
|
|
|
|
|
#define USE_THE_INDEX_COMPATIBILITY_MACROS
|
|
|
|
#include "git-compat-util.h"
|
|
|
|
|
|
|
|
int cmd__advise_if_enabled(int argc, const char **argv);
|
|
|
|
int cmd__bloom(int argc, const char **argv);
|
|
|
|
int cmd__chmtime(int argc, const char **argv);
|
|
|
|
int cmd__config(int argc, const char **argv);
|
|
|
|
int cmd__ctype(int argc, const char **argv);
|
|
|
|
int cmd__date(int argc, const char **argv);
|
|
|
|
int cmd__delta(int argc, const char **argv);
|
|
|
|
int cmd__dir_iterator(int argc, const char **argv);
|
|
|
|
int cmd__drop_caches(int argc, const char **argv);
|
|
|
|
int cmd__dump_cache_tree(int argc, const char **argv);
|
|
|
|
int cmd__dump_fsmonitor(int argc, const char **argv);
|
|
|
|
int cmd__dump_split_index(int argc, const char **argv);
|
|
|
|
int cmd__dump_untracked_cache(int argc, const char **argv);
|
|
|
|
int cmd__example_decorate(int argc, const char **argv);
|
|
|
|
int cmd__genrandom(int argc, const char **argv);
|
tests: teach the test-tool to generate NUL bytes and use it
In cc95bc2025 (t5562: replace /dev/zero with a pipe from
generate_zero_bytes, 2019-02-09), we replaced usage of /dev/zero (which
is not available on NonStop, apparently) by a Perl script snippet to
generate NUL bytes.
Sadly, it does not seem to work on NonStop, as t5562 reportedly hangs.
Worse, this also hangs in the Ubuntu 16.04 agents of the CI builds on
Azure Pipelines: for some reason, the Perl script snippet that is run
via `generate_zero_bytes` in t5562's 'CONTENT_LENGTH overflow ssite_t'
test case tries to write out an infinite amount of NUL bytes unless a
broken pipe is encountered, that snippet never encounters the broken
pipe, and keeps going until the build times out.
Oddly enough, this does not reproduce on the Windows and macOS agents,
nor in a local Ubuntu 18.04.
This developer tried for a day to figure out the exact circumstances
under which this hang happens, to no avail, the details remain a
mystery.
In the end, though, what counts is that this here change incidentally
fixes that hang (maybe also on NonStop?). Even more positively, it gets
rid of yet another unnecessary Perl invocation.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years ago
|
|
|
int cmd__genzeros(int argc, const char **argv);
|
|
|
|
int cmd__hashmap(int argc, const char **argv);
|
|
|
|
int cmd__hash_speed(int argc, const char **argv);
|
|
|
|
int cmd__index_version(int argc, const char **argv);
|
|
|
|
int cmd__json_writer(int argc, const char **argv);
|
|
|
|
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__oidmap(int argc, const char **argv);
|
|
|
|
int cmd__online_cpus(int argc, const char **argv);
|
|
|
|
int cmd__parse_options(int argc, const char **argv);
|
|
|
|
int cmd__parse_pathspec_file(int argc, const char** argv);
|
|
|
|
int cmd__path_utils(int argc, const char **argv);
|
|
|
|
int cmd__pkt_line(int argc, const char **argv);
|
|
|
|
int cmd__prio_queue(int argc, const char **argv);
|
Test the progress display
'progress.c' has seen a few fixes recently [1], and, unfortunately,
some of those fixes required further fixes [2]. It seems it's time to
have a few tests focusing on the subtleties of the progress display.
Add the 'test-tool progress' subcommand to help testing the progress
display, reading instructions from standard input and turning them
into calls to the display_progress() and display_throughput()
functions with the given parameters.
The progress display is, however, critically dependent on timing,
because it's only updated once every second or, if the toal is known
in advance, every 1%, and there is the throughput rate as well. These
make the progress display far too undeterministic for testing as-is.
To address this, add a few testing-specific variables and functions to
'progress.c', allowing the the new test helper to:
- Disable the triggered-every-second SIGALRM and set the
'progress_update' flag explicitly based in the input instructions.
This way the progress line will be updated deterministically when
the test wants it to be updated.
- Specify the time elapsed since start_progress() to make the
throughput rate calculations deterministic.
Add the new test script 't0500-progress-display.sh' to check a few
simple cases with and without throughput, and that a shorter progress
line properly covers up the previously displayed line in different
situations.
[1] See commits 545dc345eb (progress: break too long progress bar
lines, 2019-04-12) and 9f1fd84e15 (progress: clear previous
progress update dynamically, 2019-04-12).
[2] 1aed1a5f25 (progress: avoid empty line when breaking the progress
line, 2019-05-19)
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years ago
|
|
|
int cmd__progress(int argc, const char **argv);
|
|
|
|
int cmd__reach(int argc, const char **argv);
|
|
|
|
int cmd__read_cache(int argc, const char **argv);
|
|
|
|
int cmd__read_graph(int argc, const char **argv);
|
|
|
|
int cmd__read_midx(int argc, const char **argv);
|
|
|
|
int cmd__ref_store(int argc, const char **argv);
|
|
|
|
int cmd__regex(int argc, const char **argv);
|
|
|
|
int cmd__repository(int argc, const char **argv);
|
|
|
|
int cmd__revision_walking(int argc, const char **argv);
|
|
|
|
int cmd__run_command(int argc, const char **argv);
|
|
|
|
int cmd__scrap_cache_tree(int argc, const char **argv);
|
|
|
|
int cmd__serve_v2(int argc, const char **argv);
|
|
|
|
int cmd__sha1(int argc, const char **argv);
|
|
|
|
int cmd__oid_array(int argc, const char **argv);
|
|
|
|
int cmd__sha256(int argc, const char **argv);
|
|
|
|
int cmd__sigchain(int argc, const char **argv);
|
|
|
|
int cmd__strcmp_offset(int argc, const char **argv);
|
|
|
|
int cmd__string_list(int argc, const char **argv);
|
|
|
|
int cmd__submodule_config(int argc, const char **argv);
|
|
|
|
int cmd__submodule_nested_repo_config(int argc, const char **argv);
|
|
|
|
int cmd__subprocess(int argc, const char **argv);
|
|
|
|
int cmd__trace2(int argc, const char **argv);
|
|
|
|
int cmd__urlmatch_normalization(int argc, const char **argv);
|
|
|
|
int cmd__xml_encode(int argc, const char **argv);
|
|
|
|
int cmd__wildmatch(int argc, const char **argv);
|
|
|
|
#ifdef GIT_WINDOWS_NATIVE
|
|
|
|
int cmd__windows_named_pipe(int argc, const char **argv);
|
|
|
|
#endif
|
|
|
|
int cmd__write_cache(int argc, const char **argv);
|
|
|
|
|
|
|
|
int cmd_hash_impl(int ac, const char **av, int algo);
|
|
|
|
|
|
|
|
#endif
|