#!/bin/sh test_description='test trace2 facility (normal target)' . ./test-lib.sh # Turn off any inherited trace2 settings for this test. sane_unset GIT_TRACE2 GIT_TRACE2_PERF GIT_TRACE2_EVENT sane_unset GIT_TRACE2_BRIEF sane_unset GIT_TRACE2_CONFIG_PARAMS # Add t/helper directory to PATH so that we can use a relative # path to run nested instances of test-tool.exe (see 004child). # This helps with HEREDOC comparisons later. TTDIR="$GIT_BUILD_DIR/t/helper/" && export TTDIR PATH="$TTDIR:$PATH" && export PATH # Warning: use of 'test_cmp' may run test-tool.exe and/or git.exe # Warning: to do the actual diff/comparison, so the HEREDOCs here # Warning: only cover our actual calls to test-tool and/or git. # Warning: So you may see extra lines in artifact files when # Warning: interactively debugging. V=$(git version | sed -e 's/^git version //') && export V # There are multiple trace2 targets: normal, perf, and event. # Trace2 events will/can be written to each active target (subject # to whatever filtering that target decides to do). # This script tests the normal target in isolation. # # Defer setting GIT_TRACE2 until the actual command line we want to test # because hidden git and test-tool commands run by the test harness # can contaminate our output. # Enable "brief" feature which turns off " : " prefix. GIT_TRACE2_BRIEF=1 && export GIT_TRACE2_BRIEF # Basic tests of the trace2 normal stream. Since this stream is used # primarily with printf-style debugging/tracing, we do limited testing # here. # # We do confirm the following API features: # [] the 'version ' event # [] the 'start ' event # [] the 'cmd_name ' event # [] the 'exit