summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/03_traffic.conf2
-rw-r--r--conf/04_vnf.conf2
-rwxr-xr-xdocs/userguide/testusage.rst3
-rw-r--r--tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py3
-rw-r--r--tools/pkt_gen/testcenter/testcenter-rfc2544-throughput.py3
-rwxr-xr-xvsperf13
6 files changed, 17 insertions, 9 deletions
diff --git a/conf/03_traffic.conf b/conf/03_traffic.conf
index 04266923..98bce2c5 100644
--- a/conf/03_traffic.conf
+++ b/conf/03_traffic.conf
@@ -109,7 +109,7 @@ TRAFFICGEN_STC_WEST_PORT_NUM = ""
TRAFFICGEN_STC_TEST_SESSION_NAME = "RFC2544 Tput"
# The directory to copy results to
-TRAFFICGEN_STC_RESULTS_DIR = "./Results"
+TRAFFICGEN_STC_RESULTS_DIR = os.path.join(ROOT_DIR, "Results")
# The prefix for the CSV results file
TRAFFICGEN_STC_CSV_RESULTS_FILE_PREFIX = "RFC2544_tput"
diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf
index e0c72b10..e3a4824b 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -15,7 +15,7 @@
# ############################
# VNF configuration
# ############################
-VNF_DIR = 'vnfs/'
+VNF_DIR = os.path.join(ROOT_DIR, 'vnfs/')
VNF = 'QemuDpdkVhostUser'
VNF_AFFINITIZATION_ON = True
diff --git a/docs/userguide/testusage.rst b/docs/userguide/testusage.rst
index 9648569f..788f84a2 100755
--- a/docs/userguide/testusage.rst
+++ b/docs/userguide/testusage.rst
@@ -147,6 +147,9 @@ IP addresses. l2fwd can be found in <vswitchperf_dir>/src/l2fwd
Executing tests
^^^^^^^^^^^^^^^
+All examples inside these docs assume, that user is inside the VSPERF
+directory. VSPERF can be executed from any directory.
+
Before running any tests make sure you have root permissions by adding
the following line to /etc/sudoers:
diff --git a/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py b/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py
index 91f7e27f..538d8a8a 100644
--- a/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py
+++ b/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py
@@ -22,6 +22,7 @@ TestCenter REST APIs. This test supports Python 3.4
import argparse
import logging
import os
+from conf import settings
logger = logging.getLogger(__name__)
@@ -141,7 +142,7 @@ def main():
dest="test_user_name")
optional_named.add_argument("--results_dir",
required=False,
- default="./Results",
+ default=settings.getValue("TRAFFICGEN_STC_RESULTS_DIR"),
help="The directory to copy results to",
dest="results_dir")
optional_named.add_argument("--csv_results_file_prefix",
diff --git a/tools/pkt_gen/testcenter/testcenter-rfc2544-throughput.py b/tools/pkt_gen/testcenter/testcenter-rfc2544-throughput.py
index becf7877..239fd109 100644
--- a/tools/pkt_gen/testcenter/testcenter-rfc2544-throughput.py
+++ b/tools/pkt_gen/testcenter/testcenter-rfc2544-throughput.py
@@ -22,6 +22,7 @@ TestCenter command sequencer. This test supports Python 2.7.
from __future__ import print_function
import argparse
import os
+from conf import settings
def create_dir(path):
@@ -129,7 +130,7 @@ def main():
dest="test_session_name")
optionalnamed.add_argument("--results_dir",
required=False,
- default="./Results",
+ default=settings.getValue("TRAFFICGEN_STC_RESULTS_DIR"),
help="The directory to copy results to",
dest="results_dir")
optionalnamed.add_argument("--csv_results_file_prefix",
diff --git a/vsperf b/vsperf
index a12560da..5bfa2abe 100755
--- a/vsperf
+++ b/vsperf
@@ -54,12 +54,15 @@ VERBOSITY_LEVELS = {
'critical': logging.CRITICAL
}
-_TEMPLATE_RST = {'head' : 'tools/report/report_head.rst',
- 'foot' : 'tools/report/report_foot.rst',
+_CURR_DIR = os.path.dirname(os.path.realpath(__file__))
+
+_TEMPLATE_RST = {'head' : os.path.join(_CURR_DIR, 'tools/report/report_head.rst'),
+ 'foot' : os.path.join(_CURR_DIR, 'tools/report/report_foot.rst'),
'final' : 'test_report.rst',
- 'tmp' : 'tools/report/report_tmp_caption.rst'
+ 'tmp' : os.path.join(_CURR_DIR, 'tools/report/report_tmp_caption.rst')
}
+
_LOGGER = logging.getLogger()
def parse_arguments():
@@ -482,11 +485,11 @@ def main():
# configure settings
- settings.load_from_dir('conf')
+ settings.load_from_dir(os.path.join(_CURR_DIR, 'conf'))
# Load non performance/integration tests
if args['integration']:
- settings.load_from_dir('conf/integration')
+ settings.load_from_dir(os.path.join(_CURR_DIR, 'conf/integration'))
# load command line parameters first in case there are settings files
# to be used