aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_vapi.py
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-10-16 04:20:13 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-01 09:28:06 +0000
commit812ed39f9da336310e815c361ab5a9f118657d94 (patch)
tree9d8cddc917acbb65b3dc401d880d5eb2a7f392c6 /test/test_vapi.py
parent14edd97c20735ffd1c24000a7df78e154ac61478 (diff)
VPP Object Model (VOM)
The VOM is a C++ library for use by clients/agents of VPP for programming state. It uses the binary APIs to do so. Various other common client side functions are also provided. Please see om.hpp for a more detailed description. Change-Id: Ib756bfe99817093815a9e26ccf464aa5583fc523 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Co-authored-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'test/test_vapi.py')
-rw-r--r--test/test_vapi.py33
1 files changed, 1 insertions, 32 deletions
diff --git a/test/test_vapi.py b/test/test_vapi.py
index 5f972323c61..b5820fa181b 100644
--- a/test/test_vapi.py
+++ b/test/test_vapi.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
""" VAPI test """
-from __future__ import division
import unittest
import os
import signal
@@ -9,37 +8,7 @@ import subprocess
from threading import Thread
from log import single_line_delim
from framework import VppTestCase, running_extended_tests, \
- running_on_centos, VppTestRunner
-
-
-class Worker(Thread):
- def __init__(self, args, logger):
- self.logger = logger
- self.args = args
- self.result = None
- super(Worker, self).__init__()
-
- def run(self):
- executable = self.args[0]
- self.logger.debug("Running executable w/args `%s'" % self.args)
- env = os.environ.copy()
- env["CK_LOG_FILE_NAME"] = "-"
- self.process = subprocess.Popen(
- self.args, shell=False, env=env, preexec_fn=os.setpgrp,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out, err = self.process.communicate()
- self.logger.debug("Finished running `%s'" % executable)
- self.logger.info("Return code is `%s'" % self.process.returncode)
- self.logger.info(single_line_delim)
- self.logger.info("Executable `%s' wrote to stdout:" % executable)
- self.logger.info(single_line_delim)
- self.logger.info(out)
- self.logger.info(single_line_delim)
- self.logger.info("Executable `%s' wrote to stderr:" % executable)
- self.logger.info(single_line_delim)
- self.logger.error(err)
- self.logger.info(single_line_delim)
- self.result = self.process.returncode
+ running_on_centos, VppTestRunner, Worker
@unittest.skipUnless(running_extended_tests(), "part of extended tests")