horizon/tools/find_executables.sh
Akihiro Motoki 6c45c47e4b Drop unnecessary executable flags
This patch also adds checks for executable files in
pep8 job.

nose ignores executable files by default, so it is important
to ensure executable flag is not set for test files [1].
openstack_dashboard/test/test_plugins/panel_tests.py was not
tested actually and it was broken. This commit fixes it too.
[1] http://nose.readthedocs.io/en/latest/usage.html#cmdoption-exe

Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: I3a124fa2f9f0676b2b43a094e32e3d8b18fa6005
2017-12-27 21:32:48 +00:00

12 lines
381 B
Bash

OUTPUT=`find . \( -name .tox -o -name .git \) -prune -o -type f -perm /a=x -print \
| grep -v -F -f ./tools/executable_files.txt`
if [ -n "$OUTPUT" ]; then
echo "Unexpected executable files are found:"
for f in $OUTPUT; do
echo $f
done
echo
echo "If you really need to add an executable file, add it to tools/executable_files.txt"
exit 1
fi