This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 36897a7fd85040415ebeeb0123e13bf9017bd86c (commit) via e0a8717efbbbc254122dd2336533715212206b77 (commit) via 8717d3ad7ed614d6df54b33bf70597d4976adf09 (commit) from 0825f7c5af179314d44a5ce71e5928cff7d5209b (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/36897a7fd85040415ebeeb0123e13bf9017bd...
commit 36897a7fd85040415ebeeb0123e13bf9017bd86c Author: Cyril Hrubis metan@ucw.cz Date: Sun Apr 21 18:31:52 2013 +0200
tests: Hack res2html.sh
Now we can convert directory of json logs into browsable and linked html pages.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/framework/log2html.py b/tests/framework/log2html.py index c417daa..2263373 100755 --- a/tests/framework/log2html.py +++ b/tests/framework/log2html.py @@ -3,7 +3,7 @@ # # Script to convert testsuite JSON log into html page # - +from sys import argv import json
# @@ -274,16 +274,77 @@ class TestSuite: print(' </body>') print('</html>')
+ def results(self): + res_dict = {} + + for i in html_colors: + res_dict[i] = 0 + + for tst in self.test_results: + res_dict[tst.result] = res_dict[tst.result] + 1; + + return res_dict + + # Creates table row with a link to results page + def html_summary(self, link): + print(' <tr>') + + res_dict = self.results() + + test_ok = res_dict['Success'] + test_ok += res_dict['Skipped'] + test_ok += res_dict['Untested'] + + test_all = len(self.test_results) + + if (test_ok < test_all): + bg_color = html_colors['Failed'] + else: + bg_color = '#ccccee' + + + + print(' <td bgcolor="#ccccee">%s</td>' % (self.suite_name)) + print(' <td bgcolor="%s">%i</td>' % (bg_color, test_all - test_ok)) + + test_skipped = res_dict['Skipped'] + + if (test_skipped > 0): + bg_color = html_colors['Skipped'] + else: + bg_color = '#ccccee' + + print(' <td bgcolor="%s">%i</td>' % (bg_color, test_skipped)) + print(' <td bgcolor="#ccccee">%i</td>' % (test_all)) + print(' <td bgcolor="#ccccee"><small><a href="%s">Details</a></small></td>' % (link)) + print(' </tr>') + def main(): + filename = 'log.json' + summary = False + pars = 1 + link = '' + + if (len(argv) > 1 and argv[1] == '-s'): + link = argv[2] + pars = 3 + summary = True + + if (len(argv) > pars): + filename = argv[pars] + # parse JSON - f = open('log.json') + f = open(filename) data = json.load(f) f.close()
# convert to python objects test_suite = TestSuite(data) - - test_suite.html() + + if (summary): + test_suite.html_summary(link) + else: + test_suite.html()
if __name__ == '__main__': main() diff --git a/tests/framework/res2html.sh b/tests/framework/res2html.sh new file mode 100755 index 0000000..2c10a29 --- /dev/null +++ b/tests/framework/res2html.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# +# Quick hack to generate html from result directory +# + +resdir=$1 + +function die() +{ + echo "" + echo "* ERROR * ERROR * ERROR * ERROR * ERROR * ERROR *" + echo "" + echo "$1" + echo "" + echo "* ERROR * ERROR * ERROR * ERROR * ERROR * ERROR *" + echo "" + exit 1 +} + +BINDIR=$(pwd) + +echo "Running in resdir $resdir" + +cd "$resdir" || die "Failed to cd into $resdir" + +echo "<html>" > index.html +echo " <head>" >> index.html +echo " </head>" >> index.html +echo " <body>" >> index.html +echo " <h1>Test Results</h1>" >> index.html +echo " <table bgcolor="#99a">" >> index.html +echo " <tr bgcolor="#bbbbff">" >> index.html +echo " <td><b>Suite</b></td>" >> index.html +echo " <td><b>Fail</b></td>" >> index.html +echo " <td><b>Skip</b></td>" >> index.html +echo " <td><b>All</b></td>" >> index.html +echo " <td><b>Link</b></td>" >> index.html +echo " </tr>" >> index.html + +for i in *; do + if ! [ -d "$i" ]; then + continue + fi + + echo " <tr><td colspan="6" bgcolor="#bbf"> $i</td></tr>" >> index.html + + for j in "$i/"*.json; do + ts_name=$(basename "$j" ".json") + echo "$j -> $i/$ts_name.html" + $BINDIR/log2html.py -s "$i/$ts_name.html" "$j" >> index.html + $BINDIR/log2html.py "$j" > "$i/$ts_name.html" + done +done + +echo " </table>" >> index.html +echo " </body>" >> index.html +echo "</html>" >> index.html
http://repo.or.cz/w/gfxprim.git/commit/e0a8717efbbbc254122dd2336533715212206...
commit e0a8717efbbbc254122dd2336533715212206b77 Author: Cyril Hrubis metan@ucw.cz Date: Sun Apr 21 16:13:50 2013 +0200
build: configure: Fix python version detection bug.
If there is no python-config we can't run the version detection code.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/configure b/configure index af9f8fc..9deeb6c 100755 --- a/configure +++ b/configure @@ -40,7 +40,11 @@ def c_compiler_exists(cfg):
def python_version(cfg): sys.stderr.write("Cddhecking for python-config Python version ... ") - + + if (cfg['PYTHON_CONFIG'][0] is ''): + sys.stderr.write('NAn') + return '' + res = str(check_output("%s --ldflags" % cfg['PYTHON_CONFIG'][0], shell=True)) res = res[res.find('-lpython')+8:] res = res[:3]
http://repo.or.cz/w/gfxprim.git/commit/8717d3ad7ed614d6df54b33bf70597d4976ad...
commit 8717d3ad7ed614d6df54b33bf70597d4976adf09 Author: Cyril Hrubis metan@ucw.cz Date: Sun Apr 21 16:11:18 2013 +0200
pywrap: gfx: Remove references to removed Symbol()
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/pylib/gfxprim/gfx/__init__.py b/pylib/gfxprim/gfx/__init__.py index 2b8d310..dc2e9a9 100644 --- a/pylib/gfxprim/gfx/__init__.py +++ b/pylib/gfxprim/gfx/__init__.py @@ -37,9 +37,9 @@ def _init(module):
for name in [ 'ArcSegment', 'Circle', 'Ellipse', 'Fill', 'FillCircle', 'FillEllipse', - 'FillRect', 'FillRect_AA', 'FillRing', 'FillSymbol', + 'FillRect', 'FillRect_AA', 'FillRing', 'FillTetragon', 'FillTriangle', 'HLine', 'HLineAA', 'Line', 'LineAA', - 'PutPixelAA', 'Rect', 'Ring', 'Symbol', 'Tetragon', + 'PutPixelAA', 'Rect', 'Ring', 'Tetragon', 'Triangle', 'VLine', 'VLineAA']: extend_submodule(GfxSubmodule, name, c_gfx.__getattribute__('GP_' + name))
diff --git a/tests/pylib/test_gfx.py b/tests/pylib/test_gfx.py index ac5ec2c..292202a 100644 --- a/tests/pylib/test_gfx.py +++ b/tests/pylib/test_gfx.py @@ -32,7 +32,6 @@ gfx_params = { 'FillRect': 'IIIIP', 'FillRect_AA': 'IIIIP', # Fixpoint, originally 'FFFFP' 'FillRing': 'IIIIP', - 'FillSymbol': '0IIIIP', 'FillTetragon': 'IIIIIIIIP', 'FillTriangle': 'IIIIIIP', 'HLine': 'IIIP', @@ -43,7 +42,6 @@ gfx_params = { 'PutPixelAA': 'IIP', # Fixpoint, originally 'FFP' 'Rect': 'IIIIP', 'Ring': 'IIIIP', - 'Symbol': '0IIIIP', 'Tetragon': 'IIIIIIIIP', 'Triangle': 'IIIIIIP', 'VLine': 'IIIP',
-----------------------------------------------------------------------
Summary of changes: configure | 6 +++- pylib/gfxprim/gfx/__init__.py | 4 +- tests/framework/log2html.py | 69 ++++++++++++++++++++++++++++++++++++++-- tests/framework/res2html.sh | 58 ++++++++++++++++++++++++++++++++++ tests/pylib/test_gfx.py | 2 - 5 files changed, 130 insertions(+), 9 deletions(-) create mode 100755 tests/framework/res2html.sh
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.