Skip to content

Commit

Permalink
Merge pull request #1470 from Nordix/e2e-serial-log-checking/max
Browse files Browse the repository at this point in the history
馃尡 e2e: Enhanced Serial Log Checking Functionality
  • Loading branch information
metal3-io-bot committed Dec 11, 2023
2 parents 63abe2d + 7062d72 commit b98fe2f
Showing 1 changed file with 11 additions and 2 deletions.
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 @@ -153,6 +157,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

0 comments on commit b98fe2f

Please sign in to comment.