summaryrefslogtreecommitdiff
path: root/mailinfo.h
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <stolee@gmail.com>2021-01-23 16:07:08 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-23 17:14:18 -0800
commit3b14436364f0a68167723541bef1a625c5c6f163 (patch)
tree88850d17bb2faf49420d851acf30bb1506d65743 /mailinfo.h
parentsparse-checkout: load sparse-checkout patterns (diff)
downloadtgif-3b14436364f0a68167723541bef1a625c5c6f163.tar.xz
test-lib: test_region looks for trace2 regions
From ff15d509b89edd4830d85d53cea3079a6b0c1c08 Mon Sep 17 00:00:00 2001 From: Derrick Stolee <dstolee@microsoft.com> Date: Mon, 11 Jan 2021 08:53:09 -0500 Subject: [PATCH 8/9] test-lib: test_region looks for trace2 regions Most test cases can verify Git's behavior using input/output expectations or changes to the .git directory. However, sometimes we want to check that Git did or did not run a certain section of code. This is particularly important for performance-only features that we want to ensure have been enabled in certain cases. Add a new 'test_region' function that checks if a trace2 region was entered and left in a given trace2 event log. There is one existing test (t0500-progress-display.sh) that performs this check already, so use the helper function instead. Note that this changes the expectations slightly. The old test (incorrectly) used two patterns for the 'grep' invocation, but this performs an OR of the patterns, not an AND. This means that as long as one region_enter event was logged, the test would succeed, even if it was not due to the progress category. More uses will be added in a later change. t6423-merge-rename-directories.sh also greps for region_enter lines, but it verifies the number of such lines, which is not the same as an existence check. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailinfo.h')
0 files changed, 0 insertions, 0 deletions