From d6616a8a9f54da8f613850e5da39fe2262917662 Mon Sep 17 00:00:00 2001 From: Nora Zinaeddin Date: Tue, 10 Sep 2024 10:27:01 +0200 Subject: [PATCH] Add test for Disable clang-diagnostic-error checker #4325 Test if clang-diagnostic-error checker is disabled in cli. --- .../tests/functional/analyze/test_analyze.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/analyzer/tests/functional/analyze/test_analyze.py b/analyzer/tests/functional/analyze/test_analyze.py index 952e667a30..88e46ad47c 100644 --- a/analyzer/tests/functional/analyze/test_analyze.py +++ b/analyzer/tests/functional/analyze/test_analyze.py @@ -1316,6 +1316,22 @@ def test_invalid_compilation_database(self): self.assertEqual(process.returncode, 1) + def test_disable_error_checker_tidy(self): + """Make sure clang-diagnostic-error checker is disabled (PR #4325)""" + cmd = [self._codechecker_cmd, "check", "-l", self.__get_build_json(), + '--enable', 'clang-diagnostic-error'] + + process = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=self.test_dir, + encoding="utf-8", + errors="ignore") + out, _ = process.communicate() + + self.assertNotIn("error", out) + def test_compilation_db_relative_file_path(self): """ Test relative path in compilation database.