Skip to content

Commit

Permalink
no test is not an error
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Oct 10, 2023
1 parent ce775ed commit 4f539fb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions builder/actions/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,13 @@ def run(self, env):
return

ctest = toolchain.ctest_binary()
try:
sh.exec(*toolchain.shell_env, ctest,
"--output-on-failure", working_dir=project_build_dir, check=True)
except:
# Skip generate the coverage report on error
return
# If CTest found no test, generate coverage will hang
sh.exec(*toolchain.shell_env, ctest,
"-T", "coverage", working_dir=project_build_dir, check=True)
"--output-on-failure", working_dir=project_build_dir, check=True)
if env.args.coverage:
# Only generate coverage when required to
# If CTest found no test, generate coverage will hang
sh.exec(*toolchain.shell_env, ctest,
"-T", "coverage", working_dir=project_build_dir, check=True)

def __str__(self):
return 'ctest {} @ {}'.format(self.project.name, self.project.path)

0 comments on commit 4f539fb

Please sign in to comment.