summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-07-12 10:44:40 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2016-12-06 16:37:13 +0100
commit8da7fc715a91b5eefd176aa478276fa068a161ab (patch)
tree4278c651e93295ce4b7147ad0deaa29f8e5c95c9 /test
parent5155e0ddaff655300bbfaf9776e5bf8553bd2e5f (diff)
downloadmajor-8da7fc715a91b5eefd176aa478276fa068a161ab.tar.gz
major-8da7fc715a91b5eefd176aa478276fa068a161ab.tar.bz2
major-8da7fc715a91b5eefd176aa478276fa068a161ab.zip
Add test/tct_sdmux.bats
Exactly one sdmux device should be connected during these tests. Change-Id: I48c098cc02416e52067fe5b2bfe23da5e9c78463 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/tct_sdmux.bats36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/tct_sdmux.bats b/test/tct_sdmux.bats
new file mode 100755
index 0000000..d0cdcef
--- /dev/null
+++ b/test/tct_sdmux.bats
@@ -0,0 +1,36 @@
+#!/usr/bin/env bats
+
+. ./tct/flash/flash.sh
+
+@test "is_connected" {
+ RET=`sd-mux-ctrl -l | head -n 1 | grep -o "[0-9]*"`
+ [ $RET -eq 1 ]
+}
+
+setup() {
+ SDMUX=`sd-mux-ctrl -l | awk '/Serial/ {sub(",$", "", $6); print $6}'`
+}
+
+@test "sdmux_init" {
+ sdmux_init "$SDMUX"
+}
+
+@test "switch2testserver" {
+ switch2testserver "$SDMUX"
+}
+
+@test "switch2device" {
+ switch2device "$SDMUX"
+}
+
+@test "restart_device" {
+ restart_device "$SDMUX"
+}
+
+@test "change_id" {
+ NEW_ID1="foo_bar"
+ change_id "$SDMUX" "$NEW_ID1"
+ NEW_ID2=`sd-mux-ctrl -l | awk '/Serial/ {sub(",$", "", $6); print $6}'`
+ [ "${NEW_ID1}" = "${NEW_ID2}" ]
+ change_id "$NEW_ID1" "$SDMUX"
+}