def _run_buck_with_flavors(self): # TODO: Use buck to identify the project's root folder if not os.path.isfile('.buckconfig'): print('Please run this command from the folder where .buckconfig ' 'is located') return os.EX_USAGE env_vars = utils.read_env() infer_args = env_vars['INFER_ARGS'] if infer_args != '': infer_args += '^' # '^' must be CommandLineOption.env_var_sep infer_args += '--fcp-syntax-only' env_vars['INFER_ARGS'] = infer_args env = utils.encode_env(env_vars) command = self.cmd command += ['-j', str(self.args.multicore)] if self.args.load_average is not None: command += ['-L', str(self.args.load_average)] command += self.create_cxx_buck_configuration_args() try: subprocess.check_call(command, env=env) return os.EX_OK except subprocess.CalledProcessError as e: if self.keep_going: print('Buck failed, but continuing the analysis ' 'because --keep-going was passed') return -1 else: raise e
def get_envvars(self): env_vars = utils.read_env() infer_args = env_vars['INFER_ARGS'] if infer_args != '': infer_args += '^' # '^' must be CommandLineOption.env_var_sep infer_args += '--fcp-apple-clang^' + self.apple_clang_path env_vars['INFER_ARGS'] = infer_args return env_vars
def get_envvars(self): env_vars = utils.read_env() env_vars['FCP_APPLE_CLANG'] = self.apple_clang_path frontend_env_vars = \ util.get_clang_frontend_envvars(self.args) env_vars.update(frontend_env_vars) return env_vars
def get_envvars(self): env_vars = utils.read_env() wrappers_path = config.WRAPPERS_DIRECTORY # INFER_RESULTS_DIR and INFER_OLD_PATH are used by javac wrapper only env_vars['INFER_OLD_PATH'] = env_vars['PATH'] env_vars['PATH'] = '{wrappers}{sep}{path}'.format( wrappers=wrappers_path, sep=os.pathsep, path=env_vars['PATH'], ) env_vars['INFER_RESULTS_DIR'] = self.args.infer_out return env_vars
def _run_buck_with_flavors(self): # TODO: Use buck to identify the project's root folder if not os.path.isfile('.buckconfig'): print('Please run this command from the folder where .buckconfig ' 'is located') return os.EX_USAGE env_vars = utils.read_env() env_vars['FCP_RUN_SYNTAX_ONLY'] = '1' env = utils.encode_env(env_vars) subprocess.check_call( self.cmd + self.create_cxx_buck_configuration_args(), env=env) return os.EX_OK
def get_envvars(self): env_vars = utils.read_env() wrappers_path = config.WRAPPERS_DIRECTORY env_vars['INFER_OLD_PATH'] = env_vars['PATH'] env_vars['PATH'] = '{wrappers}{sep}{path}'.format( wrappers=wrappers_path, sep=os.pathsep, path=env_vars['PATH'], ) frontend_env_vars = util.get_clang_frontend_envvars(self.args) env_vars.update(frontend_env_vars) return env_vars
def _run_buck_with_flavors(self): # TODO: Use buck to identify the project's root folder if not os.path.isfile('.buckconfig'): print('Please run this command from the folder where .buckconfig ' 'is located') return os.EX_USAGE env_vars = utils.read_env() env_vars['FCP_RUN_SYNTAX_ONLY'] = '1' env = utils.encode_env(env_vars) command = self.cmd command += ['-j', str(self.args.multicore)] if self.args.load_average is not None: command += ['-L', str(self.args.load_average)] command += self.create_cxx_buck_configuration_args() subprocess.check_call(command, env=env) return os.EX_OK
def _run_buck_with_flavors(self): # TODO: Use buck to identify the project's root folder if not os.path.isfile('.buckconfig'): print('Please run this command from the folder where .buckconfig ' 'is located') return os.EX_USAGE env_vars = utils.read_env() infer_args = env_vars['INFER_ARGS'] if infer_args != '': infer_args += '^' # '^' must be CommandLineOption.env_var_sep infer_args += '--fcp-syntax-only' env_vars['INFER_ARGS'] = infer_args env = utils.encode_env(env_vars) command = self.cmd command += ['-j', str(self.args.multicore)] if self.args.load_average is not None: command += ['-L', str(self.args.load_average)] command += self.create_cxx_buck_configuration_args() subprocess.check_call(command, env=env) return os.EX_OK
def _run_buck_with_flavors(self): env_vars = utils.read_env() infer_args = env_vars['INFER_ARGS'] if infer_args != '': infer_args += '^' # '^' must be CommandLineOption.env_var_sep infer_args += '--fcp-syntax-only' env_vars['INFER_ARGS'] = infer_args env = utils.encode_env(env_vars) command = self.cmd command += ['-j', str(self.args.multicore)] if self.args.load_average is not None: command += ['-L', str(self.args.load_average)] command += self.create_cxx_buck_configuration_args() try: subprocess.check_call(command, env=env) return os.EX_OK except subprocess.CalledProcessError as e: if self.keep_going: print('Buck failed, but continuing the analysis ' 'because --keep-going was passed') return -1 else: raise e
def get_envvars(self): env_vars = utils.read_env() env_vars['FCP_APPLE_CLANG'] = self.apple_clang_path return env_vars