rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=b26611cae60e4bedbc30737efa727d7bef3fc784

commit b26611cae60e4bedbc30737efa727d7bef3fc784
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Jul 10 12:25:34 2015 +0300

    UTC: add failed only report
---
 Makefile.am                     | 6 ++++++
 tests/tests_report_generator.py | 9 ++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8399634..0019562 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,12 @@ report_failed:
        echo "Cleaning report files..." && rm -rf tests/*.log tests/html/* 
*.tmp report.html
        $(MAKE) $(AM_MAKEFLAGS) check || true
        cd tests && doxygen Doxyfile && cd ..
+       ${top_srcdir}/tests/tests_report_generator.py -i -n -o report.html 
${top_builddir}/tests/html/ ${top_builddir}/tests/
+
+report_failed_and_notfound:
+       echo "Cleaning report files..." && rm -rf tests/*.log tests/html/* 
*.tmp report.html
+       $(MAKE) $(AM_MAKEFLAGS) check || true
+       cd tests && doxygen Doxyfile && cd ..
        ${top_srcdir}/tests/tests_report_generator.py -i -o report.html 
${top_builddir}/tests/html/ ${top_builddir}/tests/
 
 report_debug:
diff --git a/tests/tests_report_generator.py b/tests/tests_report_generator.py
index 40df058..68e8786 100755
--- a/tests/tests_report_generator.py
+++ b/tests/tests_report_generator.py
@@ -54,7 +54,7 @@ def walk_dirs(prefix):
                                        if html.endswith('.html'):
                                                parse_doc(html)
 
-def gen_report(logs_dir, output_file, ignorepassed):
+def gen_report(logs_dir, output_file, ignorepassed, ignorenotfound):
        with open(output_file, 'w') as out:
                out.write('<html><body><table border="1">\n')
                for tmp_file in os.listdir('.'):
@@ -76,6 +76,7 @@ def gen_report(logs_dir, output_file, ignorepassed):
                                                        try:
                                                                while i < 
len(tmp_lines):
                                                                        
passed_flag = False
+                                                                       
found_flag = False
                                                                        tmp_out 
= ""
                                                                        i = i + 
1
                                                                        test_id 
= tmp_lines[i].split("</td><td>", 3)[1][:-1]
@@ -92,6 +93,7 @@ def gen_report(logs_dir, output_file, ignorepassed):
                                                                                
passed = '<td bgcolor="#FFFF00">Result not found</td>'
                                                                                
if test_id in lines[j]:
                                                                                
        log_split = lines[j].split(':', 7)
+                                                                               
        found_flag = True;
                                                                                
        if log_split[2] == 'P':
                                                                                
                passed_flag = True
                                                                                
                result = tmp_split[2]
@@ -111,7 +113,7 @@ def gen_report(logs_dir, output_file, ignorepassed):
                                                                        tmp_out 
= tmp_out + tmp_split[2] + '</td><td>'
                                                                        tmp_out 
= tmp_out + result + '</td>'
                                                                        tmp_out 
= tmp_out + passed + '</tr>'
-                                                                       if not 
passed_flag or not ignorepassed:
+                                                                       if (not 
passed_flag or not ignorepassed) and (found_flag or not ignorenotfound):
                                                                                
out.write(tmp_out)
                                                                        while 
not '</tr>' in tmp_lines[i]:
                                                                                
i = i + 1
@@ -131,6 +133,7 @@ def main():
        parser.add_argument('log', help='path to the tests log directory')
        parser.add_argument('-c', '--clean', action='store_true', help='removes 
all *.tmp files from current directory before processing')
        parser.add_argument('-i', '--ignorepassed', action='store_true', 
help='do not add passed test to output')
+       parser.add_argument('-n', '--ignorenotfound', action='store_true', 
help='do not add not found test to output')
        parser.add_argument('-t', '--tmp', action='store_true', help='do not 
remove *.tmp files from current directory after processing')
        parser.add_argument('-o', '--output', default='report.html', 
help='output file name. Default name: report.html')
        args = parser.parse_args()
@@ -149,7 +152,7 @@ def main():
                print 'ERROR: "{}" is not directory'.format(args.log)
                return
        walk_dirs(args.html)
-       gen_report(args.log, args.output, args.ignorepassed)
+       gen_report(args.log, args.output, args.ignorepassed, 
args.ignorenotfound)
        if not args.tmp:
                for f in os.listdir('.'):
                        if not os.path.isdir(f) and f.endswith('.tmp'):

-- 


Reply via email to