Do not generate *.pyc files.

Leftover *.pyc files are often problematic; for example, pytest
raises errors on running unit tests if a absolute path recorded in
*.pyc is different from its current apparent path, which is often
the case with our chroot build environment.

This change tells the Python interpreter not to generate *.pyc
files by passing -B option. Also, run_tests is updated not to
delete existing *.pyc files so that the command can be run inside
portage sandbox.

BUG=chromium:733103
TEST=CL:709174

Change-Id: Ibd5e2f2a707ef3bc9fa48c4acc2ed7ef7a8a228c
Reviewed-on: https://chromium-review.googlesource.com/711779
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
2 files changed