--- /dev/null
+#!/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"
+}