Makefile: Don't generate byte code (pyc) in presubmit checks.
Currently we don't generate byte code files (*.pc) in
devtools/mk/test.sh, but that creates a problem when people try to run
pre-submit checks, which may generate pyc files and make .tests-passed
file expired.
As a result, we should ignore byte code generation in presubmit checks.
BUG=None
TEST=make test;
repo upload .
Change-Id: I79e4d9ee796e3a4ff3eecee88dd0486f9f9407e5
Reviewed-on: https://chromium-review.googlesource.com/476492
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
diff --git a/Makefile b/Makefile
index 79e8472..acefd6e 100644
--- a/Makefile
+++ b/Makefile
@@ -311,7 +311,8 @@
bin/smart_lint --overlay $(@:smart_lint-%=%)
presubmit-chroot:
- $(foreach target,$(PRESUBMIT_TARGETS),$(MAKE) -s $(target)${\n})
+ $(foreach target,$(PRESUBMIT_TARGETS),\
+ PYTHONDONTWRITEBYTECODE=true $(MAKE) -s $(target)${\n})
presubmit-lint:
@$(MAKE) lint LINT_FILES="$(filter %.py,$(PRESUBMIT_FILES))" 2>/dev/null