summaryrefslogtreecommitdiff
path: root/tests/CuTmpdir.pm
AgeCommit message (Collapse)Author
2009-04-22tests: avoid new "make distcheck" failure due to newer File::TempJim Meyering
With newer perl (e.g., Fedora 10's 4:5.10.0-68.fc10), tests/CuTmpdir.pm stopped removing its temporary directories, with diagnostics like this: cannot remove path when cwd is /c/coreutils/tests/misc/seq.tmp-e2up \ for /c/coreutils/tests/misc/seq.tmp-e2up: at \ /usr/lib/perl5/5.10.0/File/Temp.pm line 902 Chdir out of the target directory before that code runs: * tests/CuTmpdir.pm (END): chdir '..'. (chmod_tree): Remove explicit "chdir $dir".
2009-03-25tests: CuTmpdir.pm: avoid use of undefined variable in warningRalf Wildenhues
* tests/CuTmpdir.pm (chmod_tree): Do not warn if $dir is undefined.
2008-07-22tests: again, do not change the mode of all directories below $HOMERalf Wildenhues
* tests/CuTmpdir.pm (chmod_tree): Do not run chmod on undefined argument, can happen when the build path contains spaces.
2008-05-30tests: avoid failure with older version of Perl's File::TempJim Meyering
* tests/CuTmpdir.pm (import): Use &File::Temp::cleanup only if it is defined. Reported by Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13652
2008-04-28tests: don't chmod after a failed chdir in cleanupBo Borgerson
* tests/CuTmpdir.pm (chmod_tree): Don't chmod if chdir failed. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-28Only cleanup test dirs from the process that created them.Bo Borgerson
* tests/CuTmpdir.pm (import): Use closure around current PID to avoid cleanup races. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-27tests: improve perl-based tempdir handlingJim Meyering
Before, upon interrupt, directories would be left behind. * tests/CuTmpdir.pm: Remove temporary directory on interrupt.
2007-11-30Include test name in the "unsafe working directory name" diagnostic.Jim Meyering
* tests/CuTmpdir.pm (import): If $ME is '-', use $prefix.
2007-11-30* tests/CuTmpdir.pm (END): Do not do the cleanup if $dir is notRalf Wildenhues
defined, because it then goes wild and changes the mode of all directories below $HOME. Undefined $dir can happen if the test is to be skipped because of an unsafe working directory name.
2007-09-16tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.Jim Meyering
Signed-off-by: Jim Meyering <jim@meyering.net>
2007-08-18Run each Coreutils.pm-based test in its own subdirectory.Jim Meyering
* tests/CuTmpdir.pm: New file. * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm. * tests/misc/od, tests/misc/base64, tests/misc/basename: * tests/misc/cut, tests/misc/date, tests/misc/dirname: * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail: * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum: * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum: * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag: * tests/misc/wc-files0-from, tests/misc/xstrtol: * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from: * tests/expr/basic, tests/factor/basic, tests/fmt/basic: * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1: * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it. * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test", not "../../src/test", so it works when run from a subdirectory. * tests/ls-2/tests: Create temp files and dirs from within the perl script, so that they're removed, when run from a subdirectory.