diff options
author | shravani <shravani.p@tcs.com> | 2017-01-05 18:36:26 +0530 |
---|---|---|
committer | Shravani Paladugula <shravani.p@tcs.com> | 2017-02-07 12:24:08 +0000 |
commit | 2046178d894438b492d93f30941076ee7964f6ab (patch) | |
tree | 062cd5a9ce3d01e2f5f3d86de46bd77b7098ea82 /ci/envs/utils.sh | |
parent | b79d79eb6385a92cdc8c29bf080810becc4602b7 (diff) |
This patch contains the scripts to install the Qemu rpm and make use of it for
lauching guest VM's
Change-Id: I74ce89e1e0d628b0be2d9165b8418a519b52064d
Co-Authored-By: Y Rajitha <y.rajitha@tcs.com>
Signed-off-by: Shravani <shravani.p@tcs.com>
Diffstat (limited to 'ci/envs/utils.sh')
-rwxr-xr-x | ci/envs/utils.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ci/envs/utils.sh b/ci/envs/utils.sh index 90c66bab3..89df273ac 100755 --- a/ci/envs/utils.sh +++ b/ci/envs/utils.sh @@ -27,3 +27,16 @@ function getHostIP { fi echo $HOST_IP } +#Get the Qemu version from RPM generated(example:qemu-2.6.0-1.x86_64.rpm) +function getQemuVersion { + rpm_dir="/root/workspace/rpm/" + if [ -d "$WORKSPACE" ];then + cd $WORKSPACE/build_output 2>/dev/null; qemuRPM=`ls qemu-[[:digit:]]* 2>/dev/null` + RPMVERSION=`echo ${qemuRPM}|awk -F '-' '{print $2}' | awk -F '-' '{print $NF}'` + elif [ -d "$rpm_dir" ];then + cd $rpm_dir 2>/dev/null; qemuRPM=`ls qemu-[[:digit:]]* 2>/dev/null` + RPMVERSION=`echo ${qemuRPM}|awk -F '-' '{print $2}' | awk -F '-' '{print $NF}'` + fi + echo ${RPMVERSION} +} + |