]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - host/get_test.rb
freaking, me or the compiler?
[avr-crypto-lib.git] / host / get_test.rb
index cc8b48acbb3776a7fd30c93cf5c909d5c7a08846..337ef3f4034bf7caf974e4f8cc314ee137b0a9be 100644 (file)
@@ -2,7 +2,7 @@
 # get_test.rb
 =begin
     This file is part of the AVR-Crypto-Lib.
-    Copyright (C) 2008  Daniel Otte (daniel.otte@rub.de)
+    Copyright (C) 2008, 2009  Daniel Otte (daniel.otte@rub.de)
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 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);