summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun_tests.sh39
-rw-r--r--setup.py2
-rwxr-xr-x[-rw-r--r--]yardstick/benchmark/runners/arithmetic.py5
-rw-r--r--yardstick/benchmark/runners/sequence.py2
-rwxr-xr-xyardstick/main.py6
5 files changed, 37 insertions, 17 deletions
diff --git a/run_tests.sh b/run_tests.sh
index b2bf807c1..c8d8e7d1a 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -11,29 +11,48 @@
# Run yardstick's test suite(s)
+getopts ":f" FILE_OPTION
+
run_flake8() {
- echo -n "Running flake8 ... "
- logfile=pep8.log
- flake8 yardstick > $logfile
+ echo "Running flake8 ... "
+ logfile=test_results.log
+ if [ $FILE_OPTION == "f" ]; then
+ flake8 yardstick > $logfile
+ else
+ flake8 yardstick
+ fi
+
if [ $? -ne 0 ]; then
- echo "FAILED, result in $logfile"
+ echo "FAILED"
+ if [ $FILE_OPTION == "f" ]; then
+ echo "Results in $logfile"
+ fi
exit 1
else
- echo "OK, result in $logfile"
+ echo "OK"
fi
}
run_tests() {
- echo -n "Running unittest ... "
- python -m unittest discover -s tests/unit
+ echo "Running unittest ... "
+ if [ $FILE_OPTION == "f" ]; then
+ python -m unittest discover -v -s tests/unit > $logfile 2>&1
+ else
+ python -m unittest discover -v -s tests/unit
+ fi
+
if [ $? -ne 0 ]; then
- echo "FAILED, result in $logfile"
+ if [ $FILE_OPTION == "f" ]; then
+ echo "FAILED, results in $logfile"
+ fi
exit 1
else
- echo "OK, result in $logfile"
+ if [ $FILE_OPTION == "f" ]; then
+ echo "OK, results in $logfile"
+ fi
fi
}
run_flake8
-#run_tests
+run_tests
diff --git a/setup.py b/setup.py
index 48390a3b4..a346f5765 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ setup(
install_requires=["backport_ipaddress", # remove with python3
"flake8",
"PyYAML>=3.10",
- "pbr!=0.7,<1.0,>=0.6",
+ "pbr<2.0,>=1.3",
"python-glanceclient>=0.12.0",
"python-heatclient>=0.2.12",
"python-keystoneclient>=0.11.1",
diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py
index 9efafffec..bae40eb75 100644..100755
--- a/yardstick/benchmark/runners/arithmetic.py
+++ b/yardstick/benchmark/runners/arithmetic.py
@@ -48,8 +48,9 @@ def _worker_process(queue, cls, method_name, context, scenario_args):
sla_action = None
if "sla" in scenario_args:
sla_action = scenario_args["sla"].get("action", "assert")
+ margin = 1 if step > 0 else -1
- for value in range(start, stop+step, step):
+ for value in range(start, stop+margin, step):
options[arg_name] = value
@@ -81,7 +82,7 @@ def _worker_process(queue, cls, method_name, context, scenario_args):
'errors': errors
}
- queue.put({'context': record_context, 'sargs:': scenario_args,
+ queue.put({'context': record_context, 'sargs': scenario_args,
'benchmark': benchmark_output})
LOG.debug("runner=%(runner)s seq=%(sequence)s END" %
diff --git a/yardstick/benchmark/runners/sequence.py b/yardstick/benchmark/runners/sequence.py
index 52bb69abf..25b65b0b8 100644
--- a/yardstick/benchmark/runners/sequence.py
+++ b/yardstick/benchmark/runners/sequence.py
@@ -82,7 +82,7 @@ def _worker_process(queue, cls, method_name, context, scenario_args):
'errors': errors
}
- queue.put({'context': record_context, 'sargs:': scenario_args,
+ queue.put({'context': record_context, 'sargs': scenario_args,
'benchmark': benchmark_output})
LOG.debug("runner=%(runner)s seq=%(sequence)s END" %
diff --git a/yardstick/main.py b/yardstick/main.py
index c16a42e91..418e3daca 100755
--- a/yardstick/main.py
+++ b/yardstick/main.py
@@ -12,15 +12,15 @@
""" yardstick - command line tool for managing benchmarks
Example invocation:
- $ yardstick samples/ping-task.yaml
+ $ yardstick task start samples/ping.yaml
- Servers are the same as VMs (Nova call them servers in the API)
+ Servers are the same as VMs (Nova calls them servers in the API)
Many tests use a client/server architecture. A test client is configured
to use a specific test server e.g. using an IP address. This is true for
example iperf. In some cases the test server is included in the kernel
(ping, pktgen) and no additional software is needed on the server. In other
- cases (iperf) a server process needs to be installed and started
+ cases (iperf) a server process needs to be installed and started.
One server is required to host the test client program (such as ping or
iperf). In the task file this server is called host.