Add releasenotes to check_exec list

Prevent addition of executable files in
the releasenotes/notes directory.

Change-Id: I80ac0b7fce7b16a453fe9139f0dacf88325af8e7
This commit is contained in:
Eric Harney 2017-08-16 15:40:44 -04:00
parent 6dd6c74b38
commit 6460050c5c
3 changed files with 9 additions and 8 deletions

View File

View File

@ -23,16 +23,17 @@ if len(sys.argv) < 2:
print("Usage: %s <directory>" % sys.argv[0])
sys.exit(1)
directory = sys.argv[1]
directories = sys.argv[1:]
executable = []
for root, mydir, myfile in os.walk(directory):
for f in myfile:
path = os.path.join(root, f)
mode = os.lstat(path).st_mode
if stat.S_IXUSR & mode:
executable.append(path)
for d in directories:
for root, mydir, myfile in os.walk(d):
for f in myfile:
path = os.path.join(root, f)
mode = os.lstat(path).st_mode
if stat.S_IXUSR & mode:
executable.append(path)
if executable:
print("Executable files found:")

View File

@ -57,7 +57,7 @@ setenv =
commands =
flake8 {posargs} .
{toxinidir}/tools/config/check_uptodate.sh
{toxinidir}/tools/check_exec.py {toxinidir}/cinder
{toxinidir}/tools/check_exec.py {toxinidir}/cinder {toxinidir}/releasenotes/notes
[testenv:fast8]
# Use same environment directory as pep8 env to save space and install time