Fix kelvin post-bazel flow
Make sure the target captrue the bazel result before copying the
result to out/
Bug: 296905741
Change-Id: I74b5f4eb7ce2c5b7cc50b51b4b80f7c9ab6cd989
diff --git a/platforms/nexus/kelvin.mk b/platforms/nexus/kelvin.mk
index ff47804..473111f 100644
--- a/platforms/nexus/kelvin.mk
+++ b/platforms/nexus/kelvin.mk
@@ -37,7 +37,7 @@
# Used as the simplest Kelvin SW that has all the syntax CantripOS expects
kelvin_hello_world: | $(KELVIN_SW_BAZEL_OUT_DIR)
cd "$(KELVIN_SW_SRC_DIR)" && \
- bazel build //examples/hello_world:all; \
+ bazel build //examples/hello_world:all && \
cd bazel-out ; find . -type f \( \
-wholename "*ST-*/*.elf" -o \
-wholename "*ST-*/*.bin" \) \
@@ -48,8 +48,8 @@
#
# Test Kelvin SW artifacts with kelvin ISS simulation
kelvin_sw_test: kelvin_sim | $(KELVIN_SW_TESTLOG_DIR)
- cd "$(KELVIN_SW_SRC_DIR)"; \
- bazel test --test_output=errors //... ; \
+ cd "$(KELVIN_SW_SRC_DIR)" && \
+ bazel test --test_output=errors //... && \
cp -rf bazel-testlogs/tests "$(KELVIN_SW_TESTLOG_DIR)"
## Clean Kelvin SW artifacts
@@ -81,8 +81,8 @@
## Tests for Kelvin HW
kelvin_hw_test: | $(KELVIN_HW_TESTLOG_DIR)
- cd "$(KELVIN_HW_SRC_DIR)"; \
- bazel test --test_output=errors //... ; \
+ cd "$(KELVIN_HW_SRC_DIR)" && \
+ bazel test --test_output=errors //... && \
cp -rf bazel-testlogs/tests "$(KELVIN_HW_TESTLOG_DIR)"
## Clean Kelvin HW artifacts
diff --git a/platforms/shodan/kelvin.mk b/platforms/shodan/kelvin.mk
index 6fc69f8..722be80 100644
--- a/platforms/shodan/kelvin.mk
+++ b/platforms/shodan/kelvin.mk
@@ -36,8 +36,8 @@
#
# Test Kelvin SW artifacts with kelvin ISS simulation
kelvin_sw_test: kelvin_sim | $(KELVIN_SW_TESTLOG_DIR)
- cd "$(KELVIN_SW_SRC_DIR)"; \
- bazel test --test_output=errors //... ; \
+ cd "$(KELVIN_SW_SRC_DIR)" && \
+ bazel test --test_output=errors //... && \
cp -rf bazel-testlogs/tests "$(KELVIN_SW_TESTLOG_DIR)"
## Clean Kelvin SW artifacts
@@ -69,8 +69,8 @@
## Tests for Kelvin HW
kelvin_hw_test: | $(KELVIN_HW_TESTLOG_DIR)
- cd "$(KELVIN_HW_SRC_DIR)"; \
- bazel test --test_output=errors //... ; \
+ cd "$(KELVIN_HW_SRC_DIR)" && \
+ bazel test --test_output=errors //... && \
cp -rf bazel-testlogs/tests "$(KELVIN_HW_TESTLOG_DIR)"
## Clean Kelvin HW artifacts