import os
import subprocess
+import unittest
-from framework import VppTestCase
+from framework import VppTestCase, running_extended_tests
# Api files path
-API_FILES_PATH = "vpp/vpp-api/java"
+API_FILES_PATH = "japi/java"
# Registry jar file name prefix
REGISTRY_JAR_PREFIX = "jvpp-registry"
+@unittest.skipUnless(running_extended_tests(), "part of extended tests")
class TestJVpp(VppTestCase):
""" JVPP Core Test Case """
REGISTRY_JAR_PREFIX, version)
self.logger.info("JVpp Registry jar path : {0}"
.format(registry_jar_path))
+ if (not os.path.isfile(registry_jar_path)):
+ raise Exception(
+ "JVpp Registry jar has not been found: {0}"
+ .format(registry_jar_path))
api_jar_path = self.full_jar_name(install_dir, api_jar_name, version)
self.logger.info("Api jar path : {0}".format(api_jar_path))
+ if (not os.path.isfile(api_jar_path)):
+ raise Exception(
+ "Api jar has not been found: {0}".format(api_jar_path))
# passes shm prefix as parameter to create connection with same value
command = ["java", "-cp",
self.logger.info("Process output : {0}{1}".format(os.linesep, out))
if self.process.returncode != 0:
- raise Exception(
+ raise subprocess.CalledProcessError(
"Command {0} failed with return code: {1}.{2}"
"Process error output: {2}{3}"
.format(command, self.process.returncode, os.linesep, err))