From 7e482679d256ffafe6f105c44d07cc2b84f23358 Mon Sep 17 00:00:00 2001 From: Asherah Connor Date: Thu, 16 May 2024 19:05:48 +0300 Subject: [PATCH] CxxsimTask: throw on non-zero rc. --- src/main/scala/ee/hrzn/chryse/tasks/CxxsimTask.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/scala/ee/hrzn/chryse/tasks/CxxsimTask.scala b/src/main/scala/ee/hrzn/chryse/tasks/CxxsimTask.scala index 8db3e9a..3b5c56b 100644 --- a/src/main/scala/ee/hrzn/chryse/tasks/CxxsimTask.scala +++ b/src/main/scala/ee/hrzn/chryse/tasks/CxxsimTask.scala @@ -3,6 +3,7 @@ package ee.hrzn.chryse.tasks import chisel3._ import circt.stage.ChiselStage import ee.hrzn.chryse.ChryseAppConfig +import ee.hrzn.chryse.ChryseAppStepFailureException import ee.hrzn.chryse.HasIO import ee.hrzn.chryse.platform.Platform import ee.hrzn.chryse.platform.cxxrtl.BlackBoxGenerator @@ -146,6 +147,9 @@ object CxxsimTask extends BaseTask { val rc = binCmd.! println(s"$name exited with return code $rc") + if (rc != 0) { + throw new ChryseAppStepFailureException("rc non-zero") + } } private def filesInDirWithExt(dir: String, ext: String): Iterator[String] =