Collect lshw output in json format

Add lshw json output to test logs

Change-Id: Id0689f7111719d166a52f45ac911923646439297
This commit is contained in:
Riccardo Pittau 2023-08-03 14:15:50 +02:00
parent c64f6ba5c1
commit 40b277b7bd
2 changed files with 8 additions and 0 deletions

View File

@ -111,6 +111,7 @@ sudo cp -a "/var/log/ironic-inspector/ramdisk" ${LOG_LOCATION}/inspection-ramdis
# general info
sudo ps auxf &> ${LOG_LOCATION}/ps.txt
sudo lscpu > ${LOG_LOCATION}/lscpu.txt
sudo lshw -json > ${LOG_LOCATION}/lshw_json.txt
# vbmc info
sudo ${VENV}/bin/vbmc list &> ${LOG_LOCATION}/vbmc.txt
# virsh info

View File

@ -80,6 +80,13 @@ if [ ${DOWNLOAD_CUSTOM_DEPLOY_IMAGE} = "true" ] && [ ! -f "$HOME/.ssh/id_ecdsa.p
ssh-keygen -t ECDSA -f "$HOME/.ssh/id_ecdsa" -N ""
fi
# Install lshw to collect info at the end of the test
if which rpm &> /dev/null; then
sudo dnf install -y lshw
elif which apt &> /dev/null; then
sudo apt install -y lshw
fi
# Note(cinerama): activate is not compatible with "set -u";
# disable it just for this line.
set +u