Make touch_UpdateErrors autotest ignore autotest and touchview failures
Add ignore_terms for the test , to ignore the logs which match the
ignore terms
BUG=chromium:621985
TEST=ran the test in cyan machine
Change-Id: Ie529e318f8b111c11df4bc8e8d68a2cf150c3b7d
Reviewed-on: https://chromium-review.googlesource.com/359415
Commit-Ready: Pramod Bathini <pbathini@chromium.org>
Tested-by: Pramod Bathini <pbathini@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
diff --git a/client/site_tests/touch_UpdateErrors/touch_UpdateErrors.py b/client/site_tests/touch_UpdateErrors/touch_UpdateErrors.py
index 7602834..0ad7f99 100644
--- a/client/site_tests/touch_UpdateErrors/touch_UpdateErrors.py
+++ b/client/site_tests/touch_UpdateErrors/touch_UpdateErrors.py
@@ -91,11 +91,16 @@
raise error.TestError('%s has no valid hw_id!' % input_type)
start_line = self._find_logs_start_line()
- log_cmd = 'tail -n +%s /var/log/messages | grep -i touch[^v]' % start_line
+ log_cmd = 'tail -n +%s /var/log/messages | grep -i touch' % start_line
pass_terms = ['touch-firmware-update',
'"Product[^a-z0-9]ID[^a-z0-9]*%s"' % hw_id]
fail_terms = ['error[^s]', 'err[^a-z]']
+ ignore_terms = ['touchview','autotest']
+
+ # Remove lines that match ignore_terms.
+ for term in ignore_terms:
+ log_cmd += ' | grep -v -i %s' % term
# Check for key terms in touch logs.
for term in pass_terms + fail_terms: