Skip to content

Commit

Permalink
fix 'exec' not displaying build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha authored and parttimenerd committed Dec 18, 2019
1 parent fbf38ed commit d22c6a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion temci/build/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ def log(self):
logging.error("Build error for {}".format(self.item.id))
logging.error("out: {!r}".format(self.error.out))
logging.error("err: {!r}".format(self.error.err))
logging.error("cmd: {!r}", self.item.build_cmd)
logging.error("cmd: {!r}".format(self.item.build_cmd))
4 changes: 4 additions & 0 deletions temci/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from temci.utils.typecheck import *

from temci.build.builder import BuildError
from temci.run.run_processor import RunProcessor
from temci.build.build_processor import BuildProcessor
import temci.run.run_driver as run_driver
Expand Down Expand Up @@ -197,6 +198,9 @@ def benchmark_and_exit(runs: t.List[dict] = None):
processor.benchmark()
if processor.recorded_error():
sys.exit(ErrorCode.PROGRAM_ERROR.value)
except BuildError as err:
err.log()
sys.exit(ErrorCode.PROGRAM_ERROR.value)
except KeyboardInterrupt:
logging.error("KeyboardInterrupt. Cleaned up everything.")
sys.exit(ErrorCode.TEMCI_ERROR.value)
Expand Down

0 comments on commit d22c6a8

Please sign in to comment.