From 9591ad4bfe5ea1c50e111018a60eeb1070eda4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 3 Oct 2023 15:29:48 +0200 Subject: [PATCH] test --- .../codechecker_report_converter/report/hash.py | 3 +++ .../codechecker_report_converter/report/parser/sarif.py | 1 - tools/report-converter/tests/unit/analyzers/test_gcc_parser.py | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/report-converter/codechecker_report_converter/report/hash.py b/tools/report-converter/codechecker_report_converter/report/hash.py index aa6c5e5ab9..128d365c29 100644 --- a/tools/report-converter/codechecker_report_converter/report/hash.py +++ b/tools/report-converter/codechecker_report_converter/report/hash.py @@ -184,6 +184,9 @@ def get_report_hash(report: Report, hash_type: HashType) -> str: else: raise Exception("Invalid report hash type: " + str(hash_type)) + print(hash_content) + assert False + return __str_to_hash('|||'.join(hash_content)) diff --git a/tools/report-converter/codechecker_report_converter/report/parser/sarif.py b/tools/report-converter/codechecker_report_converter/report/parser/sarif.py index d973f636a4..11a7713486 100644 --- a/tools/report-converter/codechecker_report_converter/report/parser/sarif.py +++ b/tools/report-converter/codechecker_report_converter/report/parser/sarif.py @@ -112,7 +112,6 @@ def get_reports( print(get_report_hash(report, HashType.CONTEXT_FREE)) print(get_report_hash( report, HashType.DIAGNOSTIC_MESSAGE)) - assert False reports.append(report) diff --git a/tools/report-converter/tests/unit/analyzers/test_gcc_parser.py b/tools/report-converter/tests/unit/analyzers/test_gcc_parser.py index 2e30d02472..2b382f2c9c 100644 --- a/tools/report-converter/tests/unit/analyzers/test_gcc_parser.py +++ b/tools/report-converter/tests/unit/analyzers/test_gcc_parser.py @@ -77,7 +77,7 @@ def test_no_plist_dir(self): file_name="{source_file}_{analyzer}") self.assertFalse(ret) - def test_transform_single_file(self): + def test_gcc_transform_single_file(self): """ Test transforming single plist file. """ analyzer_output_file = os.path.join( self.test_files, 'double_free.cpp.sarif') @@ -97,7 +97,6 @@ def test_transform_single_file(self): res['metadata']['generated_by']['version'] = "x.y.z" print( res["diagnostics"][0]["issue_hash_content_of_line_in_context"]) - assert False plist_file = os.path.join(self.test_files, 'double_free.expected.plist')