def test_omni_analyzer(logger, report, args): testid = test_id('cert', 'omni-analyzer', 'check-omni-diff') logger.test_start(testid) omni_ref_path = pkg_resources.resource_filename( __name__, os.path.join(expected_results_path, 'expected_omni_results', 'omni.ja.mcts')) omni_analyzer = OmniAnalyzer(omni_ref_path, logger=logger) if args.html_result_file is not None: diff, is_run_success = omni_analyzer.run( html_format=True, results_file=os.path.join(os.path.dirname(args.html_result_file), 'omni_diff_report.html')) else: diff, is_run_success = omni_analyzer.run() report["omni_result"] = diff
sf = StringIO.StringIO(appinicontents) config = ConfigParser.ConfigParser() config.readfp(sf) report['application_ini'] = {} for section in config.sections(): report['application_ini'][section] = dict(config.items(section)) # run the omni.ja analyzer if 'omni-analyzer' in test_groups: omni_results_path = pkg_resources.resource_filename( __name__, 'omni.json') omni_verify_file = pkg_resources.resource_filename( __name__, os.path.sep.join(['expected_omni_results', '%s.json' % args.version])) omni_work_dir = pkg_resources.resource_filename( __name__, 'omnidir') omni_analyzer = OmniAnalyzer(vfile=omni_verify_file, results=omni_results_path, dir=omni_work_dir, logger=logger) omni_results = open(omni_results_path, 'r').read() report["omni_result"] = json.loads(omni_results) if not args.generate_reference: os.remove(omni_results_path) # start webserver if 'webapi' in test_groups or 'permissions' in test_groups: httpd = wptserve.server.WebTestHttpd( host=moznetwork.get_ip(), port=8000, routes=routes, doc_root=static_path) httpd.start() addr = (httpd.host, httpd.port) # run webapi and webidl tests if 'webapi' in test_groups: errors = False