|
|
@ -290,32 +290,8 @@ class AnalyzerWithFrontendWrapper(analyze.AnalyzerWrapper):
|
|
|
|
|
|
|
|
|
|
|
|
return self.stats
|
|
|
|
return self.stats
|
|
|
|
|
|
|
|
|
|
|
|
# create a classpath to pass to the frontend
|
|
|
|
|
|
|
|
def _create_frontend_classpath(self):
|
|
|
|
|
|
|
|
classes_out = '.'
|
|
|
|
|
|
|
|
if self.javac.args.classes_out is not None:
|
|
|
|
|
|
|
|
classes_out = self.javac.args.classes_out
|
|
|
|
|
|
|
|
classes_out = os.path.abspath(classes_out)
|
|
|
|
|
|
|
|
original_classpath = []
|
|
|
|
|
|
|
|
if self.javac.args.bootclasspath is not None:
|
|
|
|
|
|
|
|
original_classpath = self.javac.args.bootclasspath.split(':')
|
|
|
|
|
|
|
|
if self.javac.args.classpath is not None:
|
|
|
|
|
|
|
|
original_classpath += self.javac.args.classpath.split(':')
|
|
|
|
|
|
|
|
if len(original_classpath) > 0:
|
|
|
|
|
|
|
|
# add classes_out, unless it's already in the classpath
|
|
|
|
|
|
|
|
classpath = [os.path.abspath(p) for p in original_classpath]
|
|
|
|
|
|
|
|
if classes_out not in classpath:
|
|
|
|
|
|
|
|
classpath = [classes_out] + classpath
|
|
|
|
|
|
|
|
# remove models.jar; it's added by the frontend
|
|
|
|
|
|
|
|
models_jar = os.path.abspath(config.MODELS_JAR)
|
|
|
|
|
|
|
|
if models_jar in classpath:
|
|
|
|
|
|
|
|
classpath.remove(models_jar)
|
|
|
|
|
|
|
|
return ':'.join(classpath)
|
|
|
|
|
|
|
|
return classes_out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _run_infer_frontend(self):
|
|
|
|
def _run_infer_frontend(self):
|
|
|
|
infer_cmd = [utils.get_cmd_in_bin_dir('InferJava')]
|
|
|
|
infer_cmd = [utils.get_cmd_in_bin_dir('InferJava')]
|
|
|
|
infer_cmd += ['-classpath', self._create_frontend_classpath()]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
infer_cmd += [
|
|
|
|
infer_cmd += [
|
|
|
|
'-results_dir', self.args.infer_out,
|
|
|
|
'-results_dir', self.args.infer_out,
|
|
|
|