Commit a846872b authored by maruel@chromium.org's avatar maruel@chromium.org

An empty .results file would throw ValueError, eat it.

R=mad@chromium.org
BUG=
TEST=Switching from test_isolate_mode=noop to hashtable works

Review URL: https://chromiumcodereview.appspot.com/10386211

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137910 0039d316-1c4b-4281-b951-d872f2087c98
parent 3f1fd807
...@@ -298,8 +298,8 @@ class Flattenable(object): ...@@ -298,8 +298,8 @@ class Flattenable(object):
with open(filename, 'r') as f: with open(filename, 'r') as f:
out = cls.load(json.load(f)) out = cls.load(json.load(f))
logging.debug('Loaded %s(%s)' % (cls.__name__, filename)) logging.debug('Loaded %s(%s)' % (cls.__name__, filename))
except IOError: except (IOError, ValueError):
pass logging.warn('Failed to load %s' % filename)
return out return out
......
...@@ -478,7 +478,11 @@ class Isolate_trace(IsolateBase): ...@@ -478,7 +478,11 @@ class Isolate_trace(IsolateBase):
# Includes spew from tracerpt.exe. # Includes spew from tracerpt.exe.
self.assertTrue(out.startswith(expected)) self.assertTrue(out.startswith(expected))
else: else:
self.assertEquals(expected, out.rstrip()) lines = out.strip().splitlines()
self.assertEquals(3, len(lines))
self.assertTrue(lines[0].startswith('WARNING'))
self.assertTrue(lines[1].startswith('WARNING'))
self.assertEquals(expected, lines[2])
def test_missing_trailing_slash(self): def test_missing_trailing_slash(self):
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment