mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
tests: Add Bionic to integration test script
Download Bionic image and convert to raw (the QCOW version of the file doesn't currently work) for running the integration tests. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
09aced9ed1
commit
facc3b303a
@ -22,21 +22,38 @@ if [ ! -f "$OVMF" ]; then
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OS_IMAGE_NAME="clear-29810-cloud.img"
|
CLEAR_OS_IMAGE_NAME="clear-29810-cloud.img"
|
||||||
OS_IMAGE_URL="https://cloudhypervisorstorage.blob.core.windows.net/images/$OS_IMAGE_NAME.xz"
|
CLEAR_OS_IMAGE_URL="https://cloudhypervisorstorage.blob.core.windows.net/images/$CLEAR_OS_IMAGE_NAME.xz"
|
||||||
OS_IMAGE="$WORKLOADS_DIR/$OS_IMAGE_NAME"
|
CLEAR_OS_IMAGE="$WORKLOADS_DIR/$CLEAR_OS_IMAGE_NAME"
|
||||||
if [ ! -f "$OS_IMAGE" ]; then
|
if [ ! -f "$CLEAR_OS_IMAGE" ]; then
|
||||||
pushd $WORKLOADS_DIR
|
pushd $WORKLOADS_DIR
|
||||||
wget --quiet $OS_IMAGE_URL
|
wget --quiet $CLEAR_OS_IMAGE_URL
|
||||||
unxz $OS_IMAGE_NAME.xz
|
unxz $CLEAR_OS_IMAGE_NAME.xz
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OS_RAW_IMAGE_NAME="clear-29810-cloud-raw.img"
|
CLEAR_OS_RAW_IMAGE_NAME="clear-29810-cloud-raw.img"
|
||||||
OS_RAW_IMAGE="$WORKLOADS_DIR/$OS_RAW_IMAGE_NAME"
|
CLEAR_OS_RAW_IMAGE="$WORKLOADS_DIR/$CLEAR_OS_RAW_IMAGE_NAME"
|
||||||
if [ ! -f "$OS_RAW_IMAGE" ]; then
|
if [ ! -f "$CLEAR_OS_RAW_IMAGE" ]; then
|
||||||
pushd $WORKLOADS_DIR
|
pushd $WORKLOADS_DIR
|
||||||
qemu-img convert -p -f qcow2 -O raw $OS_IMAGE_NAME $OS_RAW_IMAGE_NAME
|
qemu-img convert -p -f qcow2 -O raw $CLEAR_OS_IMAGE_NAME $CLEAR_OS_RAW_IMAGE_NAME
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
BIONIC_OS_IMAGE_NAME="bionic-server-cloudimg-amd64.img"
|
||||||
|
BIONIC_OS_IMAGE_URL="https://cloud-images.ubuntu.com/bionic/current/$BIONIC_OS_IMAGE_NAME"
|
||||||
|
BIONIC_OS_IMAGE="$WORKLOADS_DIR/$BIONIC_OS_IMAGE_NAME"
|
||||||
|
if [ ! -f "$BIONIC_OS_IMAGE" ]; then
|
||||||
|
pushd $WORKLOADS_DIR
|
||||||
|
wget --quiet $BIONIC_OS_IMAGE_URL
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
BIONIC_OS_RAW_IMAGE_NAME="bionic-server-cloudimg-amd64-raw.img"
|
||||||
|
BIONIC_OS_RAW_IMAGE="$WORKLOADS_DIR/$BIONIC_OS_RAW_IMAGE_NAME"
|
||||||
|
if [ ! -f "$BIONIC_OS_RAW_IMAGE" ]; then
|
||||||
|
pushd $WORKLOADS_DIR
|
||||||
|
qemu-img convert -p -f qcow2 -O raw $BIONIC_OS_IMAGE_NAME $BIONIC_OS_RAW_IMAGE_NAME
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -81,7 +98,7 @@ fi
|
|||||||
VFIO_DIR="$WORKLOADS_DIR/vfio"
|
VFIO_DIR="$WORKLOADS_DIR/vfio"
|
||||||
if [ ! -d "$VFIO_DIR" ]; then
|
if [ ! -d "$VFIO_DIR" ]; then
|
||||||
mkdir -p $VFIO_DIR
|
mkdir -p $VFIO_DIR
|
||||||
cp $OS_IMAGE $VFIO_DIR
|
cp $CLEAR_OS_IMAGE $VFIO_DIR
|
||||||
cp $FW $VFIO_DIR
|
cp $FW $VFIO_DIR
|
||||||
cp $VMLINUX_IMAGE $VFIO_DIR
|
cp $VMLINUX_IMAGE $VFIO_DIR
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user