Skip to content

Commit

Permalink
fixing race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframed committed Mar 2, 2024
1 parent c0031e6 commit 3eb0be7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def wait_for_string(self, string_to_waitfor, stderr=False, timeout=False):
continue


def ipl(self, step_text='', clpa=False):
def ipl(self, step_text='', clpa=False,ftp=False):
print(step_text)
self.reset_hercules(clpa=clpa)
#self.wait_for_string("0:0151 CKD")
Expand All @@ -300,6 +300,8 @@ def ipl(self, step_text='', clpa=False):
# self.wait_for_string('$HASP426 SPECIFY OPTIONS - HASP-II, VERSION JES2 4.1')
# self.send_oper('r 0,noreq')
#IKT005I TCAS IS INITIALIZED
if ftp:
self.wait_for_string("FTP005I Startup Complete")
self.wait_for_string("IKT005I TCAS IS INITIALIZED")

def shutdown_mvs(self, cust=False):
Expand Down Expand Up @@ -384,9 +386,9 @@ def submit(self,jcl, host='127.0.0.1',port=3505, ebcdic=False):

build.shutdown_mvs(cust=True)
elif args.ftp:
build.ipl(clpa=False)
build.ipl(clpa=False,ftp=True)
print("[AUTOMATION] FTP'ing OVERFLOW files")
build.wait_for_string("FTP005I Startup Complete")
# build.wait_for_string("FTP005I Startup Complete")
print("[AUTOMATION] Running command: for i in {}/overflows/*; do lftp -e \"cd DEFCON.OVERFLOW; put $i; bye\" -u ibmuser,sys1 localhost:2121; done".format(cwd))
p = os.system("for i in {}/overflows/*; do lftp -e \"cd DEFCON.OVERFLOW; put $i; bye\" -u ibmuser,sys1 localhost:2121; done".format(cwd))
print("Return code:{}".format(p))
Expand Down

0 comments on commit 3eb0be7

Please sign in to comment.