aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2018-03-12 13:50:13 +0100
committerManuel Buil <mbuil@suse.com>2018-03-15 14:35:33 +0100
commitaadbd3d5d927906af38d09bbdbcb480c3a526b23 (patch)
treec7230593757ec5fa5a9840a2cf37705a9f55d485
parentcde9c60e0bcb6ba141ce50d913dc138bfca3493d (diff)
Allow executing tests from run_sfc_tests
Removing it was a mistake because without it is harder to debug (e.g. using break points does not work when triggering tests from functest) Change-Id: I3a958da0add0fb57946da333f75fb526c2fe6c33 Signed-off-by: Manuel Buil <mbuil@suse.com>
-rw-r--r--setup.cfg4
-rw-r--r--sfc/tests/functest/run_sfc_tests.py6
2 files changed, 10 insertions, 0 deletions
diff --git a/setup.cfg b/setup.cfg
index edeeb5de..51ea1095 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,3 +5,7 @@ home-page = https://wiki.opnfv.org/display/sfc/Service+Function+Chaining+Home
[files]
packages = sfc
+
+[entry_points]
+console_scripts =
+ run_sfc_tests = sfc.tests.functest.run_sfc_tests:main
diff --git a/sfc/tests/functest/run_sfc_tests.py b/sfc/tests/functest/run_sfc_tests.py
index a22d5fb2..a9aba67f 100644
--- a/sfc/tests/functest/run_sfc_tests.py
+++ b/sfc/tests/functest/run_sfc_tests.py
@@ -12,6 +12,7 @@ import importlib
import os
import time
import yaml
+import sys
from xtesting.core import testcase
from opnfv.utils import ovs_logger as ovs_log
@@ -184,3 +185,8 @@ class SfcFunctest(testcase.TestCase):
return testcase.TestCase.EX_OK
return testcase.TestCase.EX_RUN_ERROR
+
+def main():
+ logging.basicConfig(level=logging.INFO)
+ SFC = SfcFunctest()
+ sys.exit(SFC.run())