aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-11-07 09:10:43 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-07 09:10:43 +0000
commit1653f5d6a12febed50f138076dcf8c191d9f24e6 (patch)
tree522d94038ac6eaa262a8b3ca2c6fa4704db12d79 /tools
parent1cfdb4bfbdd1ee02e6ab8bce691084d5319d5410 (diff)
parent485ac777fd9cded7c145917bfcbe701276f3c855 (diff)
Merge "load_gen: Supporting loading of load_gen via loader."
Diffstat (limited to 'tools')
-rw-r--r--tools/load_gen/dummyloadgen/__init__.py (renamed from tools/load_gen/dummy/__init__.py)0
-rw-r--r--tools/load_gen/dummyloadgen/dummyloadgen.py (renamed from tools/load_gen/dummy/dummy.py)0
-rw-r--r--tools/load_gen/stress/stress.py6
3 files changed, 4 insertions, 2 deletions
diff --git a/tools/load_gen/dummy/__init__.py b/tools/load_gen/dummyloadgen/__init__.py
index 834e9f63..834e9f63 100644
--- a/tools/load_gen/dummy/__init__.py
+++ b/tools/load_gen/dummyloadgen/__init__.py
diff --git a/tools/load_gen/dummy/dummy.py b/tools/load_gen/dummyloadgen/dummyloadgen.py
index 91bef4fa..91bef4fa 100644
--- a/tools/load_gen/dummy/dummy.py
+++ b/tools/load_gen/dummyloadgen/dummyloadgen.py
diff --git a/tools/load_gen/stress/stress.py b/tools/load_gen/stress/stress.py
index 4c69a170..0790d47c 100644
--- a/tools/load_gen/stress/stress.py
+++ b/tools/load_gen/stress/stress.py
@@ -52,8 +52,10 @@ class Stress(ILoadGenerator):
return
# check if load tool binary is available
- if not ('tool' in stress_config) or subprocess.call("which " + stress_config['tool'], shell=True) > 0:
- self._logger.error("stress tool binary '%s' is not available", stress_config['tool'])
+ if subprocess.call("which {}".format(self._process_args['name']),
+ shell=True) > 0:
+ self._logger.error("stress tool binary '%s' is not available",
+ self._process_args['name'])
return
# calculate requested load details and load split among different
al.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/bin/bash
#
# Test VHD image format creator detection and override
#
# Copyright (C) 2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

# creator
owner=jcody@redhat.com

seq=`basename $0`
echo "QA output created by $seq"

here=`pwd`
status=1    # failure is the default!

_cleanup()
{
    _cleanup_qemu
    _cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

# get standard environment, filters and checks
. ./common.rc
. ./common.filter
. ./common.qemu

_supported_fmt vpc
_supported_proto file
_supported_os Linux


qemu_comm_method="monitor"
silent=

echo
echo === Testing VPC Autodetect ===
echo
_use_sample_img virtualpc-dynamic.vhd.bz2

${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'

echo
echo === Testing VPC with current_size force ===
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map'

echo
echo === Testing VPC with chs force ===
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'

_cleanup_test_img

echo
echo === Testing Hyper-V Autodetect ===
echo
_use_sample_img hyperv2012r2-dynamic.vhd.bz2

${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'

echo
echo === Testing Hyper-V with current_size force ===
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map'

echo
echo === Testing Hyper-V with chs force ===
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'

_cleanup_test_img

echo
echo === Testing d2v Autodetect ===
echo
_use_sample_img d2v-zerofilled.vhd.bz2

${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'

echo
echo === Testing d2v with current_size force ===
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map'

echo
echo === Testing d2v with chs force ===
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'

_cleanup_test_img

echo
echo === Testing Image create, default ===
echo

TEST_IMG="${TEST_DIR}/vpc-create-test.vpc"

_make_test_img 4G

echo
echo === Read created image, default opts ====
echo

${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'

echo
echo === Read created image, force_size_calc=chs ====
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'

echo
echo === Read created image, force_size_calc=current_size ====
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map'

echo
echo === Testing Image create, force_size ===
echo

_make_test_img -o force_size 4G

echo
echo === Read created image, default opts ====
echo

${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map'

echo
echo === Read created image, force_size_calc=chs ====
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map'

echo
echo === Read created image, force_size_calc=current_size ====
echo

${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map'

echo "*** done"
rm -f $seq.full
status=0