[pygobject] tests: Run PyFlakes and PEP8 only on SUBDIRS
- From: Simon Feltman <sfeltman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Run PyFlakes and PEP8 only on SUBDIRS
- Date: Tue, 14 Jan 2014 20:33:05 +0000 (UTC)
commit 61b4af05646a8f014cfb00a5507fec2deb9aafa6
Author: Simon Feltman <sfeltman src gnome org>
Date: Tue Jan 14 12:26:16 2014 -0800
tests: Run PyFlakes and PEP8 only on SUBDIRS
Move PyFlakes and PEP8 checks into check-local of the root Makefile.am. Only
run these tools on selective subdirs of top_srcdir. This fixes a problem
where vpath build directories within the srcdir would contain links to the
source files, causing these tools to run multiple times slowing down the
check process.
Makefile.am | 21 ++++++++++++++++++++-
tests/Makefile.am | 6 ------
2 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index b0623ff..1ab1b63 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,13 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = 1.7
+# Limit PyFlakes and PEP8 to these directories.
+pycheck_dirs = examples gi tests pygtkcompat
+
# Part of the gi subdirectory is handled with non-recursive make to avoid
# py-compile getting confused between gi/types.py and Python's standard
# types module.
-SUBDIRS = examples gi tests pygtkcompat
+SUBDIRS = . $(pycheck_dirs)
PLATFORM_VERSION = 3.0
@@ -167,6 +170,22 @@ dist-hook: $(BUILT_EXTRA_DIST)
if test -f $$f; then d=.; else d=$(srcdir); fi; \
rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done
+# pycheck_subdirs =
+
+check-local:
+ @echo " CHECK Pyflakes" $(pycheck_dirs)
+ @if type pyflakes >/dev/null 2>&1; then \
+ (cd $(abs_top_srcdir) && pyflakes $(pycheck_dirs) ); \
+ else echo "skipped, pyflakes not installed"; \
+ fi
+ @if test -z "$$SKIP_PEP8"; then \
+ echo " CHECK PEP8"; \
+ if type pep8 >/dev/null 2>&1; then \
+ (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124 --repeat --show-source
$(pycheck_dirs) ); \
+ else echo "skipped, pep8 not installed"; \
+ fi; \
+ fi
+
check.gdb:
cd tests && $(MAKE) check.gdb
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 02063d0..e69c263 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -134,12 +134,6 @@ RUN_TESTS_ENV_VARS= \
# pygtkcompat tests need to be run in a separate process as they
# clobber global name space
check-local: $(check_LTLIBRARIES:.la=.so) $(test_typelibs) gschemas.compiled
- @echo " CHECK Pyflakes"
- @if type pyflakes >/dev/null 2>&1; then pyflakes $(top_srcdir); else echo "skipped, pyflakes not
installed"; fi
- @if test -z "$$SKIP_PEP8"; then \
- echo " CHECK PEP8"; \
- if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124 --repeat --show-source
$(top_srcdir); else echo "skipped, pep8 not installed"; fi; \
- fi
export `$(DBUS_LAUNCH)` && \
$(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
[ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS)
$(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning
-Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]