2023-10-30 19:52:44 +00:00
|
|
|
devices:
|
|
|
|
eth0:
|
|
|
|
name: eth0
|
|
|
|
network: lxdbr0
|
|
|
|
type: nic
|
|
|
|
root:
|
|
|
|
path: /
|
|
|
|
pool: virtual
|
|
|
|
type: disk
|
|
|
|
config:
|
|
|
|
user.user-data: |
|
|
|
|
#cloud-config
|
|
|
|
packages:
|
|
|
|
- python3-pip
|
|
|
|
- snapd
|
|
|
|
write_files:
|
|
|
|
- path: /root/setup.sh
|
|
|
|
permissions: '0755'
|
|
|
|
owner: root:root
|
|
|
|
content: |
|
|
|
|
#!bin/bash
|
|
|
|
sudo apt -y purge sosreport
|
|
|
|
sudo apt update --allow-releaseinfo-change
|
|
|
|
|
|
|
|
codename=$(grep UBUNTU_CODENAME /etc/os-release | awk -F= '{print $2}')
|
|
|
|
pip_extra=""
|
|
|
|
|
2024-02-20 12:39:50 +00:00
|
|
|
case "${codename}" in
|
|
|
|
"mantic"|"noble")
|
|
|
|
pip_extra="--break-system-packages"
|
|
|
|
;;
|
|
|
|
esac
|
2023-10-30 19:52:44 +00:00
|
|
|
|
|
|
|
pip3 install avocado-framework==94.0 ${pip_extra}
|
|
|
|
- path: /root/run_avocado.sh
|
|
|
|
permissions: '0755'
|
|
|
|
owner: root:root
|
|
|
|
content: |
|
|
|
|
#!bin/bash
|
|
|
|
|
|
|
|
mkdir -p /root/sos
|
|
|
|
cd /root/sos
|
|
|
|
tar xfz ../sos.tgz
|
|
|
|
|
|
|
|
mkdir -p /etc/sos
|
|
|
|
cp sos.conf /etc/sos/sos.conf
|
|
|
|
|
|
|
|
echo "Running Unit Tests ..."
|
|
|
|
PYTHONPATH=. avocado run tests/unittests/
|
|
|
|
|
|
|
|
echo "Running Stage One Tests ..."
|
|
|
|
PYTHONPATH=tests/ avocado run -p TESTLOCAL=true --test-runner=runner -t stageone tests/{cleaner,collect,report,vendor}_tests
|
|
|
|
|
|
|
|
runcmd:
|
|
|
|
- [ /root/setup.sh ]
|