ab176ac4ae
As we prepare to change the behavior of the algorithms in commit-reach.c, create a new test-tool subcommand 'reach' to test these methods on interesting commit-graph shapes. To use the new test-tool, use 'test-tool reach <method>' and provide input to stdin that describes the inputs to the method. Currently, we only implement the ref_newer method, which requires two commits. Use lines "A:<committish>" and "B:<committish>" for the two inputs. We will expand this input later to accommodate methods that take lists of commits. The test t6600-test-reach.sh creates a repo whose commits form a two-dimensional grid. This grid makes it easy for us to determine reachability because commit-A-B can reach commit-X-Y if and only if A is at least X and B is at least Y. This helps create interesting test cases for each result of the methods in commit-reach.c. We test all methods in three different states of the commit-graph file: Non-existent (no generation numbers), fully computed, and mixed (some commits have generation numbers and others do not). Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
43 lines
1.9 KiB
C
43 lines
1.9 KiB
C
#ifndef __TEST_TOOL_H__
|
|
#define __TEST_TOOL_H__
|
|
|
|
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__drop_caches(int argc, const char **argv);
|
|
int cmd__dump_cache_tree(int argc, const char **argv);
|
|
int cmd__dump_split_index(int argc, const char **argv);
|
|
int cmd__example_decorate(int argc, const char **argv);
|
|
int cmd__genrandom(int argc, const char **argv);
|
|
int cmd__hashmap(int argc, const char **argv);
|
|
int cmd__index_version(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__online_cpus(int argc, const char **argv);
|
|
int cmd__path_utils(int argc, const char **argv);
|
|
int cmd__prio_queue(int argc, const char **argv);
|
|
int cmd__reach(int argc, const char **argv);
|
|
int cmd__read_cache(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__sha1_array(int argc, const char **argv);
|
|
int cmd__sha1(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__subprocess(int argc, const char **argv);
|
|
int cmd__urlmatch_normalization(int argc, const char **argv);
|
|
int cmd__wildmatch(int argc, const char **argv);
|
|
int cmd__write_cache(int argc, const char **argv);
|
|
|
|
#endif
|