ot  committed 84b073c

Added option in build and autobuild API to redirect stdout

  • Participants
  • Parent commits 14c284b

Comments (0)

Files changed (2)

File bpt/'Building and installing as package %s',
     for cmd in cmd_list:
-        check_call(['bash', '-e', box.env_script, cmd], cwd=source_dir)
+        check_call(['bash', '-e', box.env_script, cmd], cwd=source_dir, stdout=stdout)
-def autobuild(box, filename, configure_options='', keep_temp=False):
+def autobuild(box, filename, configure_options='', keep_temp=False, stdout=None):
     if not os.path.exists(filename):
         raise UserError('File %s does not exist' % filename)
     if os.path.isdir(filename):

File bpt/

         return outtext
-    def build(self, box, name_suffix=''):
+    def build(self, box, name_suffix='', stdout=None):
         appname = self.get_var('BPT_APP_NAME')
         version = self.get_var('BPT_APP_VERSION')
                    + 'bpt_unpack;'
                    + 'bpt_build;'
-        retcode = call(['bash', '-e', box.env_script, sh_line])
+        retcode = call(['bash', '-e', box.env_script, sh_line], stdout=stdout)
         if retcode != 0:
             raise UserError('FATAL: build script exited with status %s' % retcode)