Skip to content

Commit

Permalink
Verbose: Print CMake Config Errors
Browse files Browse the repository at this point in the history
Print CMake config errors in verbose mode for CI.

Fix some spelling.
  • Loading branch information
ax3l committed Sep 16, 2022
1 parent 5654ae9 commit 712eee8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ def apply_args(self):
# CMake utilities #
#######################################################
def cmake_config( self, name, path, configOpts="", install = 0, env = None):
"Generate Cmake configuration"
"Generate CMake configuration"

self.log.outdent()
self.log.skip()
Expand Down Expand Up @@ -1163,20 +1163,26 @@ def cmake_config( self, name, path, configOpts="", install = 0, env = None):

# Check exit condition
if not rc == 0:
errstr = "\n \nERROR! Cmake configuration failed for " + name + " \n"
errstr = "\n \nERROR! CMake configuration failed for " + name + " \n"
errstr += "Check " + coutfile + " for more information."
self.log.fail(errstr)

if self.verbose > 0:
print(f"\nContent of {coutfile}:")
with open(f"{coutfile}") as f:
print(f.read())

sys.exit(errstr)

return builddir, installdir


def cmake_clean( self, name, path ):
"Clean Cmake build and install directories"
"Clean CMake build and install directories"

self.log.outdent()
self.log.skip()
self.log.bold("cleaning " + name + " Cmake directories...")
self.log.bold("cleaning " + name + " CMake directories...")
self.log.indent()

# Setup dir names
Expand All @@ -1193,7 +1199,7 @@ def cmake_clean( self, name, path ):
return

def cmake_build( self, name, target, path, opts = '', env = None, outfile = None ):
"Build target for a repo configured via cmake"
"Build target for a repo configured via CMake"

self.log.outdent()
self.log.skip()
Expand Down

0 comments on commit 712eee8

Please sign in to comment.