github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/_utils/run_dm_ctl_plain (about) 1 #!/bin/bash 2 # tools to run dmctl from command line 3 # parameter 1: work directory 4 # parameter 2: master-addr port 5 # parameter 3: command 6 # parameter 4...: check output content and count 7 8 workdir=$1 9 master_addr=$2 10 cmd=$3 11 12 shift 3 13 14 PWD=$(pwd) 15 binary=$PWD/bin/dmctl.test 16 ts=$(date +"%s") 17 pid=$$ 18 echo "dmctl test cmd: \"$cmd\"" 19 $binary -test.coverprofile="$TEST_DIR/cov.$TEST_NAME.dmctl.$ts.$pid.out" DEVEL $cmd --master-addr=$master_addr >$TEST_DIR/$TEST_NAME/dmctl-plain.log 20 21 # gocovmerge doesn't support merge profiles with different modes, however atomic 22 # mode and count mode have the same profile format, so we need to unify cover 23 # mode before running gocovmerge. As coverage file is not generated synchronously, 24 # we will patch covermode before `make coverage`