Skip to content

Commit 743761d

Browse files
rettichschnidimmahadevan108
authored andcommitted
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 <reto.schneider@husqvarnagroup.com>
1 parent 054bd85 commit 743761d

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

scripts/pylib/twister/twisterlib/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ def run_cmake_script(args=[]):
10751075
results = {"returncode": p.returncode, "msg": msg, "stdout": out}
10761076

10771077
else:
1078-
logger.error("Cmake script failure: %s" % (args[0]))
1078+
logger.error("CMake script failure: %s" % (args[0]))
10791079
results = {"returncode": p.returncode, "returnmsg": out}
10801080

10811081
return results

scripts/pylib/twister/twisterlib/runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,12 @@ def run_cmake(self, args="", filter_stages=[]):
437437
}
438438
else:
439439
self.instance.status = TwisterStatus.ERROR
440-
self.instance.reason = "Cmake build failure"
440+
self.instance.reason = "CMake build failure"
441441

442442
for tc in self.instance.testcases:
443443
tc.status = self.instance.status
444444

445-
logger.error("Cmake build failure: %s for %s" % (self.source_dir, self.platform.name))
445+
logger.error("CMake build failure: %s for %s" % (self.source_dir, self.platform.name))
446446
ret = {"returncode": p.returncode}
447447

448448
if out:
@@ -821,7 +821,7 @@ def process(self, pipeline, done, message, lock, results):
821821
mode = message.get("mode")
822822
if mode == "device":
823823
self.cleanup_device_testing_artifacts()
824-
elif mode == "passed" or (mode == "all" and self.instance.reason != "Cmake build failure"):
824+
elif mode == "passed" or (mode == "all" and self.instance.reason != "CMake build failure"):
825825
self.cleanup_artifacts()
826826
except StatusAttributeError as sae:
827827
logger.error(str(sae))

scripts/tests/twister/test_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def mocked_abspath(path):
488488
True,
489489
1,
490490
b'another\x1B_dummy',
491-
'Cmake script failure: dummy/script/path',
491+
'CMake script failure: dummy/script/path',
492492
{
493493
'returncode': 1,
494494
'returnmsg': 'anotherdummy'

scripts/tests/twister/test_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def mock_popen(*args, **kwargs):
383383
(False, [],
384384
1, True, 'ERROR: region `FLASH\' overflowed by 123 MB',
385385
True, False, True,
386-
TwisterStatus.ERROR, 'Cmake build failure',
386+
TwisterStatus.ERROR, 'CMake build failure',
387387
[os.path.join('dummy', 'cmake'),
388388
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1', '-DTC_NAME=testcase',
389389
'-DSB_CONFIG_COMPILER_WARNINGS_AS_ERRORS=n',
@@ -1421,7 +1421,7 @@ def mock_getsize(filename, *args, **kwargs):
14211421
(
14221422
{'op': 'cleanup', 'mode': 'all'},
14231423
mock.ANY,
1424-
'Cmake build failure',
1424+
'CMake build failure',
14251425
mock.ANY,
14261426
mock.ANY,
14271427
mock.ANY,

scripts/tests/twister_blackbox/test_outfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616
import tarfile
1717

18+
# pylint: disable=no-name-in-module
1819
from conftest import ZEPHYR_BASE, TEST_DATA, sample_filename_mock, testsuite_filename_mock
1920
from twisterlib.testplan import TestPlan
2021

@@ -149,7 +150,7 @@ def test_short_build_path(self, out_path):
149150
flag_pattern = r'(?:\S+(?: \\)?)+- '
150151
cmake_path = shutil.which('cmake')
151152
if not cmake_path:
152-
assert False, 'Cmake not found.'
153+
assert False, 'CMake not found.'
153154

154155
cmake_call_section = r'^Calling cmake: ' + re.escape(cmake_path)
155156
calling_line = re.sub(cmake_call_section, '', calling_line)

scripts/west_commands/spdx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def do_run(self, args, unknown_args):
6464
self.do_run_spdx(args)
6565

6666
def do_run_init(self, args):
67-
self.inf("initializing Cmake file-based API prior to build")
67+
self.inf("initializing CMake file-based API prior to build")
6868

6969
if not args.build_dir:
7070
self.die("Build directory not specified; call `west spdx --init --build-dir=BUILD_DIR`")
@@ -74,7 +74,7 @@ def do_run_init(self, args):
7474
if query_ready:
7575
self.inf("initialized; run `west build` then run `west spdx`")
7676
else:
77-
self.err("Couldn't create Cmake file-based API query directory")
77+
self.err("Couldn't create CMake file-based API query directory")
7878
self.err("You can manually create an empty file at $BUILDDIR/.cmake/api/v1/query/codemodel-v2")
7979

8080
def do_run_spdx(self, args):

0 commit comments

Comments
 (0)