comparison toolfactory/rgToolFactory2.py @ 57:d21517a36db8 draft

Uploaded
author fubar
date Thu, 22 Oct 2020 00:56:46 +0000
parents 68fbdbe35f08
children 881bd8c81ac9
comparison
equal deleted inserted replaced
56:68fbdbe35f08 57:d21517a36db8
627 ste.close() 627 ste.close()
628 retval = p.returncode 628 retval = p.returncode
629 else: # work around special case - stdin and write to stdout 629 else: # work around special case - stdin and write to stdout
630 sti = open(self.infiles[0][IPATHPOS], "rb") 630 sti = open(self.infiles[0][IPATHPOS], "rb")
631 sto = open(self.outfiles[0][ONAMEPOS], "wb") 631 sto = open(self.outfiles[0][ONAMEPOS], "wb")
632 # must use shell to redirect
633 p = subprocess.run(self.cl, shell=False, stdout=sto, stdin=sti) 632 p = subprocess.run(self.cl, shell=False, stdout=sto, stdin=sti)
634 retval = p.returncode 633 retval = p.returncode
635 sto.close() 634 sto.close()
636 sti.close() 635 sti.close()
637 if os.path.isfile(self.tlog) and os.stat(self.tlog).st_size == 0: 636 if os.path.isfile(self.tlog) and os.stat(self.tlog).st_size == 0:
694 tout = open(self.tlog, "w") 693 tout = open(self.tlog, "w")
695 if genoutputs: 694 if genoutputs:
696 cll = [ 695 cll = [
697 "planemo", 696 "planemo",
698 "test", 697 "test",
698 "--skip_venv",
699 "--galaxy_root", 699 "--galaxy_root",
700 self.args.galaxy_root, 700 self.args.galaxy_root,
701 "--update_test_data", 701 "--update_test_data",
702 xreal, 702 xreal,
703 ] 703 ]
704 else: 704 else:
705 cll = ["planemo", "test", "--galaxy_root", 705 cll = ["planemo", "test", "--galaxy_root",
706 self.args.galaxy_root, 706 self.args.galaxy_root, "--skip_venv",
707 xreal,] 707 xreal,]
708 p = subprocess.run( 708 p = subprocess.run(
709 cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout 709 cll, shell=False, cwd=self.tooloutdir, stderr=tout, stdout=tout
710 ) 710 )
711 if genoutputs: 711 if genoutputs: