|
12 | 12 | def __get_my_dir(): return os.path.dirname(os.path.realpath(__file__))
|
13 | 13 |
|
14 | 14 | def __get_benchmark_library_dir(): return os.path.join(__get_my_dir(), "../benchmarks/LIBRARIES")
|
15 |
| -def __get_diffblue_models_library_dir(): return os.path.join(__get_benchmark_library_dir(), "models/model/target/classes") |
| 15 | +def __get_diffblue_models_library_package(): return os.path.join(__get_benchmark_library_dir(), "models/model/target/models.jar") |
16 | 16 | def __get_tomcat_library_dir(): return os.path.join(__get_benchmark_library_dir(), "apache-tomcat-9/lib")
|
17 | 17 |
|
18 | 18 |
|
@@ -98,16 +98,11 @@ def evaluate(cmdline):
|
98 | 98 |
|
99 | 99 | print("Collecting Java binaries to analyse:")
|
100 | 100 |
|
101 |
| - input_search_dirs = [cmdline.install_dir] |
102 |
| - if cmdline.use_models_library: |
103 |
| - input_search_dirs.append(__get_diffblue_models_library_dir()) |
104 |
| - if cmdline.use_tomcat_library: |
105 |
| - input_search_dirs.append(__get_tomcat_library_dir()) |
106 |
| - |
107 | 101 | classes_jar_pathname = os.path.abspath(os.path.join(cmdline.results_dir, "program.json"))
|
108 | 102 | prof["collect_java_binaries"] = mkbench.collect_java_binaries(
|
109 |
| - input_search_dirs, |
110 |
| - cmdline.libraries, |
| 103 | + [cmdline.install_dir], |
| 104 | + cmdline.libraries + ([__get_diffblue_models_library_package()] if cmdline.use_models_library else []) |
| 105 | + + ([__get_tomcat_library_dir()] if cmdline.use_tomcat_library else []), |
111 | 106 | cmdline.temp_dir,
|
112 | 107 | classes_jar_pathname,
|
113 | 108 | cmdline.verbosity
|
@@ -243,9 +238,9 @@ def __main():
|
243 | 238 | analyser.get_missing_binary_error_message())
|
244 | 239 | return
|
245 | 240 |
|
246 |
| - if cmdline.use_models_library and not os.path.isdir(__get_diffblue_models_library_dir()): |
| 241 | + if cmdline.use_models_library and not os.path.isfile(__get_diffblue_models_library_package()): |
247 | 242 | print("ERROR: Models library not found at %s; consider running 'make' in %s" % (
|
248 |
| - __get_diffblue_models_library_dir(), os.path.realpath(os.path.join(__get_my_dir(), "..")))) |
| 243 | + __get_diffblue_models_library_package(), os.path.realpath(os.path.join(__get_my_dir(), "..")))) |
249 | 244 | return
|
250 | 245 | if cmdline.use_tomcat_library and not os.path.isdir(__get_tomcat_library_dir()):
|
251 | 246 | print("ERROR: Tomcat 9 library was not found at " + __get_tomcat_library_dir() + "")
|
|
0 commit comments