From 1c5dd63db742bff40dfa7d030bbd4ffcf58cc355 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 28 Jun 2018 08:53:06 +0100 Subject: LAVA-1350 start testing buster Change-Id: If74439e697813754e59993337bb963396f89abac --- functional/dispatcher-unit-tests-buster.yaml | 18 +++++++++++ functional/server-unit-tests-buster.yaml | 20 ++++++++++++ lxc-dispatcher-buster.yaml | 47 ++++++++++++++++++++++++++++ lxc-server-buster.yaml | 47 ++++++++++++++++++++++++++++ testdefs/dispatcher-unittest-run-buster.sh | 18 +++++++++++ testdefs/dispatcher-unittest-setup-buster.sh | 31 ++++++++++++++++++ testdefs/server-unittest-run-buster.sh | 16 ++++++++++ testdefs/server-unittest-run.sh | 0 testdefs/server-unittest-setup-buster.sh | 23 ++++++++++++++ testdefs/server-unittest-setup.sh | 0 10 files changed, 220 insertions(+) create mode 100644 functional/dispatcher-unit-tests-buster.yaml create mode 100644 functional/server-unit-tests-buster.yaml create mode 100644 lxc-dispatcher-buster.yaml create mode 100644 lxc-server-buster.yaml create mode 100755 testdefs/dispatcher-unittest-run-buster.sh create mode 100755 testdefs/dispatcher-unittest-setup-buster.sh create mode 100755 testdefs/server-unittest-run-buster.sh mode change 100644 => 100755 testdefs/server-unittest-run.sh create mode 100755 testdefs/server-unittest-setup-buster.sh mode change 100644 => 100755 testdefs/server-unittest-setup.sh diff --git a/functional/dispatcher-unit-tests-buster.yaml b/functional/dispatcher-unit-tests-buster.yaml new file mode 100644 index 0000000..ebecbf6 --- /dev/null +++ b/functional/dispatcher-unit-tests-buster.yaml @@ -0,0 +1,18 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: lava-dispatcher-unit-tests-buster + description: "LAVA dispatcher unit tests on Debian buster" + "version": "1.1" + maintainer: + - neil.williams@linaro.org + os: + - ubuntu + - debian + scope: + - functional + devices: + - lxc + +run: + steps: + - sh -ex ./testdefs/dispatcher-unittest-run-buster.sh diff --git a/functional/server-unit-tests-buster.yaml b/functional/server-unit-tests-buster.yaml new file mode 100644 index 0000000..37836fa --- /dev/null +++ b/functional/server-unit-tests-buster.yaml @@ -0,0 +1,20 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: lava-server-unit-tests-buster + description: "LAVA server branch unit tests on Debian buster" + "version": "1.0" + maintainer: + - neil.williams@linaro.org + os: + - debian + scope: + - functional + +# The dependencies need a KVM of at least 2Gb in size. + +# These tests need at least 512M of RAM in the KVM +# Check the mem_cpu option in the kvm.conf device_type. + +run: + steps: + - sh -ex ./testdefs/server-unittest-run-buster.sh diff --git a/lxc-dispatcher-buster.yaml b/lxc-dispatcher-buster.yaml new file mode 100644 index 0000000..a2443a5 --- /dev/null +++ b/lxc-dispatcher-buster.yaml @@ -0,0 +1,47 @@ +device_type: lxc +job_name: lava-dispatcher unit tests on Buster +timeouts: + job: + hours: 1 + action: + minutes: 5 + connection: + minutes: 2 +priority: medium +visibility: public + +metadata: + source: https://git.linaro.org/lava-team/refactoring.git + path: lxc-dispatcher-buster.yaml + +protocols: + lava-lxc: + name: dispatcher-unittests + template: debian + distribution: debian + release: buster + mirror: http://ftp.uk.debian.org/debian/ + +actions: +- deploy: + timeout: + minutes: 20 + to: lxc + os: debian + +- boot: + method: lxc + timeout: + minutes: 2 + prompts: + - 'root@(.*):/#' + +- test: + name: dispatcher-pipeline-unittests + timeout: + minutes: 45 + definitions: + - repository: http://git.linaro.org/lava-team/refactoring.git + from: git + path: functional/dispatcher-unit-tests-buster.yaml + name: dispatcher-unittests-buster diff --git a/lxc-server-buster.yaml b/lxc-server-buster.yaml new file mode 100644 index 0000000..9b0cd55 --- /dev/null +++ b/lxc-server-buster.yaml @@ -0,0 +1,47 @@ +device_type: lxc +job_name: lava server unit tests in buster lxc +timeouts: + job: + hours: 1 + action: + minutes: 5 + connection: + minutes: 1 +priority: medium +visibility: public + +metadata: + source: https://git.linaro.org/lava-team/refactoring.git + path: lxc-server-buster.yaml + +protocols: + lava-lxc: + name: server-unittests + template: debian + distribution: debian + release: buster + mirror: http://ftp.uk.debian.org/debian/ + +actions: +- deploy: + timeout: + minutes: 20 + to: lxc + os: debian + +- boot: + method: lxc + timeout: + minutes: 3 + prompts: + - 'root@(.*):/#' + +- test: + name: lxc-server + timeout: + minutes: 45 + definitions: + - repository: http://git.linaro.org/lava-team/refactoring.git + from: git + path: functional/server-unit-tests-buster.yaml + name: server-unittests-buster diff --git a/testdefs/dispatcher-unittest-run-buster.sh b/testdefs/dispatcher-unittest-run-buster.sh new file mode 100755 index 0000000..995d68b --- /dev/null +++ b/testdefs/dispatcher-unittest-run-buster.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# dispatcher unit tests run + +. ./testdefs/lava-common + +sh -ex ./testdefs/dispatcher-unittest-setup-buster.sh + +command 'source_directory' "ls ./lava" +cd lava +testcase 'test_directory' "ls ../functional" +git --no-pager log -n1 +../functional/version-wrapper.py +testcase 'pep8' "pep8 --ignore E501 ." +${LAVA_SET} start unittests +testcase 'unittests' "../functional/dispatcher-unittests.sh" +${LAVA_SET} stop unittests +../functional/fixme-report.sh diff --git a/testdefs/dispatcher-unittest-setup-buster.sh b/testdefs/dispatcher-unittest-setup-buster.sh new file mode 100755 index 0000000..16b05bd --- /dev/null +++ b/testdefs/dispatcher-unittest-setup-buster.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# dispatcher unit test setup + +. ./testdefs/lava-common + +export DEBIAN_FRONTEND=noninteractive +unset LANG +unset LANGUAGE +command 'update-apt' "apt-get update -q" +command 'install-base' "apt-get -q -y install -o Dpkg::Options::=--force-confold git bc pep8 telnet python3-testscenarios u-boot-tools nfs-kernel-server tftpd-hpa libguestfs-tools rpcbind lxc python3-pyudev python3-jinja2 python3-voluptuous" +command 'install-qemu' "apt-get -q -y install --no-install-recommends qemu-system-x86" +# fix up the hosts file before installing apache +echo 127.0.0.1 localhost `hostname` >> /etc/hosts +echo "nameserver 8.8.8.8" >> /etc/resolv.conf +command 'apache' "apt-get -q -y install apache2" +command "get-staging-key" 'wget http://images.validation.linaro.org/staging-repo/staging-repo.key.asc' +apt-key add staging-repo.key.asc +echo "deb http://mirror.bytemark.co.uk/debian stretch-backports main" > /etc/apt/sources.list.d/lava-backports.list +echo "deb http://images.validation.linaro.org/staging-repo stretch-backports main" > /etc/apt/sources.list.d/lava-staging.list +command 'update-apt-with-new-key' "apt-get update -q" +command 'install-dispatcher' "apt-get -q -y install -o Dpkg::Options::=--force-confnew lava-dispatcher" +command 'clone-lava' "git clone -q git://git.linaro.org/lava/lava.git" +cd lava +# allow rpcinfo to find a useful service +mkdir -p /var/lib/lava/dispatcher/tmp +cp etc/lava-dispatcher-nfs.exports /etc/exports.d/ +exportfs -fa +testcase 'restart' "service nfs-kernel-server restart" +testcase 'nfs' "service nfs-kernel-server status" +testcase 'rpcinfo' "rpcinfo -u 127.0.0.1 nfs 3" diff --git a/testdefs/server-unittest-run-buster.sh b/testdefs/server-unittest-run-buster.sh new file mode 100755 index 0000000..ff91fd7 --- /dev/null +++ b/testdefs/server-unittest-run-buster.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# dispatcher unit tests run + +. ./testdefs/lava-common + +sh -ex ./testdefs/server-unittest-setup-buster.sh + +command 'source_directory' "ls ./lava" +cd lava +testcase 'test_directory' "ls ../functional" +testcase "commitlog" 'git --no-pager log -n1' +../functional/version-wrapper.py +${LAVA_SET} start unittests +testcase 'unittests' "../functional/server-unittests.sh" +${LAVA_SET} stop unittests diff --git a/testdefs/server-unittest-run.sh b/testdefs/server-unittest-run.sh old mode 100644 new mode 100755 diff --git a/testdefs/server-unittest-setup-buster.sh b/testdefs/server-unittest-setup-buster.sh new file mode 100755 index 0000000..356c765 --- /dev/null +++ b/testdefs/server-unittest-setup-buster.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# dispatcher unit test setup + +. ./testdefs/lava-common + +unset LANG +unset LANGUAGE +command 'update-apt' "apt-get update -q" +export DEBIAN_FRONTEND=noninteractive +command 'install-base' "apt-get -q -y install -o Dpkg::Options::=--force-confold git wget gnupg pep8 postgresql python3-django python3-django-tables2 python3-django-restricted-resource python3-django-testscenarios lava-coordinator locales lxc" +command 'install-qemu' "apt-get -q -y install --no-install-recommends qemu-system-x86" +command 'apt_upgrade' "apt-get -q -y upgrade" +command 'apache' "apt -q -y install apache2" +command 'install-devscripts' "apt-get -q -y --no-install-recommends install devscripts" +command "get-staging-key" 'wget http://images.validation.linaro.org/staging-repo/staging-repo.key.asc' +apt-key add staging-repo.key.asc +echo "deb http://mirror.bytemark.co.uk/debian stretch-backports main" > /etc/apt/sources.list.d/lava-backports.list +echo "deb http://images.validation.linaro.org/staging-repo stretch-backports main" > /etc/apt/sources.list.d/lava-staging.list +command 'update-apt-with-new-key' "apt-get update -q" +command 'install-server' "apt-get -q -y install -o Dpkg::Options::=--force-confnew lava-server" +apt-get clean +command 'clone-lava' "git clone -q git://git.linaro.org/lava/lava.git" diff --git a/testdefs/server-unittest-setup.sh b/testdefs/server-unittest-setup.sh old mode 100644 new mode 100755 -- cgit v1.2.3