Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/test/mini_installer/verifier_runner.py

Issue 2747023002: Cleanup machine based on the state in configuration file for mini installer test.
Patch Set: refactor to use visitor pattern Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/mini_installer/verifier.py ('k') | chrome/test/mini_installer/verifier_visitor.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import file_verifier
6 import process_verifier
7 import registry_verifier
8
9
10 class VerifierRunner:
11 """Runs all Verifiers."""
12
13 def __init__(self):
14 """Constructor."""
15 # TODO(sukolsak): Implement other verifiers
16 self._verifiers = {
17 'Files': file_verifier.FileVerifier(),
18 'Processes': process_verifier.ProcessVerifier(),
19 'RegistryEntries': registry_verifier.RegistryVerifier(),
20 }
21
22 def VerifyAll(self, property, variable_expander):
23 """Verifies that the current machine states match the property dictionary.
24
25 A property dictionary is a dictionary where each key is a verifier's name
26 and the associated value is the input to that verifier. For details about
27 the input format for each verifier, take a look at http://goo.gl/1P85WL
28
29 Args:
30 property: A property dictionary.
31 variable_expander: A VariableExpander object.
32 """
33 for verifier_name, verifier_input in property.iteritems():
34 if verifier_name not in self._verifiers:
35 raise KeyError('Unknown verifier %s' % verifier_name)
36 self._verifiers[verifier_name].VerifyInput(verifier_input,
37 variable_expander)
OLDNEW
« no previous file with comments | « chrome/test/mini_installer/verifier.py ('k') | chrome/test/mini_installer/verifier_visitor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698