X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/9b45ba73353ebf67b1c9583cea7e57e6b32dd29a..4b9389362dbefcb559e4167296484f2aca475b5e:/gw-tests/tests.py diff --git a/gw-tests/tests.py b/gw-tests/tests.py new file mode 100644 index 0000000..a06a1ae --- /dev/null +++ b/gw-tests/tests.py @@ -0,0 +1,34 @@ +import lib + + +class Test: + def __init__(self, name, func, has_image): + self.name = name + self.func = func + self.has_image = has_image + + def run(self): + self.func(self) + +def nop(self): + print(self.name) + for l in (2, 4, 6, 8): + lib.call_latester(" -d can0 -d can1 -d can2 -c 10000 {0} -l {1} -n len{1}".format(lib.get_latester_arg(l), l)) + lib.create_plot_script() + + +def nop_time(self): + lib.symlink_results(lib.original_name_from_histogram_name(self.name)) + lib.create_plot_script() + +def nop_highprio(self): + nop(self) + +def nop_highprio_time(self): + nop_time(self) + + +tests = (Test("nop", nop, True), + Test("nop-time", nop_time, False), + Test("nop-highprio", nop_highprio, True), + Test("nop-highprio-time", nop_highprio_time, False)) \ No newline at end of file