Commit b3c77aeb authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

sw: PTS executable checks for success before downloading release bstream

This is done to avoid an unnecessary 5 mins wasted on writing the bitstream,
even though we need to re-run the tests due to a failure.
parent efa08d9a
......@@ -174,27 +174,31 @@ if __name__ == '__main__':
cmd = "xterm -e ./jpts.py -s %s %s" % (sn1, sn2)
print "Running tests :%s\n" % (cmd)
subprocess.call(cmd, shell=True, stdout=fnull, stderr=fnull)
ret = subprocess.call("grep FAIL log/*.log", shell=True, stdout=fnull, stderr=fnull)
# After JPTS has finished, download release bitstream to EEPROM chip if none of the tests has failed
print "Loading CONV-TTL-RS485 golden and release bitstream...\n"
#ret = subprocess.call("cd boot; ./flash", shell=True, stdout=fnull, stderr=fnull)
ret = 1
if (ret != 0):
print "ERROR: Bitstream download failed"
if (ret == 0):
print "Errors in tests, not downloading release bitstream"
print ""
else:
time.sleep(1)
# After JPTS has finished, download release bitstream to EEPROM chip if none of the tests has failed
print "Loading CONV-TTL-RS485 golden and release bitstream...\n"
ret = subprocess.call("cd boot; ./flash", shell=True, stdout=fnull, stderr=fnull)
if (ret != 0):
print "ERROR: Bitstream download failed"
else:
time.sleep(1)
# ... power-cycle the crate
print "VME crate power-cycle..."
men_off()
time.sleep(5)
men_on()
# ... power-cycle the crate
print "VME crate power-cycle..."
men_off()
time.sleep(5)
men_on()
time.sleep(5)
time.sleep(5)
# .. and run the flash test
cmd = "xterm -e python ./flashtest.py"
subprocess.call(cmd, shell=True, stdout=fnull, stderr=fnull)
# .. and run the flash test
cmd = "xterm -e python ./flashtest.py"
subprocess.call(cmd, shell=True, stdout=fnull, stderr=fnull)
# After all testing has finished, grep the log files for PASS and FAIL messages and print the outcomes to the console
subprocess.call("grep PASS log/*.log", shell=True, stdout=sys.stdout, stderr=sys.stderr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment