X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=host%2Fget_test.rb;h=0c3eb1bea1ae0e8a2c5a466fcffd27fb860e8de5;hb=83d0614d8b17eac97f891f7de2bb3ef265751dea;hp=cc8b48acbb3776a7fd30c93cf5c909d5c7a08846;hpb=2dc047a070be7f0d64f4d4e7f4296a9650af07dc;p=avr-crypto-lib.git diff --git a/host/get_test.rb b/host/get_test.rb index cc8b48a..0c3eb1b 100644 --- a/host/get_test.rb +++ b/host/get_test.rb @@ -20,10 +20,10 @@ require 'serialport' -def read_line +def read_line(error_msg=true) s = $sp.gets() if s==nil - puts "ERROR: read timeout!\n"; + puts("ERROR: read timeout!\n") if error_msg return nil end s.gsub(/\006/, ''); @@ -36,7 +36,7 @@ def readTestVector(param) set=0; vector=0; begin - lb = read_line() + lb = read_line(false) if (m=/unknown command/.match(lb) || m=/[Ee][Rr]{2}[Oo][Rr]/.match(lb)) puts("ERROR: "+lb); exit(2);