From 37c2d39dac92b3c2d0a3476fb41048ff996ccdb0 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 23 Feb 2016 11:51:12 -0800 Subject: [PATCH] move jwlib.FILELISTS to config.py Summary:public This will avoid a circular dependency between analyze.py and jwlib.py in an upcoming refactoring. Reviewed By: martinoluca Differential Revision: D2965734 fb-gh-sync-id: 1cb69d4 shipit-source-id: 1cb69d4 --- infer/lib/python/inferlib/analyze.py | 5 ++++- infer/lib/python/inferlib/capture/gradle.py | 6 ++++-- infer/lib/python/inferlib/config.py | 1 + infer/lib/python/inferlib/jwlib.py | 2 -- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/infer/lib/python/inferlib/analyze.py b/infer/lib/python/inferlib/analyze.py index a098d2e86..e1875c76e 100644 --- a/infer/lib/python/inferlib/analyze.py +++ b/infer/lib/python/inferlib/analyze.py @@ -207,7 +207,10 @@ def reset_start_file(results_dir): def clean(infer_out): - directories = ['multicore', 'classnames', 'sources', jwlib.FILELISTS] + directories = [ + 'multicore', 'classnames', 'sources', + config.JAVAC_FILELISTS_FILENAME, + ] extensions = ['.cfg', '.cg'] for root, dirs, files in os.walk(infer_out): diff --git a/infer/lib/python/inferlib/capture/gradle.py b/infer/lib/python/inferlib/capture/gradle.py index 6a042449e..b9389fdff 100644 --- a/infer/lib/python/inferlib/capture/gradle.py +++ b/infer/lib/python/inferlib/capture/gradle.py @@ -38,7 +38,8 @@ class GradleCapture: self.build_cmd = [cmd[0], '--debug'] + cmd[1:] # That contains javac version as well version_str = util.run_cmd_ignore_fail([cmd[0], '--version']) - path = os.path.join(self.args.infer_out, jwlib.FILELISTS) + path = os.path.join(self.args.infer_out, + config.JAVAC_FILELISTS_FILENAME) if not os.path.exists(path): os.mkdir(path) logging.info("Running with:\n" + version_str) @@ -69,7 +70,8 @@ class GradleCapture: mode='w', suffix='.txt', prefix='gradle_', - dir=os.path.join(self.args.infer_out, jwlib.FILELISTS), + dir=os.path.join(self.args.infer_out, + config.JAVAC_FILELISTS_FILENAME), delete=False) as sources: sources.write("\n".join(java_files)) sources.flush() diff --git a/infer/lib/python/inferlib/config.py b/infer/lib/python/inferlib/config.py index 9805bd3f6..8e6e8cd94 100644 --- a/infer/lib/python/inferlib/config.py +++ b/infer/lib/python/inferlib/config.py @@ -42,6 +42,7 @@ PROC_STATS_FILENAME = 'proc_stats.json' CSV_REPORT_FILENAME = 'report.csv' JSON_REPORT_FILENAME = 'report.json' BUGS_FILENAME = 'bugs.txt' +JAVAC_FILELISTS_FILENAME = 'filelists' IOS_CAPTURE_ERRORS = 'errors' IOS_BUILD_OUTPUT = 'build_output' diff --git a/infer/lib/python/inferlib/jwlib.py b/infer/lib/python/inferlib/jwlib.py index 14c678508..9951aabe9 100644 --- a/infer/lib/python/inferlib/jwlib.py +++ b/infer/lib/python/inferlib/jwlib.py @@ -14,8 +14,6 @@ import subprocess import config import utils -FILELISTS = 'filelists' - # javac options parser = argparse.ArgumentParser()