Skip to content
Snippets Groups Projects
Commit be09baca authored by Jonas Höppner's avatar Jonas Höppner
Browse files

pbb: update testscripts

parent c2bf5c03
No related branches found
No related tags found
1 merge request!239bluetooth: Allow to specify package cnt and delay for bt_test
......@@ -19,22 +19,21 @@
#Testimage_display FRAMEBUFFER=/dev/fb0 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI hdmiconfig unblank; hdmiconfig set 1920 1080 60 16; sleep 3; FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
Testimage_display bball_qml &
#Fingerpaint_start fingerpaint_sdl &
LED_RED echo 10 > /sys/class/leds/led_board\:red/brightness
LED_Green echo 70 > /sys/class/leds/led_board\:green/brightness
LED_Yellow echo 100 > /sys/class/leds/led_board\:yellow/brightness
LED_RED echo 10 > /sys/class/leds/led_board\:red/brightness
LED_Green echo 70 > /sys/class/leds/led_board\:green/brightness
LED_Yellow echo 100 > /sys/class/leds/led_board\:yellow/brightness
MMC_umount for i in `mount | grep mmcblk1 | awk '{print $1}'`; do umount $i; done
USB_sticks_umount for i in $(grep /dev/sd /proc/mounts | awk '{print $1}' ) ;do umount $i; done
Touchtest_remove_socket rm -f /touch_tst_socket
Touchtest_start touchmon -d -i /dev/input/event0 -s /touch_tst_socket -p 0
Test_BT_pinger_start hciattach /dev/ttymxc2 any 115200 flow; hciconfig hci0 up; l2test -s -C1 -D1000 00:0E:8E:55:20:42 &
Battery_Charger_Active gpioset $(gpiofind EN_CHARGER)=1
Bluetooth_prepare systemctl start bluetooth-init; l2pingd -s64 -t1 -d0 -v 00:0E:8E:BB:4D:21 > /tmp/bt_test.log 2>&1 &
# Enable 24VOUT Rail
Enable_24VOUT echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_ON gpioset $(gpiofind "RELAY1_ON")=1
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
Relay_1_ON gpioset $(gpiofind "RELAY1_ON")=1
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
# Setup ADI lines
# ADI 0 as Analog Voltag input
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
......@@ -44,41 +43,49 @@ SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "C
SETUP_ADI2 gpioset $(gpiofind "CFG2_0")=0;gpioset $(gpiofind "CFG2_1")=0;
# ADI 3 as Digital input
SETUP_ADI3 gpioset $(gpiofind "CFG3_0")=0;gpioset $(gpiofind "CFG3_1")=0;
CIM_5V_ON echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
Wait_for_BT sleep 5
#-----------------------------------------------------------------------------#
# TESTCASES #
#-----------------------------------------------------------------------------#
Temp lm73temp -n lm75 -b 1 -d 0049
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
Light_Sensor [ 2 -lt $( cat /sys/bus/iio/devices/iio\:device0/in_illuminance_raw ) ]
Light_Sensor [ 2 -lt $( cat /sys/bus/iio/devices/iio\:device0/in_illuminance_raw ) ]
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1
# For bluetooth, just check if the bluetooth ping is still running
Bluetooth pidof l2test
Test_BT_ping /opt/ltp/scripts/bt_test.sh -n 5 -g 5
#I2C i2c -q -d /dev/i2c-0 -s 0x68 -a 0x0a -b 0x0b -w 100 -i 150
Network_1 iptest -q -g 192.168.1.100 -n 1 -w 50
Network_wlan0 iptest -q -g 192.168.3.100 -n 1 -w 990 -a
RS485_1 rs485echo -d /dev/ttymxc0 -s 115200 -x 100 -b 32
RS485_2 rs485echo -d /dev/ttymxc1 -s 115200 -x 100 -b 32
RS485_3 rs485echo -d /dev/ttyUSB0 -s 115200 -x 100 -b 32 -n
#Relay_1_DIG_IN_4 /opt/ltp/scripts/relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 /opt/ltp/scripts/relay_digin_test.sh RELAY2_ON DIG_IN5
#Network_wlan0 iptest -q -g 192.168.3.100 -n 1 -w 990 -a
RS485_1 rs485echo -d /dev/ttymxc0 -s 576000 -x 100 -b 32
RS485_2 rs485echo -d /dev/ttymxc1 -s 576000 -x 100 -b 32
RS485_3 rs485echo -d /dev/ttyUSB0 -s 576000 -x 100 -b 32 -n
#RS485_CIM /opt/ltp/testcases/bin/serialloop -d /dev/ttymxc3 -s 115200 -b 8 -r
#Relay_1_DIG_IN_4 /opt/ltp/scripts/relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 /opt/ltp/scripts/relay_digin_test.sh RELAY2_ON DIG_IN5
24V_OUT [ 1 -eq $(gpioget -l $(gpiofind 24VOUT_OK) ) ]
# ADI and DIG in
ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1618 ] && [ "$v" -lt 1638 ]
ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2034 ] && [ "$v" -lt 2054 ]
#ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1618 ] && [ "$v" -lt 1638 ]
ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1600 ] && [ "$v" -lt 1690 ]
#ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2034 ] && [ "$v" -lt 2054 ]
ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2000 ] && [ "$v" -lt 3000 ]
DIG_IN2 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN2) ) ]
DIG_IN3 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN3) ) ]
DIG_IN4 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN4) ) ]
DIG_IN5 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN5) ) ]
Battery_Charger [ "Charging" = "$(cat /sys/class/power_supply/battery-charger/status)" ]
Touch touchmon -z -r /touch_tst_socket
Wait sleep 1.0
#-----------------------------------------------------------------------------#
# CLEANUP #
#-----------------------------------------------------------------------------#
Test_BT_pinger_stop killall l2test;
Touchtest_stop touchmon -t -r /touch_tst_socket -q
Testimage_display_stop killall bball_qml
Testimage_display_stop killall qmlscene
#Testimage_display_stop killall qmlscene
Disable_24VOUT echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_OFF gpioset $(gpiofind "RELAY1_ON")=0
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
Test_BT_stop killall l2pingd
Battery_Charger_disable gpioset $(gpiofind EN_CHARGER)=0
CIM_5V_OFF echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
......@@ -19,18 +19,17 @@
#Testimage_display FRAMEBUFFER=/dev/fb0 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
#Testimage_HDMI hdmiconfig unblank; hdmiconfig set 1920 1080 60 16; sleep 3; FRAMEBUFFER=/dev/fb2 fbv -er /opt/ltp/images/guf_test_800x480.png < /dev/null
Testimage_display bball_qml &
#Fingerpaint_start fingerpaint_sdl &
LED_RED echo 10 > /sys/class/leds/led_board\:red/brightness
LED_Green echo 70 > /sys/class/leds/led_board\:green/brightness
LED_Yellow echo 100 > /sys/class/leds/led_board\:yellow/brightness
Fingerpaint_start fingerpaint_sdl &
#Testimage_display bball_qml &
LED_RED echo 10 > /sys/class/leds/led_board\:red/brightness
LED_Green echo 70 > /sys/class/leds/led_board\:green/brightness
LED_Yellow echo 100 > /sys/class/leds/led_board\:yellow/brightness
MMC_umount for i in `mount | grep mmcblk1 | awk '{print $1}'`; do umount $i; done
USB_sticks_umount for i in $(grep /dev/sd /proc/mounts | awk '{print $1}' ) ;do umount $i; done
Touchtest_remove_socket rm -f /touch_tst_socket
Touchtest_start touchmon -d -i /dev/input/event0 -s /touch_tst_socket -p 0
Test_BT_pinger_start hciattach /dev/ttymxc2 any 115200 flow; hciconfig hci0 up; l2test -s -C1 -D1000 00:0E:8E:55:20:42 &
Battery_Charger_Active gpioset $(gpiofind EN_CHARGER)=1
Bluetooth_prepare systemctl start bluetooth-init; l2pingd -s64 -t1 -d0 -v 00:0E:8E:BB:4D:21 > /tmp/bt_test.log 2>&1 &
# Enable 24VOUT Rail
Enable_24VOUT echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_ON gpioset $(gpiofind "RELAY1_ON")=1
......@@ -44,7 +43,9 @@ SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "C
SETUP_ADI2 gpioset $(gpiofind "CFG2_0")=0;gpioset $(gpiofind "CFG2_1")=0;
# ADI 3 as Digital input
SETUP_ADI3 gpioset $(gpiofind "CFG3_0")=0;gpioset $(gpiofind "CFG3_1")=0;
CIM_5V_ON echo 1 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
Wait_for_BT sleep 5
#-----------------------------------------------------------------------------#
# TESTCASES #
#-----------------------------------------------------------------------------#
......@@ -52,34 +53,40 @@ Temp lm73temp -n lm75 -b 1 -d 0049
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
Light_Sensor [ 2 -lt $( cat /sys/bus/iio/devices/iio\:device0/in_illuminance_raw ) ]
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1
# For bluetooth, just check if the bluetooth ping is still running
Bluetooth pidof l2test
Test_BT_ping /opt/ltp/scripts/bt_test.sh -n 5 -g 5
#I2C i2c -q -d /dev/i2c-0 -s 0x68 -a 0x0a -b 0x0b -w 100 -i 150
Network_1 iptest -q -g 192.168.1.100 -n 1 -w 50
Network_wlan0 iptest -q -g 192.168.3.100 -n 1 -w 990 -a
RS485_1 rs485echo -d /dev/ttymxc0 -s 115200 -x 100 -b 32
RS485_2 rs485echo -d /dev/ttymxc1 -s 115200 -x 100 -b 32
RS485_3 rs485echo -d /dev/ttyUSB0 -s 115200 -x 100 -b 32 -n
#Relay_1_DIG_IN_4 /opt/ltp/scripts/relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 /opt/ltp/scripts/relay_digin_test.sh RELAY2_ON DIG_IN5
RS485_1 rs485echo -d /dev/ttymxc0 -s 576000 -x 100 -b 32
RS485_2 rs485echo -d /dev/ttymxc1 -s 576000 -x 100 -b 32
RS485_3 rs485echo -d /dev/ttyUSB0 -s 576000 -x 100 -b 32 -n
#RS485_CIM /opt/ltp/testcases/bin/serialloop -d /dev/ttymxc3 -s 115200 -b 8 -r
#Relay_1_DIG_IN_4 /opt/ltp/scripts/relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 /opt/ltp/scripts/relay_digin_test.sh RELAY2_ON DIG_IN5
24V_OUT [ 1 -eq $(gpioget -l $(gpiofind 24VOUT_OK) ) ]
# ADI and DIG in
ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1618 ] && [ "$v" -lt 1638 ]
ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2034 ] && [ "$v" -lt 2054 ]
#ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1618 ] && [ "$v" -lt 1638 ]
ADI0_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage0_raw && echo "ADI0: $v" && [ "$v" -gt 1600 ] && [ "$v" -lt 1690 ]
#ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2034 ] && [ "$v" -lt 2054 ]
ADI1_IN read v < /sys/bus/iio/devices/iio\:device1/in_voltage1_raw && echo "ADI1: $v" && [ "$v" -gt 2000 ] && [ "$v" -lt 3000 ]
DIG_IN2 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN2) ) ]
DIG_IN3 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN3) ) ]
DIG_IN4 [ 1 -eq $(gpioget -l $(gpiofind DIG_IN4) ) ]
DIG_IN5 [ 0 -eq $(gpioget -l $(gpiofind DIG_IN5) ) ]
Touch touchmon -z -r /touch_tst_socket
Battery_Charger [ "Charging" = "$(cat /sys/class/power_supply/battery-charger/status)" ]
#Touch touchmon -z -r /touch_tst_socket
Wait sleep 1.0
#-----------------------------------------------------------------------------#
# CLEANUP #
#-----------------------------------------------------------------------------#
Test_BT_pinger_stop killall l2test;
Touchtest_stop touchmon -t -r /touch_tst_socket -q
#Testimage_display_stop killall bball_qml
#Testimage_display_stop killall qmlscene
Fingerpaint_stop killall fingerpaint_sdl
#Testimage_display_stop killall bball_qml
#Testimage_display_stop killall qmlscene
Disable_24VOUT echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/24V_OUT/state
Relay_1_OFF gpioset $(gpiofind "RELAY1_ON")=0
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
Test_BT_stop killall l2pingd
Battery_Charger_disable gpioset $(gpiofind EN_CHARGER)=0
CIM_5V_OFF echo 0 > /sys/bus/platform/drivers/reg-userspace-consumer/5P0_CIM/state
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment