Skip to content

Commit

Permalink
m4/dovecot.m4 - Apply DRY principle to test output filename
Browse files Browse the repository at this point in the history
Define the name we will use for the file once, then just use that variable
instead of using explicit repeatition.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
  • Loading branch information
Phil Carmody committed Aug 30, 2018
1 parent 07c6d39 commit ef47c3d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions m4/dovecot.m4
Expand Up @@ -60,16 +60,17 @@ if test "\$NOVALGRIND" != ""; then
\$[*]
ret=\$?
else
trap "rm -f test.out.\$\$" 0 1 2 3 15
test_out="test.out.\$\$"
trap "rm -f \$test_out" 0 1 2 3 15
supp_path="\$top_srcdir/run-test-valgrind.supp"
if test -r "\$supp_path"; then
valgrind -q \$trace_children --leak-check=full --suppressions="\$supp_path" --log-file=test.out.\$\$ \$noundef \$[*]
valgrind -q \$trace_children --leak-check=full --suppressions="\$supp_path" --log-file=\$test_out \$noundef \$[*]
else
valgrind -q \$trace_children --leak-check=full --log-file=test.out.\$\$ \$noundef \$[*]
valgrind -q \$trace_children --leak-check=full --log-file=\$test_out \$noundef \$[*]
fi
ret=\$?
if test -s test.out.\$\$; then
cat test.out.\$\$
if test -s \$test_out; then
cat \$test_out
ret=1
fi
fi
Expand Down

0 comments on commit ef47c3d

Please sign in to comment.