summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2017-11-22 14:45:04 +0000
committerIvan Kolodyazhny <e0ne@e0ne.info>2017-12-27 21:32:48 +0000
commit6c45c47e4bedfcfeadf5c29d5c3ecc4c2cf7aa7c (patch)
tree01b70a15f4b211c6c21523233e1a23b49ac4b575 /tools
parent0b11ccb98ffa90f6f1417382d53f9759c632834a (diff)
downloadhorizon-6c45c47e4bedfcfeadf5c29d5c3ecc4c2cf7aa7c.tar.gz
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
Diffstat (limited to 'tools')
-rw-r--r--tools/executable_files.txt5
-rw-r--r--tools/find_executables.sh11
2 files changed, 16 insertions, 0 deletions
diff --git a/tools/executable_files.txt b/tools/executable_files.txt
new file mode 100644
index 000000000..82aff2d42
--- /dev/null
+++ b/tools/executable_files.txt
@@ -0,0 +1,5 @@
+./manage.py
+./tools/abandon_old_reviews.sh
+./tools/gate/integration/post_test_hook.sh
+./tools/gate/integration/pre_test_hook.sh
+./tools/unit_tests.sh
diff --git a/tools/find_executables.sh b/tools/find_executables.sh
new file mode 100644
index 000000000..4ac4fc9d3
--- /dev/null
+++ b/tools/find_executables.sh
@@ -0,0 +1,11 @@
+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