diff options
author | sukolsak@chromium.org <sukolsak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-12 20:09:26 +0000 |
---|---|---|
committer | sukolsak@chromium.org <sukolsak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-12 20:09:26 +0000 |
commit | 04dbc630c1d32852c458e6b1a63820d09355623d (patch) | |
tree | ad9dbd37da189d1d7dad249fa8df119e2796b4d7 /chrome/test/mini_installer/verifier.py | |
parent | ee4f02b5e5e72e324e13ed6a95172b0c451a5e61 (diff) | |
download | chromium_src-04dbc630c1d32852c458e6b1a63820d09355623d.zip chromium_src-04dbc630c1d32852c458e6b1a63820d09355623d.tar.gz chromium_src-04dbc630c1d32852c458e6b1a63820d09355623d.tar.bz2 |
Use unittest framework in the Automated Installer Testing Framework.
NOTRY=True
BUG=264859
TEST=
1) Uninstall Chrome.
2) Put mini_installer.exe in the same folder as test_installer.py.
3) Run "python test_installer.py config\config.config".
4) The script will install Chrome and then uninstall Chrome. At each state, it will check that a registry entry for Chrome exists (or doesn't exist). You should see output similar to the following:
"Test: clean -> install chrome -> chrome_installed -> uninstall chrome -> clean ... ok
----------------------------------------------------------------------
Ran 1 test in 12.345s"
Review URL: https://chromiumcodereview.appspot.com/22480002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/mini_installer/verifier.py')
-rw-r--r-- | chrome/test/mini_installer/verifier.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/chrome/test/mini_installer/verifier.py b/chrome/test/mini_installer/verifier.py index 7b0fae6..8a735ba 100644 --- a/chrome/test/mini_installer/verifier.py +++ b/chrome/test/mini_installer/verifier.py @@ -4,12 +4,20 @@ import registry_verifier + def Verify(property): - """Verifies that the current machine states match the property object.""" + """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 http://goo.gl/1P85WL + + Args: + property: A property dictionary. + """ for verifier_name, value in property.iteritems(): if verifier_name == 'RegistryEntries': registry_verifier.VerifyRegistryEntries(value) else: # TODO(sukolsak): Implement other verifiers - # TODO(sukolsak): Use unittest framework instead of exceptions. - raise Exception('Unknown verifier') + raise KeyError('Unknown verifier %s' % verifier_name) |