summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-07-20 16:33:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-20 22:38:55 (GMT)
commitab176ac4ae9456a97ff4904c0222c6a0fc63a130 (patch)
tree96af388a19b5faf402191a8e00ae9879df0ea9b6 /Makefile
parentba3ca1edce70d9d2d0eea1ac69377ae786e9413a (diff)
downloadgit-ab176ac4ae9456a97ff4904c0222c6a0fc63a130.zip
git-ab176ac4ae9456a97ff4904c0222c6a0fc63a130.tar.gz
git-ab176ac4ae9456a97ff4904c0222c6a0fc63a130.tar.bz2
test-reach: create new test tool for ref_newer
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 59781f4..d69f9d4 100644
--- a/Makefile
+++ b/Makefile
@@ -716,6 +716,7 @@ TEST_BUILTINS_OBJS += test-mktemp.o
TEST_BUILTINS_OBJS += test-online-cpus.o
TEST_BUILTINS_OBJS += test-path-utils.o
TEST_BUILTINS_OBJS += test-prio-queue.o
+TEST_BUILTINS_OBJS += test-reach.o
TEST_BUILTINS_OBJS += test-read-cache.o
TEST_BUILTINS_OBJS += test-ref-store.o
TEST_BUILTINS_OBJS += test-regex.o