From 743761d7d1d7be7ef7cf0614e37ead5eb748b79e Mon Sep 17 00:00:00 2001 From: Reto Schneider Date: Tue, 22 Oct 2024 10:28:54 +0200 Subject: [PATCH] scripts: Fix CMake spelling As per its creators, CMake is written with a capital "M". The initial reason for this change is that I want Twister to print "ERROR : CMake build failure" instead of "ERROR : Cmake build failure". Signed-off-by: Reto Schneider --- scripts/pylib/twister/twisterlib/environment.py | 2 +- scripts/pylib/twister/twisterlib/runner.py | 6 +++--- scripts/tests/twister/test_environment.py | 2 +- scripts/tests/twister/test_runner.py | 4 ++-- scripts/tests/twister_blackbox/test_outfile.py | 3 ++- scripts/west_commands/spdx.py | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/environment.py b/scripts/pylib/twister/twisterlib/environment.py index ab4f1a3d6af45f..c81b03355ce5e9 100644 --- a/scripts/pylib/twister/twisterlib/environment.py +++ b/scripts/pylib/twister/twisterlib/environment.py @@ -1075,7 +1075,7 @@ def run_cmake_script(args=[]): results = {"returncode": p.returncode, "msg": msg, "stdout": out} else: - logger.error("Cmake script failure: %s" % (args[0])) + logger.error("CMake script failure: %s" % (args[0])) results = {"returncode": p.returncode, "returnmsg": out} return results diff --git a/scripts/pylib/twister/twisterlib/runner.py b/scripts/pylib/twister/twisterlib/runner.py index 4a38eeb284a90a..138813f45a0b45 100644 --- a/scripts/pylib/twister/twisterlib/runner.py +++ b/scripts/pylib/twister/twisterlib/runner.py @@ -437,12 +437,12 @@ def run_cmake(self, args="", filter_stages=[]): } else: self.instance.status = TwisterStatus.ERROR - self.instance.reason = "Cmake build failure" + self.instance.reason = "CMake build failure" for tc in self.instance.testcases: tc.status = self.instance.status - logger.error("Cmake build failure: %s for %s" % (self.source_dir, self.platform.name)) + logger.error("CMake build failure: %s for %s" % (self.source_dir, self.platform.name)) ret = {"returncode": p.returncode} if out: @@ -821,7 +821,7 @@ def process(self, pipeline, done, message, lock, results): mode = message.get("mode") if mode == "device": self.cleanup_device_testing_artifacts() - elif mode == "passed" or (mode == "all" and self.instance.reason != "Cmake build failure"): + elif mode == "passed" or (mode == "all" and self.instance.reason != "CMake build failure"): self.cleanup_artifacts() except StatusAttributeError as sae: logger.error(str(sae)) diff --git a/scripts/tests/twister/test_environment.py b/scripts/tests/twister/test_environment.py index 540708d6a19273..3a4e090598b045 100644 --- a/scripts/tests/twister/test_environment.py +++ b/scripts/tests/twister/test_environment.py @@ -488,7 +488,7 @@ def mocked_abspath(path): True, 1, b'another\x1B_dummy', - 'Cmake script failure: dummy/script/path', + 'CMake script failure: dummy/script/path', { 'returncode': 1, 'returnmsg': 'anotherdummy' diff --git a/scripts/tests/twister/test_runner.py b/scripts/tests/twister/test_runner.py index 1aecba6dbfc372..2b088fcb6bfd66 100644 --- a/scripts/tests/twister/test_runner.py +++ b/scripts/tests/twister/test_runner.py @@ -383,7 +383,7 @@ def mock_popen(*args, **kwargs): (False, [], 1, True, 'ERROR: region `FLASH\' overflowed by 123 MB', True, False, True, - TwisterStatus.ERROR, 'Cmake build failure', + TwisterStatus.ERROR, 'CMake build failure', [os.path.join('dummy', 'cmake'), '-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1', '-DTC_NAME=testcase', '-DSB_CONFIG_COMPILER_WARNINGS_AS_ERRORS=n', @@ -1421,7 +1421,7 @@ def mock_getsize(filename, *args, **kwargs): ( {'op': 'cleanup', 'mode': 'all'}, mock.ANY, - 'Cmake build failure', + 'CMake build failure', mock.ANY, mock.ANY, mock.ANY, diff --git a/scripts/tests/twister_blackbox/test_outfile.py b/scripts/tests/twister_blackbox/test_outfile.py index e2b0ac92a974da..0376769781841a 100644 --- a/scripts/tests/twister_blackbox/test_outfile.py +++ b/scripts/tests/twister_blackbox/test_outfile.py @@ -15,6 +15,7 @@ import sys import tarfile +# pylint: disable=no-name-in-module from conftest import ZEPHYR_BASE, TEST_DATA, sample_filename_mock, testsuite_filename_mock from twisterlib.testplan import TestPlan @@ -149,7 +150,7 @@ def test_short_build_path(self, out_path): flag_pattern = r'(?:\S+(?: \\)?)+- ' cmake_path = shutil.which('cmake') if not cmake_path: - assert False, 'Cmake not found.' + assert False, 'CMake not found.' cmake_call_section = r'^Calling cmake: ' + re.escape(cmake_path) calling_line = re.sub(cmake_call_section, '', calling_line) diff --git a/scripts/west_commands/spdx.py b/scripts/west_commands/spdx.py index 25ccde63e5be6a..7a10b441534715 100644 --- a/scripts/west_commands/spdx.py +++ b/scripts/west_commands/spdx.py @@ -64,7 +64,7 @@ def do_run(self, args, unknown_args): self.do_run_spdx(args) def do_run_init(self, args): - self.inf("initializing Cmake file-based API prior to build") + self.inf("initializing CMake file-based API prior to build") if not args.build_dir: self.die("Build directory not specified; call `west spdx --init --build-dir=BUILD_DIR`") @@ -74,7 +74,7 @@ def do_run_init(self, args): if query_ready: self.inf("initialized; run `west build` then run `west spdx`") else: - self.err("Couldn't create Cmake file-based API query directory") + self.err("Couldn't create CMake file-based API query directory") self.err("You can manually create an empty file at $BUILDDIR/.cmake/api/v1/query/codemodel-v2") def do_run_spdx(self, args):