diff --git a/test/unit/argument_merge/BUILD b/test/unit/argument_merge/BUILD deleted file mode 100644 index 67df1825..00000000 --- a/test/unit/argument_merge/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 2023 Ericsson AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load( - "@codechecker_bazel//src:codechecker.bzl", - "codechecker_test", -) - -# cc_binary for simple C++ tests -load( - "@rules_cc//cc:defs.bzl", - "cc_library", -) - -cc_library( - name = "main", - srcs = ["main.cc"], -) - -# Test with overwriting analyzers argument -# Testing on the regular rule isn't necessary, -# there are no default options to be merged. -codechecker_test( - name = "per_file_argument_merge", - analyze = [ - "--analyzers clangsa clang-tidy", - ], - per_file = True, - targets = [ - "main", - ], -) diff --git a/test/unit/argument_merge/__init__.py b/test/unit/argument_merge/__init__.py deleted file mode 100644 index 78bab5f1..00000000 --- a/test/unit/argument_merge/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2023 Ericsson AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/test/unit/argument_merge/main.cc b/test/unit/argument_merge/main.cc deleted file mode 100644 index ad1e8311..00000000 --- a/test/unit/argument_merge/main.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2023 Ericsson AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// We are only curious about the codechecker.log file, no need for a warning. -int main(){ - return 0; -} diff --git a/test/unit/argument_merge/test_argument_merge.py b/test/unit/argument_merge/test_argument_merge.py deleted file mode 100644 index 0f71ecf0..00000000 --- a/test/unit/argument_merge/test_argument_merge.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2023 Ericsson AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Tests wether default argument options and -user given arguments are merged correctly -""" -import os -import re -import unittest -from common.base import TestBase - - -class TestTemplate(TestBase): - """Argument merging Tests""" - - # Set working directory - __test_path__ = os.path.dirname(os.path.abspath(__file__)) - BAZEL_BIN_DIR = os.path.join( - "../../..", "bazel-bin", "test", "unit", "argument_merge" - ) - BAZEL_TESTLOGS_DIR = os.path.join( - "../../..", "bazel-testlogs", "test", "unit", "argument_merge" - ) - - def test_per_file_argument_merge(self): - """Test: Whether default options gets override""" - code, _, stderr = self.run_command( - "bazel build //test/unit/argument_merge:per_file_argument_merge" - ) - self.assertEqual(code, 0, stderr) - matched_lines: list[str] = self.grep_file( - self.BAZEL_BIN_DIR - + "/per_file_argument_merge/data/" - + "test-unit-argument_merge-main.cc_codechecker.log", - r"--analyzers", - ) - # FIXME: Change to '1' - # Should only have this argument set once - self.assertEqual(len(re.findall("--analyzers", matched_lines[0])), 2) - - -if __name__ == "__main__": - unittest.main(buffer=True)