From 0ce5447c2f671fdba2f43536b4aa225780e93d11 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Mon, 6 Dec 2021 16:40:07 +0000 Subject: integrations: Make sure build-matrix fully completes We can't continue on a partial build Signed-off-by: Kieran Bingham --- common.sh | 22 ++++++++++++++++++++++ integration-tests.sh | 2 ++ 2 files changed, 24 insertions(+) diff --git a/common.sh b/common.sh index 30a2a02..63cb36a 100755 --- a/common.sh +++ b/common.sh @@ -63,6 +63,28 @@ check_version() { fi } +# Check to see that the stamp file was successfully updated +validate_version() { + project="$1" + ID="$2" + + VERSION=$(libcamera_version "$project") + last_build=$(buildstamp_filename $ID) + export VERSION + export last_build + + ## Only rebuild on version change + touch "$last_build" + + PREV_VERSION=$(cat "$last_build") + + if [[ x"$PREV_VERSION" != x"$VERSION" ]] ; then + echo "$ID: Stamp file not set successfully" + exit 1 + fi + +} + failure_report() { echo "Subject: $0: $1 has failed" echo "" diff --git a/integration-tests.sh b/integration-tests.sh index 90cc59c..033d1cb 100755 --- a/integration-tests.sh +++ b/integration-tests.sh @@ -18,6 +18,8 @@ echo "Validate checkstyle on the branch" echo "Building the matrix..." ./10-build-matrix.sh +validate_version $(srcdir libcamera) build-matrix +pass_fail $? "Completed the matrix" echo "Building for unit tests..." ./50-build-unit-tests.sh -- cgit v1.2.1