sos_testing/lxd_profile.yaml
2023-10-30 19:52:44 +00:00

54 lines
1.4 KiB
YAML

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=""
[[ "${codename}" == "mantic" ]] || [[ "${codename}" == "lunar" ]] && pip_extra="--break-system-packages"
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
#pip3 install -r requirements.txt --break-system-packages
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 ]