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

Unified 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: fixup 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/mini_installer/verifier_runner.py
diff --git a/chrome/test/mini_installer/verifier_runner.py b/chrome/test/mini_installer/verifier_runner.py
index 41023d1f0a29b0e6ff5e7f6150dd562ca13ad038..eaa1383bcf6c5d29e021da22b802450eb8df12a5 100644
--- a/chrome/test/mini_installer/verifier_runner.py
+++ b/chrome/test/mini_installer/verifier_runner.py
@@ -7,6 +7,10 @@ import process_verifier
import registry_verifier
+FILES = 'Files'
+PROCESSES = 'Processes'
+REGISTRY_ENTRIES = 'RegistryEntries'
+
class VerifierRunner:
"""Runs all Verifiers."""
@@ -14,12 +18,12 @@ class VerifierRunner:
"""Constructor."""
# TODO(sukolsak): Implement other verifiers
self._verifiers = {
- 'Files': file_verifier.FileVerifier(),
- 'Processes': process_verifier.ProcessVerifier(),
- 'RegistryEntries': registry_verifier.RegistryVerifier(),
+ FILES: file_verifier.FileVerifier(),
grt (UTC plus 2) 2017/03/14 09:19:44 why this change?
+ PROCESSES: process_verifier.ProcessVerifier(),
+ REGISTRY_ENTRIES: registry_verifier.RegistryVerifier(),
}
- def VerifyAll(self, property, variable_expander):
+ def VerifyAll(self, state, 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
@@ -27,10 +31,10 @@ class VerifierRunner:
the input format for each verifier, take a look at http://goo.gl/1P85WL
Args:
- property: A property dictionary.
+ state: A property dictionary.
variable_expander: A VariableExpander object.
"""
- for verifier_name, verifier_input in property.iteritems():
+ for verifier_name, verifier_input in state.iteritems():
if verifier_name not in self._verifiers:
raise KeyError('Unknown verifier %s' % verifier_name)
self._verifiers[verifier_name].VerifyInput(verifier_input,
« chrome/test/mini_installer/test_installer.py ('K') | « chrome/test/mini_installer/verifier.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698