mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00

- Tests defined in utils/test are now described by a task.yaml in the same
directory and can run concurrently across many machines.
- Tests for utils/ are now executed on openSUSE Tumbleweed since ttk themes is
no longer a hard dependency in master.
- Tests no longer run on openSUSE Leap 15.6 due to the age of default
Python (3.6) and gcc/g++. The tight integration with SWIG which does
not seem to support other Python versions very well. Perl hard-codes
old GCC for extension modules. The upcoming openSUSE Leap 16 should be
a viable target. In the meantime we can still test everything through
rolling-release Tumbleweed.
- Formatting of YAML files is now more uniform, at four spaces per tab.
- The run-spread.sh script is now in the root of the tree. The script allows
running all spread tests sequentially on one system, while collecting logs
and artifacts for convenient analysis after the fact.
- All systems are adjusted to run _four_ workers in parallel with _two_ virtual
cores each and equipped with 1.5GB of virtual memory. This aims to best
utilize the capacity of a typical CI worker with two to four cores and about
8GB of available memory.
- Failing tests are marked as such, so that as a whole the entire spread suite
can pass and be useful at catching regressions.
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
(cherry picked from commit 1df91e2c8c
)
Signed-off-by: John Johansen <john.johansen@canonical.com>
29 lines
1,004 B
Bash
Executable file
29 lines
1,004 B
Bash
Executable file
#!/bin/sh
|
|
# Run integration tests with spread sequentially on all the systems, using
|
|
# multiple workers per system. This mode is suitable to run on a single
|
|
# quad-core CPU with 8GB of RAM and no desktop session.
|
|
set -xeu
|
|
|
|
if test -z "$(command -v spread)"; then
|
|
echo "You need to install spread from https://github.com/snapcore/spread with the Go compiler and the command: go install github.com/snapcore/spread/cmd/spread@latest" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if test -z "$(command -v image-garden)"; then
|
|
echo "You need to install image-garden from https://gitlab.com/zygoon/image-garden: make install prefix=/usr/local" >&2
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf spread-logs spread-artifacts
|
|
mkdir -p spread-logs
|
|
for system in \
|
|
opensuse-cloud-tumbleweed \
|
|
debian-cloud-12 \
|
|
debian-cloud-13 \
|
|
ubuntu-cloud-22.04 \
|
|
ubuntu-cloud-24.04 \
|
|
ubuntu-cloud-24.10; do
|
|
if ! spread -artifacts ./spread-artifacts -v "$system" | tee spread-logs/"$system".log; then
|
|
echo "Spread exited with code $?" >spread-logs/"$system".failed
|
|
fi
|
|
done
|