aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-07-18 10:32:23 +0200
committerDamjan Marion <dmarion@me.com>2018-07-19 22:31:45 +0000
commit7064c338f15ecfbf77b0d2d68ab8ce30beb77cb2 (patch)
tree25031b0412d9f908fb34f056dd513ca499f93952 /test
parent7d98a12f29d5b9696df98b8af2f128614a4f0360 (diff)
test_jvpp: improve error message when JVpp JARS are missing
The java command fails with missing class error, when some of the JARs given by -cp are missing, which may be missleading. This patch fixes that by adding os.path.isfile check to test_jvpp.py. Change-Id: I3a0b6ef338c7f70cfd0ba78ee0888efe0b0957b3 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_jvpp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_jvpp.py b/test/test_jvpp.py
index c3b93576f71..9cb787f1471 100644
--- a/test/test_jvpp.py
+++ b/test/test_jvpp.py
@@ -106,9 +106,16 @@ class TestJVpp(VppTestCase):
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",