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

pbb emc test: Update test scripts, fix relay script usage, fix whitespaces

parent 3bbb96bb
No related branches found
No related tags found
1 merge request!142pbb emc test: Update test scripts, fix relay script usage, fix whitespaces
......@@ -19,67 +19,67 @@
#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 &
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
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
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
# BT not yet supported
#Test_BT_pinger_start hciconfig hci0 up; l2test -s -C1 -D1000 00:0E:8E:55:20:42 &
# 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
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
# Setup ADI lines
# ADI 0 as Analog Voltag input
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
# ADI 1 as Analog current input
SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "CFG1_1")=0;
SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "CFG1_1")=0;
# ADI 2 as Digital input
SETUP_ADI2 gpioset $(gpiofind "CFG2_0")=0;gpioset $(gpiofind "CFG2_1")=0;
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;
SETUP_ADI3 gpioset $(gpiofind "CFG3_0")=0;gpioset $(gpiofind "CFG3_1")=0;
#-----------------------------------------------------------------------------#
# 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 ) ]
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1
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
#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_1 iptest -q -g 192.168.1.100 -n 1 -w 50
# TODO Wlan not yet supported
#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/ttymxc2 -s 115200 -x 100 -b 32
#Relay_1_DIG_IN_4 relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 relay_digin_test.sh RELAY2_ON DIG_IN5
Touch touchmon -z -r /touch_tst_socket
24V_OUT /opt/ltp/scripts/test_24V_pbb.sh
#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/ttymxc2 -s 115200 -x 100 -b 32
#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
Touch touchmon -z -r /touch_tst_socket
24V_OUT /opt/ltp/scripts/test_24V_pbb.sh
# 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 ]
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) ) ]
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 ]
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) ) ]
Wait sleep 1.0
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
Relay_1_OFF gpioset $(gpiofind "RELAY1_ON")=0
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
#Fingerpaint_stop killall fingerpaint_sdl
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
Relay_1_OFF gpioset $(gpiofind "RELAY1_ON")=0
Relay_2_OFF gpioset $(gpiofind "RELAY2_ON")=0
#Fingerpaint_stop killall fingerpaint_sdl
......@@ -21,57 +21,57 @@
#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
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
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
# BT not yet supported
#Test_BT_pinger_start hciconfig hci0 up; l2test -s -C1 -D1000 00:0E:8E:55:20:42 &
# 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
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
# Setup ADI lines
# ADI 0 as Analog Voltag input
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
SETUP_ADI0 gpioset $(gpiofind "CFG0_0")=0;gpioset $(gpiofind "CFG0_1")=1;
# ADI 1 as Analog current input
SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "CFG1_1")=0;
SETUP_ADI1 gpioset $(gpiofind "CFG1_0")=1;gpioset $(gpiofind "CFG1_1")=0;
# ADI 2 as Digital input
SETUP_ADI2 gpioset $(gpiofind "CFG2_0")=0;gpioset $(gpiofind "CFG2_1")=0;
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;
SETUP_ADI3 gpioset $(gpiofind "CFG3_0")=0;gpioset $(gpiofind "CFG3_1")=0;
#-----------------------------------------------------------------------------#
# 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 ) ]
USB_stick_1_write_25kB bwrite -q -n /dev/sda -b 25000 -i 1
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
#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_1 iptest -q -g 192.168.1.100 -n 1 -w 50
# TODO Wlan not yet supported
#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/ttymxc2 -s 115200 -x 100 -b 32
#Relay_1_DIG_IN_4 relay_digin_test.sh RELAY1_ON DIG_IN4
#Relay_2_DIG_IN_5 relay_digin_test.sh RELAY2_ON DIG_IN5
Touch touchmon -z -r /touch_tst_socket
24V_OUT /opt/ltp/scripts/test_24V_pbb.sh
#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/ttymxc2 -s 115200 -x 100 -b 32
#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
Touch touchmon -z -r /touch_tst_socket
24V_OUT /opt/ltp/scripts/test_24V_pbb.sh
# 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 ]
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) ) ]
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 ]
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) ) ]
Wait sleep 1.0
Wait sleep 1.0
#-----------------------------------------------------------------------------#
# CLEANUP #
......
File moved
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