Browse Source

Add mender-image-tests as a submodule like in meta-mender.

This makes it a bit more explicit that it is part of the testing
files. It follows the same pattern as in meta-mender with pulling
automatically, and using `--no-pull` to disable it.

Changelog: None

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2.0.x
Kristian Amlie 5 years ago
parent
commit
cc89ed4428
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 1
      .gitignore
  2. 7
      .gitlab-ci.yml
  3. 5
      .gitmodules
  4. 11
      scripts/test/run-tests.sh
  5. 1
      tests/mender-image-tests

1
.gitignore

@ -2,7 +2,6 @@ deploy
input
work
rootfs_overlay_demo/*
tests
mender_local_config
*.xml
*.html

7
.gitlab-ci.yml

@ -7,6 +7,7 @@ variables:
MENDER_CLIENT_VERSION: master
RASPBIAN_URL: http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-09-30/2019-09-26-raspbian-buster-lite.zip
RASPBIAN_NAME: 2019-09-26-raspbian-buster-lite
MENDER_IMAGE_TESTS_REV: master
DEBIAN_FRONTEND: noninteractive
@ -62,9 +63,11 @@ test_acceptance:
- tar xzf deploy.tar.gz
# Extract converted Raspbian artifacts
- unxz deploy/raspberrypi-${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.sdimg.xz
# Set submodule to correct version
- ( cd tests/mender-image-tests && git submodule update --init --remote && git checkout origin/${MENDER_IMAGE_TESTS_REV} )
script:
- ./scripts/test/run-tests.sh --prebuilt-image raspberrypi ${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}
- ./scripts/test/run-tests.sh --all
- ./scripts/test/run-tests.sh --no-pull --prebuilt-image raspberrypi ${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}
- ./scripts/test/run-tests.sh --no-pull --all
artifacts:
expire_in: 2w
when: always

5
.gitmodules

@ -0,0 +1,5 @@
[submodule "tests/mender-image-tests"]
path = tests/mender-image-tests
url = https://github.com/mendersoftware/mender-image-tests
branch = master
ignore = all

11
scripts/test/run-tests.sh

@ -3,7 +3,7 @@
set -e
usage() {
echo "$0 <--all | --prebuilt-image DEVICE_TYPE IMAGE_NAME>"
echo "$0 [--no-pull] <--all | --prebuilt-image DEVICE_TYPE IMAGE_NAME>"
exit 1
}
@ -37,12 +37,11 @@ source $UTILS_PATH
# Some distros do not have /sbin in path for "normal users"
export PATH="${PATH}:/sbin"
if [ ! -d ${WORKSPACE}/mender-image-tests ]; then
git clone https://github.com/mendersoftware/mender-image-tests ${WORKSPACE}/mender-image-tests
if [ "$1" = "--no-pull" ]; then
shift
else
cd ${WORKSPACE}/mender-image-tests
git pull
cd -
echo "Automatically pulling submodules. Use --no-pull to disable"
git submodule update --init --remote
fi
mkdir -p ${WORKSPACE}

1
tests/mender-image-tests

@ -0,0 +1 @@
Subproject commit f786ad5d5e05f4e9e37667d58f12102ee9b7181c
Loading…
Cancel
Save