Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 e2e: Enhanced Serial Log Checking Functionality #1470

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions hack/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ minikube image load quay.io/metal3-io/baremetal-operator:e2e
# Create libvirt domain
VM_NAME="bmo-e2e-0"
export BOOT_MAC_ADDRESS="00:60:2f:31:81:01"
SERIAL_LOG_PATH="/var/log/libvirt/qemu/${VM_NAME}-serial0.log"

virt-install \
--connect qemu:///system \
Expand All @@ -57,8 +58,11 @@ virt-install \
--vcpus=2 \
--disk size=20 \
--graphics=none \
--console pty \
--serial pty \
--console pty,target_type=serial \
--serial file,path="${SERIAL_LOG_PATH}" \
--xml "./devices/serial/@type=pty" \
--xml "./devices/serial/log/@file=${SERIAL_LOG_PATH}" \
--xml "./devices/serial/log/@append=on" \
--pxe \
--network network=baremetal-e2e,mac="${BOOT_MAC_ADDRESS}" \
--noautoconsole
Expand Down Expand Up @@ -129,6 +133,11 @@ set +e
make test-e2e
test_status="$?"

LOGS_DIR="${REPO_ROOT}/test/e2e/_artifacts/logs"
mkdir -p "${LOGS_DIR}/qemu"
sudo sh -c "cp -r /var/log/libvirt/qemu/* ${LOGS_DIR}/qemu/"
sudo chown -R "${USER}:${USER}" "${LOGS_DIR}/qemu"

# Collect all artifacts
tar --directory test/e2e/ -czf artifacts.tar.gz _artifacts

Expand Down