aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/lua/examples/cli
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-10-15 20:18:47 -0700
committerSteven <sluong@cisco.com>2017-10-15 20:21:27 -0700
commit2199aab7422a704f86ca7b8a392531fc42866cb3 (patch)
treef92b8f7cea5d0f9fc75763f4c00a59169337a572 /src/vpp-api/lua/examples/cli
parentfa77e8fb1cc8a87a4a31792698e7200c4195583e (diff)
VCL/LDPRELOAD: getpeername and getsockname
Add support for getpeername and getsockname system calls Change-Id: Ie22787b967bb2a5fead0f5fcffd779e4f39b3302 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/vpp-api/lua/examples/cli')
0 files changed, 0 insertions, 0 deletions
: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/router/bin/python
from .stl_general_test import CStlGeneral_Test, CTRexScenario
import os, sys
from misc_methods import run_command


class STLExamples_Test(CStlGeneral_Test):
    """This class defines the IMIX testcase of the TRex traffic generator"""

    def explicitSetUp(self):
        # examples connect by their own
        if self.is_connected():
            CTRexScenario.stl_trex.disconnect()

    def explicitTearDown(self):
        # connect back at end of tests
        if not self.is_connected():
            self.stl_trex.connect()

    def test_stl_examples(self):
        examples_dir = '../trex_control_plane/stl/examples'
        examples_to_test = [
                            'stl_imix.py',
                            ]

        for example in examples_to_test:
            self.explicitSetUp()
            return_code, stdout, stderr = run_command("sh -c 'cd %s; %s %s -s %s'" % (examples_dir, sys.executable, example, CTRexScenario.configuration.trex['trex_name']))
            self.explicitTearDown()
            assert return_code == 0, 'example %s failed.\nstdout: %s\nstderr: %s' % (return_code, stdout, stderr)