From 2b8cab1e2478547398ad9c2fe68e025c180cac54 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 5 Sep 2019 15:27:32 +0300 Subject: Java: introducing websocket support. --- test/unit/applications/lang/java.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/unit/applications/lang/java.py') diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index ec1c95d9..3010a232 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -1,4 +1,5 @@ import os +import glob import shutil from subprocess import Popen from unit.applications.proto import TestApplicationProto @@ -45,13 +46,20 @@ class TestApplicationJava(TestApplicationProto): if not os.path.isdir(classes_path): os.makedirs(classes_path) - tomcat_jar = self.pardir + '/build/tomcat-servlet-api-9.0.13.jar' + classpath = self.pardir + '/build/tomcat-servlet-api-9.0.13.jar' + + ws_jars = glob.glob( + self.pardir + '/build/websocket-api-java-*.jar' + ) + + if not ws_jars: + self.fail('websocket api jar not found.') javac = [ 'javac', '-encoding', 'utf-8', '-d', classes_path, - '-classpath', tomcat_jar, + '-classpath', classpath + ':' + ws_jars[0], ] javac.extend(src) -- cgit