OLD | NEW |
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 | 7 |
8 from autotest_lib.client.bin import test, utils | 8 from autotest_lib.client.bin import test, utils |
9 from autotest_lib.client.common_lib import error | 9 from autotest_lib.client.common_lib import error |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 observed_set = self.fetch_bundled_crxs() | 46 observed_set = self.fetch_bundled_crxs() |
47 baseline_set = self.load_baseline() | 47 baseline_set = self.load_baseline() |
48 | 48 |
49 # If something in the observed set is not | 49 # If something in the observed set is not |
50 # covered by the baseline... | 50 # covered by the baseline... |
51 diff = observed_set.difference(baseline_set) | 51 diff = observed_set.difference(baseline_set) |
52 if len(diff) > 0: | 52 if len(diff) > 0: |
53 for crx in diff: | 53 for crx in diff: |
54 logging.error('New/unexpected bundled crx %s' % crx) | 54 logging.error('New/unexpected bundled crx %s' % crx) |
55 | 55 |
56 # Or, things in baseline are missing from the system. We log missing | 56 # Or, things in baseline are missing from the system: |
57 # CRX's as warnings instead of test failures because we autotest some | |
58 # builds where extensions aren't bundled. See chrome-os-partner:2414. | |
59 # TODO(jimhebert) make these warnings fatal after 2414 is resolved. | |
60 diff2 = baseline_set.difference(observed_set) | 57 diff2 = baseline_set.difference(observed_set) |
61 if len(diff2) > 0: | 58 if len(diff2) > 0: |
62 for crx in diff2: | 59 for crx in diff2: |
63 logging.warning('Missing bundled crx %s' % crx) | 60 logging.error('Missing bundled crx %s' % crx) |
64 | 61 |
65 if len(diff): | 62 if (len(diff) + len(diff2)) > 0: |
66 raise error.TestFail('Baseline mismatch') | 63 raise error.TestFail('Baseline mismatch') |
OLD | NEW |