diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-08-26 16:24:01 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-11-20 13:19:55 +0000 |
commit | 0359b73306bebfd021546350575d7ec60ab16d26 (patch) | |
tree | 8b3fa60965bcd4923d271273cab1b4fd5981b4da | |
parent | 2227a63d412b695aed51813e91d594a392bc91e9 (diff) |
Pre-Integration test framework
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-x | integration-tests.sh | 20 | ||||
-rwxr-xr-x | release.sh | 20 | ||||
-rwxr-xr-x | set-libcamera-branch.sh | 34 |
3 files changed, 74 insertions, 0 deletions
diff --git a/integration-tests.sh b/integration-tests.sh new file mode 100755 index 0000000..e2a4031 --- /dev/null +++ b/integration-tests.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +## $1 remote +## $2 branch + +echo "Using Remote $1 and branch $2" +./set-libcamera-branch.sh $1 $2 + + +echo "Building the matrix..." +./10-build-matrix.sh + +echo "Building for unit tests..." +./50-build-unit-tests.sh + +echo "Running unit tests..." +./51-run-unit-tests.sh + +echo "Validating installation/packaging..." +./52-package.sh diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..69e27cb --- /dev/null +++ b/release.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later + +source ./common.sh + +LIBCAMERA=${1:-$(srcdir libcamera)} + +cd $LIBCAMERA + +./utils/checkstyle.py origin/master... +pass_fail $? "Checkstyle fails..." + +echo "libcamera at version : " $(libcamera_version "$LIBCAMERA") + +git -C $LIBCAMERA branch -D master +git -C $LIBCAMERA checkout -b master + +git -C $LIBCAMERA push upstream master +pass_fail $? "Push to master..." diff --git a/set-libcamera-branch.sh b/set-libcamera-branch.sh new file mode 100755 index 0000000..b763cda --- /dev/null +++ b/set-libcamera-branch.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later + +source ./common.sh + +REPO=${1} +BRANCH=${2} + +ORIGIN=https://git.libcamera.org/libcamera/libcamera.git +LIBCAMERA=${3:-$(srcdir libcamera)} + +if [ ! -d $LIBCAMERA ] ; +then + git clone $ORIGIN $LIBCAMERA +fi + +git -C $LIBCAMERA fetch origin +pass_fail $? "Update from origin" + +git -C $LIBCAMERA checkout -b integration_tests + +git -C $LIBCAMERA fetch $REPO $BRANCH +pass_fail $? "Fetch $BRANCH from $REPO" + +git -C $LIBCAMERA reset --hard FETCH_HEAD +pass_fail $? "Set tree to fetch branch" + +git -C $LIBCAMERA rebase origin/master +pass_fail $? "Rebase to master.." + +git -C $LIBCAMERA log --oneline HEAD...origin/master + +echo "libcamera at version : " $(libcamera_version "$LIBCAMERA") |