runtests.py: make published test results world-readable
client-test makes new directories user-readable because that is the default for all SyncEvolution directories. But after publishing the test results, they need to be world-readable, because they are going to be accessed via some kind of web server running under some different user.
This commit is contained in:
parent
f183271d65
commit
d0d778ed99
|
@ -92,6 +92,15 @@ def copyLog(filename, dirname, htaccess, lineFilter=None):
|
|||
if os.path.isdir(filename):
|
||||
# copy whole directory, without any further processing at the moment
|
||||
shutil.copytree(filename, outname, symlinks=True)
|
||||
# fix up permissions so that the content is world-readable
|
||||
for root, dirs, files in os.walk(outname):
|
||||
for entry in dirs:
|
||||
path = os.path.join(root, entry)
|
||||
os.chmod(path, os.stat(path).st_mode | stat.S_IROTH | stat.S_IXOTH | stat.S_IRGRP | stat.S_IXGRP)
|
||||
for entry in files:
|
||||
path = os.path.join(root, entry)
|
||||
os.chmod(path, os.stat(path).st_mode | stat.S_IROTH | stat.S_IRGRP)
|
||||
os.chmod(outname, os.stat(outname).st_mode | stat.S_IROTH | stat.S_IXOTH | stat.S_IRGRP | stat.S_IXGRP)
|
||||
return
|
||||
|
||||
# .out files are typically small nowadays, so don't compress
|
||||
|
|
Loading…
Reference in New Issue