]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
m4/dovecot.m4 - Apply DRY principle to test output filename
authorPhil Carmody <phil@dovecot.fi>
Wed, 29 Aug 2018 11:57:45 +0000 (14:57 +0300)
committerPhil Carmody <phil@dovecot.fi>
Thu, 30 Aug 2018 10:26:52 +0000 (13:26 +0300)
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>
m4/dovecot.m4

index 464a7a32a5230b13eafe9a7c9317c8f43f7dfae7..5c78eea29cd34f7c3c991ce334dae21b9ce6e230 100644 (file)
@@ -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