#!/usr/bin/python
#
# Copyright (c) 2016 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
import functest.core.feature_base as base


class OpenDaylightSFC(base.FeatureBase):

    def __init__(self):
        super(OpenDaylightSFC, self).__init__(project='sfc',
                                              case='functest-odl-sfc',
                                              repo='dir_repo_sfc')
        dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo)
        self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest

#!/usr/bin/python
#
# Copyright (c) 2016 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
import functest.core.feature_base as base
from sfc.tests.functest import run_tests


class OpenDaylightSFC(base.FeatureBase):

    def __init__(self):
        super(OpenDaylightSFC, self).__init__(project='sfc',
                                              case='functest-odl-sfc',
                                              repo='dir_repo_sfc')

    def execute(self):
        return run_tests.main()

Make SFC test a python call to main()
Make SFC test a python call to main()

Instead of python -> bash -> python, call
the SFC test using the execute() method that
is inherited from FeatureBase and it's a bash
call by default.
With this change, we call the SFC test using main()
of run_tests.py of SFC repo and will have
real time output.

Change-Id: I6d59821e603c88697a82b95c5626c5b703c11026
Signed-off-by: jose.lausuch <a4ed9890ad7f6494ac84a749f29a4dc3449a1186@ericsson.com>
Signed-off-by: George Paraskevopoulos <97fa9f4b61869a8ee92863df90135c882f7b3aa0@intracom-telecom.com>
