blob: 41023d1f0a29b0e6ff5e7f6150dd562ca13ad038 [file] [log] [blame]
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import file_verifier
import process_verifier
import registry_verifier
class VerifierRunner:
"""Runs all Verifiers."""
def __init__(self):
# TODO(sukolsak): Implement other verifiers
self._verifiers = {
'Files': file_verifier.FileVerifier(),
'Processes': process_verifier.ProcessVerifier(),
'RegistryEntries': registry_verifier.RegistryVerifier(),
def VerifyAll(self, property, variable_expander):
"""Verifies that the current machine states match the property dictionary.
A property dictionary is a dictionary where each key is a verifier's name
and the associated value is the input to that verifier. For details about
the input format for each verifier, take a look at
property: A property dictionary.
variable_expander: A VariableExpander object.
for verifier_name, verifier_input in property.iteritems():
if verifier_name not in self._verifiers:
raise KeyError('Unknown verifier %s' % verifier_name)