summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/contrib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-07-30 19:25:13 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:27:54 +0100
commitba667a0908db537c72aa124a2a80ee374260d1fa (patch)
treea3f0a35b9fa911f7e7d04061893ae2adc992e340 /bitbake/lib/toaster/contrib
parentfaaa5d45d8fea59abf4fa68d756e80868889ca24 (diff)
downloadpoky-ba667a0908db537c72aa124a2a80ee374260d1fa.tar.gz
bitbake: toaster: tts: improve logging in urlcheck.py
This patch improves logging in the urlcheck.py. It allows properly running just HTML5 tests outside the test suite. (Bitbake rev: 91566d2ea8ca5a696ce742b9e5e3b7b6c10c200c) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/contrib')
-rw-r--r--bitbake/lib/toaster/contrib/tts/urlcheck.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/contrib/tts/urlcheck.py b/bitbake/lib/toaster/contrib/tts/urlcheck.py
index 8514de8956..0820f82e2a 100644
--- a/bitbake/lib/toaster/contrib/tts/urlcheck.py
+++ b/bitbake/lib/toaster/contrib/tts/urlcheck.py
@@ -2,11 +2,12 @@ from __future__ import print_function
2import sys 2import sys
3 3
4import httplib2 4import httplib2
5
6import config 5import config
7import urllist 6import urllist
8 7
9 8
9config.logger.info("Testing %s with %s", config.TOASTER_BASEURL, config.W3C_VALIDATOR)
10
10def validate_html5(url): 11def validate_html5(url):
11 http_client = httplib2.Http(None) 12 http_client = httplib2.Http(None)
12 status = "Failed" 13 status = "Failed"
@@ -23,6 +24,12 @@ def validate_html5(url):
23 status = resp['x-w3c-validator-status'] 24 status = resp['x-w3c-validator-status']
24 errors = int(resp['x-w3c-validator-errors']) 25 errors = int(resp['x-w3c-validator-errors'])
25 warnings = int(resp['x-w3c-validator-warnings']) 26 warnings = int(resp['x-w3c-validator-warnings'])
27
28 if status == 'Invalid':
29 config.logger.warn("Failed %s is %s\terrors %s warnings %s (check at %s)", url, status, errors, warnings, urlrequest)
30 else:
31 config.logger.debug("OK! %s", url)
32
26 except Exception as exc: 33 except Exception as exc:
27 config.logger.warn("Failed validation call: %s", exc) 34 config.logger.warn("Failed validation call: %s", exc)
28 return (status, errors, warnings) 35 return (status, errors, warnings)