crosperf: make run_tests use our new test runner

This is three small changes in one.

The main attraction is no functional change. The benefits we see are:
A. less cluttered output
B. total wall time of test running is down from 18s to
   13s on my machine, since the test runner spawns all
   tests in parallel

The second change is that we now set PYTHONPATH for linting. Otherwise,
we'll see errors about bad imports.

Finally, this fixes a test. It appears that the parameters of this
assertRaises function have been accidentally flipped, though that works
without issue outside of the chroot. To understand why, consider that
assertRaises has two forms that act completely differently:

self.assertRaises(Exception, foo)

Which causes self.assertRaises to run foo(), and expect that foo()
raises an Exception.

Additionally, it can be used like so:

with self.assertRaises(Exception):
  foo()

Which causes assertRaises to intercept any Exception that the block
under it may throw.

The difference between the in-chroot and out-of-chroot Python is simple:
outside of the chroot, the default value for the second arg to
assertRaises -- not counting `self` -- is None. Inside of the chroot,
they have a special, hidden sentinel value that it defaults to.

So, *outside* of the chroot, `self.assertRaises(Exception)` is
equivalent to `self.assertRaises(Exception, None)`, so the latter
returns a context object that tries to catch an exception.

Inside of the chroot, `self.assertRaises(Exception, None)` is not
equivalent to `self.assertRaises(Exception)`, and `None` is called as
though it was a function.

Since the removed code was `self.assertRaises(foo, None)`, outside of
the chroot, we'd just be returned a context object that we dropped on
the floor. Inside of the chroot, `self.assertRaises(foo, None)` would
try to call `None()`, fail, then try to say
`issubclass(exception_that_calling_none_raised, foo)`, but foo is a
function, so `issubclass` would raise on its own.

For those keeping score at home, the chroot's behavior was introduced in
upstream Python in 7f71e04cb510c24be337a22350324dc8a28e9775, which
landed in the 2.7.10 release. It wasn't until 2.7.11 that the revert
049060c249a83b69c4841ed37b7f4303f9ad7dd7 took effect. For more, the bug
was https://bugs.python.org/issue24134

BUG=None
TEST=./run_tests.sh

Change-Id: I58c398caafde03242ed3ca7530bf9a819fae99e2
Reviewed-on: https://chromium-review.googlesource.com/1548399
Commit-Ready: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>
3 files changed