commit | 1c2354a5657d9b447eefc7162b62159f28d1f5cc | [log] [tgz] |
---|---|---|
author | David Pursell <dpursell@google.com> | Fri May 06 11:33:06 2016 -0700 |
committer | David Pursell <dpursell@google.com> | Fri May 06 11:43:08 2016 -0700 |
tree | 155ed32eca70773c0d09632513d0b6c7a9a087a8 | |
parent | 13b471eea12f44d5bbecb24ef93c6321f62e4d90 [diff] |
bdk: give StubOs.cwd a sane default. util.GetProductDir() expects os.getcwd() to start with '/' or else it may loop forever. This seems like a reasonable expectation (on Linux at least) so adjust StubOs.cwd to comply. This fixes an issue where in some cases climanager_unittest.BdkTest would end up calling util.GetProductDir(), but a previous test had replaced util.os with StubOs, leading to this infinite loop. The real underlying problem is that manually monkey-patching over imported modules is super unpredictable and brittle, but that will have to be addressed in a larger test overhaul. Bug: 28602169 Change-Id: I5eda7e55b704933272f97a4334d7a92d18a0f6fa Test: `python test_runner.py`, with and without randomized test order.
This is the bdk which is used to build Brillo.
bdk
tool.