aboutsummaryrefslogtreecommitdiffstats
path: root/test/afb-test/fixtures/replay_launcher.sh
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-06-19 18:40:32 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-07-09 18:25:57 +0200
commit7c5d80deacad2a1f6943dd0b77449c3f6e20fdfc (patch)
tree0a6782a85994b38adf35aebefd9c5b5561c43f92 /test/afb-test/fixtures/replay_launcher.sh
parent0b188b21df19bac0cff339c738cd439e887436b8 (diff)
Create first tests to be used with afb-test binding The test binding is now found using pkg-config command. Change-Id: Ib1cd08236b6b8fab93ccb67ac613a9c83908d12e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'test/afb-test/fixtures/replay_launcher.sh')
-rwxr-xr-xtest/afb-test/fixtures/replay_launcher.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/afb-test/fixtures/replay_launcher.sh b/test/afb-test/fixtures/replay_launcher.sh
new file mode 100755
index 00000000..186b05b3
--- /dev/null
+++ b/test/afb-test/fixtures/replay_launcher.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+PLAYER=$(command -v canplayer 2> /dev/null || command -v linuxcan-canplayer 2> /dev/null)
+FILE=$1
+
+if [ "$PLAYER" ]
+then
+ $PLAYER -I "$FILE" &
+else
+ echo "can-utils packages not installed"
+ exit 1
+fi
+
+exit 0