twister: Raise exception if cmake is not found in path
Otherwise the real failure is swallowed and a TypeError exception is raised instead. Signed-off-by: Steven Huang <stevenhuang1995@gmail.com>
This commit is contained in:
parent
c65cf1cd15
commit
1413c55fbc
1 changed files with 4 additions and 0 deletions
|
@ -2061,6 +2061,10 @@ class CMake():
|
|||
|
||||
logger.debug("Calling cmake with arguments: {}".format(cmake_args))
|
||||
cmake = shutil.which('cmake')
|
||||
if not cmake:
|
||||
msg = "Unable to find `cmake` in path"
|
||||
logger.error(msg)
|
||||
raise Exception(msg)
|
||||
cmd = [cmake] + cmake_args
|
||||
|
||||
kwargs = dict()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue