X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=host%2Fget_test.rb;h=0c3eb1bea1ae0e8a2c5a466fcffd27fb860e8de5;hp=cc8b48acbb3776a7fd30c93cf5c909d5c7a08846;hb=83d0614d8b17eac97f891f7de2bb3ef265751dea;hpb=fa7a41a129697b6e7dce363060d2265f5fdb93a6 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);