Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make python tests not executables #5449

Merged
merged 3 commits into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions filebeat/tests/system/test_prospector.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,3 @@ def test_restart_recursive_glob(self):
name="output contains 'entry2'")

filebeat.check_kill_and_wait()


if __name__ == '__main__':
import unittest
unittest.main()
5 changes: 0 additions & 5 deletions filebeat/tests/system/test_registrar.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,3 @@ def test_registrar_files_with_prospector_level_processors(self):
"inode": stat.st_ino,
"device": stat.st_dev,
}, file_state_os)


if __name__ == '__main__':
import unittest
unittest.main()
2 changes: 2 additions & 0 deletions libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ BUILDID?=$(shell git rev-parse HEAD) ## @Building The build ID
VIRTUALENV_PARAMS?=
INTEGRATION_TESTS?=
FIND=. ${PYTHON_ENV}/bin/activate; find . -type f -not -path "*/vendor/*" -not -path "*/build/*" -not -path "*/.git/*"
PERM_EXEC=$(shell [ `uname -s` = "Darwin" ] && echo "+111" || echo "/a+x")

# Cross compiling targets
CGO?=true ## @building if true, Build with C Go support
Expand Down Expand Up @@ -107,6 +108,7 @@ check: python-env ## @build Checks project and source code if everything is acco
@go get $(GOIMPORTS_REPO)
@goimports -local ${GOIMPORTS_LOCAL_PREFIX} -l ${GOFILES_NOVENDOR} | (! grep .) || (echo "Code differs from goimports' style ^" && false)
@${FIND} -name *.py -exec autopep8 -d --max-line-length 120 {} \; | (! grep . -q) || (echo "Code differs from autopep8's style" && false)
@${FIND} -wholename "*tests/system/test_*.py" -perm ${PERM_EXEC} -exec false {} + || (echo "Python test files shouldn't be executable, otherwise nose doesn't find them" && false)

.PHONY: fmt
fmt: python-env ## @build Runs `goimports -l -w` and `autopep8`on the project's source code, modifying any files that do not match its style.
Expand Down