automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {maint} tests: don't clutter the top-level dir with temporary test


From: Stefano Lattarini
Subject: [FYI] {maint} tests: don't clutter the top-level dir with temporary test directories
Date: Fri, 6 Jul 2012 20:50:54 +0200

* t/self-check-me.tap: Be sure to initialize '$am_create_testdir' to "no"
in all the shell invocations sourcing './defs'.  Otherwise, when running
the testsuite with 'keep_testdirs=yes', the following temporary director
are left cluttering the top-level directory:

  ./012.dir
  ./abc..dir
  ./a.b.c.dir
  ./foo.dir
  ./foo.bar.dir
  ./foo-bar-.dir
  ./_foo__bar.dir

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/self-check-me.tap |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/t/self-check-me.tap b/t/self-check-me.tap
index 717fe2e..e89e150 100755
--- a/t/self-check-me.tap
+++ b/t/self-check-me.tap
@@ -31,7 +31,11 @@ set +e
 
 do_check ()
 {
-  $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' "$1" | grep "^me=$2$"
+  $AM_TEST_RUNNER_SHELL -c '
+    am_create_testdir=no # Do not pollute the top-level directory.
+    . ./defs
+    echo me=$me
+  ' "$1" | grep "^me=$2$"
   command_ok_ "me=$1" test $? -eq 0
 }
 
@@ -47,7 +51,12 @@ do_check abc. 'abc\.'
 
 # A definition of $me in the environment should be ignored.
 
-s=$(me=bad $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' foo.sh)
+s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
+  # Do not pollute the top-level directory.
+  am_create_testdir=no
+  . ./defs
+  echo me=$me
+' foo.sh)
 command_ok_ "override of \$me before ./defs causes no error" \
             test $? -eq 0
 
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]