aboutsummaryrefslogtreecommitdiffstats
path: root/run_tests.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08NSB updateDeepak S1-2/+11
Refactored main NSB VNF classes accroding to class diagram https://wiki.opnfv.org/display/yardstick/NSB+class+diagram All the SampleVNFs have been separated and placed under the SampleVNF class. Added AutoConnectSSH to automatically create SSH conneciton on demand. Added VnfdHelper class to wrap the VNFD dictionary in prepartion for class-based modeling. Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup. Extracted Stats and other client config to ResourceHelper Had to replace dict_key_flatten with deepgetitem due to Python 2.7 Jinja2 infinite recursion. Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-31DRAFT: remove apexlakeRoss Brattain1-1/+0
apexlake is unmaintained, so remove it From some reason orchestrator/heat.py started failing so fixup those unittests Change-Id: Ie06508b5ab7c9dcf9fdfca83e173a188a894d564 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-07-31run_tests: don't write python bytecodeRoss Brattain1-0/+3
we usually disable .pyc generate during unittests Change-Id: I7d7af7c6d188f5a592d24aa90322edb217ffd8ba Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-08remove trex install from run_tests.sh.Ross Brattain1-23/+0
We have mocked out all the Trex imports, so we don't need to download the Trex library It doesn't really make sense to down external libraries each time we run unittests. Trex is a large stand-alone package and shouldn't really be used during unittests Importing Trex caused some odd pyzmq import errors on Python 3 File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master /trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18 /64bit/zmq/backend/cython/__init__.py", line 6, in <module> from . import (constants, error, message, context, ImportError: cannot import name 'constants' Change-Id: I2ed06c0f88061baeff9ec96534cc59cca81924cc Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-07fix unittests, mock trex_stl_lib, fix raw_input, divisionRoss Brattain1-2/+2
replace raw_input with six.moves.raw_input fix raw_input mock force float division in python 2 re-added trex download to try to workaround coverage failing try installing pyzmq=14.5.0 and see if that helps trex compatibility ====================================================================== ERROR: test__fill_traffic_profile (benchmark.scenarios.networking.test_vnf_generic.TestNetworkServiceTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py", line 399, in test__fill_traffic_profile self.context_cfg)) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/benchmark/scenarios/networking/vnf_generic.py", line 144, in _fill_traffic_profile return TrafficProfile.get(traffic_profile) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/network_services/traffic_profile/base.py", line 35, in get "yardstick.network_services.traffic_profile") File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/common/utils.py", line 86, in import_modules_from_package try_append_module(module_name, sys.modules) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/common/utils.py", line 70, in try_append_module modules[name] = importutils.import_module(name) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py3/lib/python3.5/site-packages/oslo_utils/importutils.py", line 73, in import_module __import__(import_str) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/network_services/traffic_profile/rfc2544.py", line 19, in <module> from yardstick.network_services.traffic_profile.traffic_profile \ File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/network_services/traffic_profile/traffic_profile.py", line 24, in <module> from stl.trex_stl_lib.trex_stl_client import STLStream File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py", line 7, in <module> from .trex_stl_jsonrpc_client import JsonRpcClient, BatchMessage File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py", line 3, in <module> import zmq File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/__init__.py", line 49, in <module> from zmq import backend File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 41, in <module> reraise(*exc_info) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/utils/sixcerpt.py", line 34, in reraise raise value File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 29, in <module> _ns = select_backend(first) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/select.py", line 27, in select_backend mod = __import__(name, fromlist=public_api) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/cython/__init__.py", line 6, in <module> from . import (constants, error, message, context, ImportError: cannot import name 'constants' ====================================================================== ERROR: network_services.vnf_generic.vnf.test_tg_trex (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: network_services.vnf_generic.vnf.test_tg_trex Traceback (most recent call last): File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py", line 24, in <module> from stl.trex_stl_lib.trex_stl_client import STLClient File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py", line 7, in <module> from .trex_stl_jsonrpc_client import JsonRpcClient, BatchMessage File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py", line 3, in <module> import zmq File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/__init__.py", line 49, in <module> from zmq import backend File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 41, in <module> reraise(*exc_info) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/utils/sixcerpt.py", line 34, in reraise raise value File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/__init__.py", line 29, in <module> _ns = select_backend(first) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/select.py", line 27, in select_backend mod = __import__(name, fromlist=public_api) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/trex/scripts/external_libs/pyzmq-14.5.0/python3/fedora18/64bit/zmq/backend/cython/__init__.py", line 6, in <module> from . import (constants, error, message, context, ImportError: cannot import name 'constants' Change-Id: I832bf8c912dea6d85131ee6603b408b3198cef2f Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-19Adding generic traffic profiles for trex traffic generatorDeepak S1-0/+26
This patch defines Generic traffic profiles - rfc2544, http etc JiRA: YARDSTICK-489 Change-Id:I0d8270b4d5f5f2d3415b98182990d8649099dbe3 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2016-06-01rename test suite scriptMatthewLi1-1/+1
JIRA: YARDSTICK-279 Change-Id: I70accc9a79b59447c907057c386f14f6a4f38346 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-05-23move /ci into /tests directoryMatthewLi1-1/+1
JIRA: YARDSTICK-269 Change-Id: I2b552aded888fa9d8f8ddd8d902b3d7f6d31a607 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2016-01-11Implementation of yardstick-tc006 in YardstickVincenzo Riccobene1-0/+2
Includes - Yardstick Scenario for integration with ApexLake - Yardstick Task .yaml file - Documentation JIRA: YARDSTICK-219 Change-Id: Iabde8fa63f346cf1e4a02691f22d1761de79a239 Signed-off-by: Vincenzo Riccobene <vincenzox.m.riccobene@intel.com>
2015-10-28part 2 :add coverage report in Jenkins for Yardstickkubi1-1/+12
this part is focus on script on run coverage test,not only show missing lines but also show diff between your patch and master, actually,it produce a html for coverage,but now ,it just on your local machine extra missing lines is 10-lines,final target is 4-lines JIRA:YARDSTICK-108 Change-Id: I550dff51d6f89562447e12127646155325e38a4a Signed-off-by: kubi <jean.gaoliang@huawei.com>
2015-09-25Add functional tests in verify and mergekubi1-1/+12
As Ana said ,"The first functional test should be as simple as a "Hello world", it shall be possible to run the "Hello world" test without using OpenStack." so i just finish functional test framework and do functional test for subcommand "runner"and"scenario" without using Openstack. JIRA:YARDSTICK-103 Change-Id: I673ae61f9922536a685d32ae62e5ad5165472f9d Signed-off-by: kubi <jean.gaoliang@huawei.com>
2015-08-13Make run_tests.sh verbose and enable unit testsKristian Hunt1-10/+29
By default output from run_tests is verbose. This enables seeing the error messages in Jenkins' console output when a job fails. Output can alternatively be captured to a log file using an -f flag. Example invocation for logging output to a file: $ ./run_tests.sh -f Running of unittest from run_test.sh is enabled. JIRA: YARDSTICK-102 YARDSTICK-104 Change-Id: I3be7d7873cf75247980d97c3fbdf0bfdbabe53ad Signed-off-by: Kristian Hunt <kristian.hunt@gmail.com>
2015-06-15add unit test for pingJo¶rgen Karlsson1-2/+1
Running of unittest from run_test.sh is NOT enabled. JIRA:- Change-Id: I741d63e8ab37570c3cf67353fafc7f5210382219 Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
2015-05-28fix run_tests.shHans Feldt1-1/+1
Since we have no tests yet, just run flake8 Change-Id: I623d96c924524b2992175d345e176b7fd743413d JIRA: - Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-05-21fix run_tests exit statusHans Feldt1-0/+2
previously run_tests always returned 0 no matter the result. It can now be hooked up to a gerrit gate job. Change-Id: I2c4bccec71c179fd2b1b965613c34179da830ac5 JIRA: - Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-05-13add README and scripts for build and testHans Feldt1-0/+38
README.rst is work in progress and probably not proper rst format yet but should still contain valuable information. run_tests.sh is a script that runs unit and style tests on the code. It can be used as a gate check in gerrit. Similar scripts are standard practice in other open source projects. JIRA: - Change-Id: I5e586b346ff45f1151960a0e7fda2fe6072422c0 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>