Skip to content

Commit

Permalink
scripts: Fix CMake spelling
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rettichschnidi authored and mmahadevan108 committed Oct 30, 2024
1 parent 054bd85 commit 743761d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/pylib/twister/twisterlib/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/pylib/twister/twisterlib/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/twister/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions scripts/tests/twister/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion scripts/tests/twister_blackbox/test_outfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions scripts/west_commands/spdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`")
Expand All @@ -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):
Expand Down

0 comments on commit 743761d

Please sign in to comment.