diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-29 03:03:20 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-29 03:03:20 +0000 |
commit | 2a771313edc1c85ec433d83966bb1363412761e7 (patch) | |
tree | 7ad64429ffcca88ab032bbc95cad25e4a08b9663 /tools | |
parent | d14ef8d69dc28e52129c1567272ccf2a675e743e (diff) | |
download | chromium_src-2a771313edc1c85ec433d83966bb1363412761e7.zip chromium_src-2a771313edc1c85ec433d83966bb1363412761e7.tar.gz chromium_src-2a771313edc1c85ec433d83966bb1363412761e7.tar.bz2 |
Whitelist key touched_only.
Add test to ensure files generated by isolate.py are readable by
run_test_from_archive.py. This should prevent eventually regression.
'touched_only' is not actually used, the sha-1 is set to an empty file. So it
will make sense to remove this key, along timestamp.
TBR=cmp@chromium.org,csharp@chromium.org
NOTRY=true
BUG=
Review URL: https://chromiumcodereview.appspot.com/10885025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/isolate/isolate_smoke_test.py | 3 | ||||
-rwxr-xr-x | tools/isolate/run_test_from_archive.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/isolate/isolate_smoke_test.py b/tools/isolate/isolate_smoke_test.py index 4876ef9..b6194fc 100755 --- a/tools/isolate/isolate_smoke_test.py +++ b/tools/isolate/isolate_smoke_test.py @@ -17,6 +17,7 @@ import tempfile import unittest import isolate +import run_test_from_archive ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) VERBOSE = False @@ -256,6 +257,8 @@ class IsolateModeBase(IsolateBase): def _expect_results(self, args, read_only, extra_vars, empty_file): self._expected_result(args, read_only, empty_file) self._expected_saved_state(extra_vars) + # Also verifies run_test_from_archive.py will be able to read it. + run_test_from_archive.load_manifest(open(self.result, 'r').read()) def _expect_no_result(self): self.assertFalse(os.path.exists(self.result)) diff --git a/tools/isolate/run_test_from_archive.py b/tools/isolate/run_test_from_archive.py index 247da15..ad78617 100755 --- a/tools/isolate/run_test_from_archive.py +++ b/tools/isolate/run_test_from_archive.py @@ -207,6 +207,9 @@ def load_manifest(content): elif subsubkey == 'timestamp': if not isinstance(subsubvalue, int): raise ConfigError('Expected int, got %r' % subsubvalue) + elif subsubkey == 'touched_only': + if not isinstance(subsubvalue, bool): + raise ConfigError('Expected bool, got %r' % subsubvalue) else: raise ConfigError('Unknown key %s' % subsubkey) if bool('sha-1' in subvalue) and bool('link' in subvalue): |