]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - tests/lib.sh
Added simple test to check the infrastructure
[can-benchmark.git] / tests / lib.sh
diff --git a/tests/lib.sh b/tests/lib.sh
new file mode 100644 (file)
index 0000000..4fc9fc2
--- /dev/null
@@ -0,0 +1,24 @@
+set -x
+set -e
+
+PATH=$PWD/../_compiled/bin/:$PATH
+
+rmmod_can() {
+    modprobe -r lincan
+}
+
+load_lincan_hw() {
+    rmmod_can
+    modprobe -C /dev/null lincan hw=pcican-q io=1 baudrate=1000,1000,1000,1000 processlocal=0
+    sleep 0.1
+}
+
+load_lincan_virtual() {
+    rmmod_can
+    modprobe -C /dev/null lincan hw=virtual io=0 baudrate=0
+    sleep 0.1
+}
+
+load_socketcan() {
+    rmmod_can
+}