update script for crash gen
This commit is contained in:
parent
fcf64fa3d5
commit
f14e2ed3f9
|
@ -324,7 +324,7 @@ def main():
|
||||||
print( " crash_gen.sh is not exists ")
|
print( " crash_gen.sh is not exists ")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
git_commit = subprocess.Popen("cd %s && git log | head -n1"%crash_gen_path, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read().decode("utf-8")[8:16]
|
git_commit = subprocess.Popen("cd %s && git log | head -n1"%crash_gen_path, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read().decode("utf-8")[7:16]
|
||||||
|
|
||||||
# crash_cmds = get_cmds()
|
# crash_cmds = get_cmds()
|
||||||
|
|
||||||
|
@ -348,9 +348,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
print('======== crash_gen run sucess and exit as expected ========')
|
print('======== crash_gen run sucess and exit as expected ========')
|
||||||
|
|
||||||
|
|
||||||
if status!=0 :
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
text = f"crash_gen instance exit status of docker [ {hostname} ] is : {msg_dict[status]}\n " + f" and git commit : {git_commit}"
|
text = f"crash_gen instance exit status of docker [ {hostname} ] is : {msg_dict[status]}\n " + f" and git commit : {git_commit}"
|
||||||
send_msg(get_msg(text))
|
send_msg(get_msg(text))
|
||||||
|
|
|
@ -357,7 +357,7 @@ def main():
|
||||||
print( " crash_gen.sh is not exists ")
|
print( " crash_gen.sh is not exists ")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
git_commit = subprocess.Popen("cd %s && git log | head -n1"%crash_gen_path, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read().decode("utf-8")[8:16]
|
git_commit = subprocess.Popen("cd %s && git log | head -n1"%crash_gen_path, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read().decode("utf-8")[7:16]
|
||||||
|
|
||||||
# crash_cmds = get_cmds()
|
# crash_cmds = get_cmds()
|
||||||
|
|
||||||
|
@ -383,8 +383,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
print('======== crash_gen run sucess and exit as expected ========')
|
print('======== crash_gen run sucess and exit as expected ========')
|
||||||
|
|
||||||
if status!=0 :
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
text = f"crash_gen instance exit status of docker [ {hostname} ] is : {msg_dict[status]}\n " + f" and git commit : {git_commit}"
|
text = f"crash_gen instance exit status of docker [ {hostname} ] is : {msg_dict[status]}\n " + f" and git commit : {git_commit}"
|
||||||
send_msg(get_msg(text))
|
send_msg(get_msg(text))
|
||||||
|
|
|
@ -357,7 +357,7 @@ def main():
|
||||||
print( " crash_gen.sh is not exists ")
|
print( " crash_gen.sh is not exists ")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
git_commit = subprocess.Popen("cd %s && git log | head -n1"%crash_gen_path, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read().decode("utf-8")[8:16]
|
git_commit = subprocess.Popen("cd %s && git log | head -n1"%crash_gen_path, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read().decode("utf-8")[7:16]
|
||||||
|
|
||||||
# crash_cmds = get_cmds()
|
# crash_cmds = get_cmds()
|
||||||
|
|
||||||
|
@ -383,8 +383,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
print('======== crash_gen run sucess and exit as expected ========')
|
print('======== crash_gen run sucess and exit as expected ========')
|
||||||
|
|
||||||
if status!=0 :
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
text = f"crash_gen instance exit status of docker [ {hostname} ] is : {msg_dict[status]}\n " + f" and git commit : {git_commit}"
|
text = f"crash_gen instance exit status of docker [ {hostname} ] is : {msg_dict[status]}\n " + f" and git commit : {git_commit}"
|
||||||
send_msg(get_msg(text))
|
send_msg(get_msg(text))
|
||||||
|
|
Loading…
Reference in New Issue