[commit: ghc] master: Testsuite: run tests in /tmp/ghctest-xxx instead of /tmp/ghctest/xxx (36d254a)
git at git.haskell.org
git at git.haskell.org
Thu Jun 2 15:34:04 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/36d254afadb49a855dea031c036b1a371a567f16/ghc
>---------------------------------------------------------------
commit 36d254afadb49a855dea031c036b1a371a567f16
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Thu Jun 2 15:10:28 2016 +0200
Testsuite: run tests in /tmp/ghctest-xxx instead of /tmp/ghctest/xxx
This fixes a bug of not being able to create files or directories in
/tmp/ghctest if it was created by a different user.
Trac ticket #11980.
>---------------------------------------------------------------
36d254afadb49a855dea031c036b1a371a567f16
testsuite/driver/runtests.py | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 629a85e..c62c5a7 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -276,25 +276,11 @@ else:
# set stdout to unbuffered (is this the best way to do it?)
sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w", 0)
-# Create a unique temporary directory inside '/tmp/ghctest'.
-ghctestdir = os.path.join(tempfile.gettempdir(), 'ghctest')
-# Don't start from scratch (i.e. don't rmtree(ghctestdir)). Running
-# 'make test' while another 'make test' hasn't completed yet should work.
-#shutil.rmtree(ghctestdir, ignore_errors=True)
-mkdirp(ghctestdir)
-tempdir = normalise_slashes_(tempfile.mkdtemp('', '', dir=ghctestdir))
+tempdir = normalise_slashes_(tempfile.mkdtemp('', 'ghctest-'))
def cleanup_and_exit(exitcode):
if config.cleanup:
shutil.rmtree(tempdir, ignore_errors=True)
- try:
- os.rmdir(ghctestdir)
- except OSError as e:
- if e.errno == errno.ENOTEMPTY:
- # Only delete ghctestdir if it is empty.
- pass
- else:
- raise
exit(exitcode)
# First collect all the tests to be run
More information about the ghc-commits
mailing list