Beispiel #1
0
 def capture(self):
     print('Running and capturing gradle compilation...')
     (build_code, (verbose_out, _)) = util.get_build_output(self.build_cmd)
     cmds = self.get_infer_commands(verbose_out)
     capture_code = util.run_compilation_commands(cmds)
     if build_code != os.EX_OK:
         return build_code
     return capture_code
Beispiel #2
0
 def capture(self):
     print('Running and capturing gradle compilation...')
     (code, verbose_out) = util.get_build_output(self.build_cmd)
     if code != os.EX_OK:
         return code
     cmds = self.get_infer_commands(verbose_out)
     clean_cmd = '%s clean' % self.build_cmd[0]
     return util.run_compilation_commands(cmds, clean_cmd)
Beispiel #3
0
 def capture(self):
     print('Running and capturing gradle compilation...')
     (code, verbose_out) = util.get_build_output(self.build_cmd)
     if code != os.EX_OK:
         return code
     cmds = self.get_infer_commands(verbose_out)
     clean_cmd = '%s clean' % self.build_cmd[0]
     return util.run_compilation_commands(cmds, clean_cmd)
Beispiel #4
0
 def capture(self):
     print('Running and capturing gradle compilation...')
     (build_code, (verbose_out, _)) = util.get_build_output(self.build_cmd)
     cmds = self.get_infer_commands(verbose_out)
     capture_code = util.run_compilation_commands(cmds)
     if build_code != os.EX_OK:
         return build_code
     return capture_code
Beispiel #5
0
 def capture(self):
     try:
         env = self.get_envvars()
         logging.info('Running command %s with env:\n%s' % (self.cmd, env))
         subprocess.check_call(self.cmd, env=env)
         capture_dir = os.path.join(self.args.infer_out, 'captured')
         if len(os.listdir(capture_dir)) < 1:
             # Don't return with a failure code unless we're
             # running make. It could be normal to have captured
             # nothing (eg, empty source file). Further output will
             # alert the user that there was nothing to analyze.
             if self.cmd[0] == 'make':
                 # reuse code from gradle, etc. integration
                 return util.run_compilation_commands([], 'make clean')
         return os.EX_OK
     except subprocess.CalledProcessError as exc:
         if self.args.debug:
             traceback.print_exc()
         return exc.returncode
Beispiel #6
0
 def capture(self):
     try:
         env = self.get_envvars()
         logging.info('Running command %s with env:\n%s' % (self.cmd, env))
         subprocess.check_call(self.cmd, env=env)
         capture_dir = os.path.join(self.args.infer_out, 'captured')
         if len(os.listdir(capture_dir)) < 1:
             # Don't return with a failure code unless we're
             # running make. It could be normal to have captured
             # nothing (eg, empty source file). Further output will
             # alert the user that there was nothing to analyze.
             if self.cmd[0] == 'make':
                 # reuse code from gradle, etc. integration
                 return util.run_compilation_commands([], 'make clean')
         return os.EX_OK
     except subprocess.CalledProcessError as exc:
         if self.args.debug:
             traceback.print_exc()
         return exc.returncode
Beispiel #7
0
 def capture(self):
     print('Running and capturing gradle compilation...')
     cmds = self.get_infer_commands(util.get_build_output(self.build_cmd))
     clean_cmd = '%s clean' % self.build_cmd[0]
     return util.run_compilation_commands(cmds, clean_cmd)
Beispiel #8
0
 def capture(self):
     print('Running and capturing gradle compilation...')
     cmds = self.get_infer_commands(util.get_build_output(self.build_cmd))
     clean_cmd = '%s clean' % self.build_cmd[0]
     return util.run_compilation_commands(cmds, clean_cmd)
Beispiel #9
0
 def capture(self):
     cmds = self.get_infer_commands(util.get_build_output(self.build_cmd))
     clean_cmd = '%s clean' % self.build_cmd[0]
     return util.run_compilation_commands(cmds, clean_cmd)
Beispiel #10
0
 def capture(self):
     cmds = self.get_infer_commands(util.get_build_output(self.build_cmd))
     clean_cmd = '%s clean' % self.build_cmd[0]
     return util.run_compilation_commands(cmds, clean_cmd)