aboutsummaryrefslogtreecommitdiffstats
path: root/patches/vswitchperf/0001-ci-build-vsperf-make-qemu-system-name-arch-indep.patch
blob: 3d3785f1593c38608607fdfabc1b59cdf3d43e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Tue, 28 Jun 2016 21:27:02 +0200
Subject: [PATCH] ci/build-vsperf: make qemu-system name arch-indep.

Instead of hardcoding x86_64 into qemu-system name, use `uname -m`.

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 ci/build-vsperf.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ci/build-vsperf.sh b/ci/build-vsperf.sh
index a02de00..fa0d46a 100755
--- a/ci/build-vsperf.sh
+++ b/ci/build-vsperf.sh
@@ -87,14 +87,15 @@ TEST_REPORT_LOG_DIR="${HOME}/opnfv/$PROJECT/results/$BRANCH"
 # parameters:
 #   none
 function terminate_vsperf() {
+    local qemu_system_name="qemu-system-$(uname -m)"
     sudo pkill stress &> /dev/null
     sudo pkill python3 &> /dev/null
-    sudo killall -9 qemu-system-x86_64 &> /dev/null
+    sudo killall -9 "${qemu_system_name}" &> /dev/null

     # sometimes qemu resists to terminate, so wait a bit and kill it again
-    if pgrep qemu-system-x86_64 &> /dev/null ; then
+    if pgrep "${qemu_system_name}" &> /dev/null ; then
         sleep 5
-        sudo killall -9 qemu-system-x86_64 &> /dev/null
+        sudo killall -9 "${qemu_system_name}" &> /dev/null
         sleep 5
     fi