]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/rtems_bench.py
Minor, mostly cosmetic, changes to RTEMS bench scripts.
[can-benchmark.git] / gw-tests / rtems_bench.py
index 51539b8dbad2bbf8e5ce3e783539df21a7687f37..e1b40ebcef51762d762edbace9eecca0c459e54c 100755 (executable)
@@ -4,14 +4,14 @@
 """
 Quick and dirty script to automate benchmarking ryu board with RTEMS on board.
 
-Should create the same directory structure as the shell scripts used when targeting linux,
-but only uses two tests (one actually, the second one is reinterpretation of the data of the first one.)
+Creates the same general directory structure and contents as do the shell scripts.
+
+Takes tests from tests.py (see its docstring for defining new tests) and relies on functions from lib.py
 
 Expects to be run from within the gw-tests directory and that the layout of boot files remains constant.
 """
 
-import subprocess
-import sys, os, shutil, stat
+import os
 from time import sleep
 
 import tests
@@ -52,7 +52,7 @@ def run():
     
             for traffic in lib.traffic_modes:
                 if traffic == "flood":
-                    subprocess.call("ifconfig can0 txqueuelen 200".split()) #this stops latester from ending due to ENOBUFS errors
+                    lib.set_txqueuelen(200) #this stops latester from ending due to ENOBUFS errors
                 print("Can mode: ", traffic)
 
                 lib.set_traffic(traffic)
@@ -66,9 +66,9 @@ def run():
             #give time to recover from load?
             sleep(5)
 
-            #Currently, because of problems with serial port, tests have associated images for behaviour\r
-            #otherwise, they are just histogram generators\r
-            if test.has_image:\r
+            #Currently, because of problems with serial port, tests have associated images for behaviour
+            #otherwise, they are just histogram generators
+            if test.has_image:
                 #second part of the load "handlers" -> stopping the load
                 if load == "cpu":
                     #we have to reflash "no cpu load" image