Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed May 9, 2019
1 parent ced194c commit 11bb003
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/_utils/run_dm_ctl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PWD=$(pwd)
binary=$PWD/bin/dmctl.test
ts=$(date +"%s")
dmctl_log=$workdir/dmctl.$ts.log
echo "dmctl test on \"$cmd\""
echo "dmctl test function: ${FUNCNAME[0]} cmd: \"$cmd\""
echo "$cmd" | $binary -test.coverprofile="$TEST_DIR/cov.$TEST_NAME.dmctl.$ts.out" DEVEL -master-addr=$master_addr > $dmctl_log 2>&1

for ((i=1; i<$#; i+=2)); do
Expand All @@ -25,6 +25,7 @@ for ((i=1; i<$#; i+=2)); do
got=$(sed "s/$value/$value\n/g" $dmctl_log | grep -c "$value")
if [ "$got" != "$expected" ]; then
echo "command: $cmd $value count: $got != expected: $expected"
cat $dmctl_log
exit 1
fi
done

0 comments on commit 11bb003

Please sign in to comment.