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

ltp emc-testsuite: tr8mp-pbb testfiles

Add testfiles for immunity and emission file and add comments how to disable the
serial debug port.
Add relay test as script.

BCS 746-001210
parent 1c0f42a7
No related branches found
No related tags found
1 merge request!128Add testcase for tr8mp pbb
#-----------------------------------------------------------------------------#
# DESCRIPTION #
# ----------- #
# This is a configuration file for the Garz & Fricke Built-In-Test Framework, #
# which is implemented using tests from the LTP. Thus, the configuration file #
# looks very similar to LTP configuration files and can actually be used by #
# LTP. However, it should not, since there are slight differences: #
# This file is divided into three sections: PREPARATION, TESTCASES and #
# CLEANUP. Each section contains lines beginning with a name and ending with #
# a command line. The command lines of the PREPARATION section are executed #
# once at the start of the execution. Then, the command lines of the TEST- #
# CASES section is looped for the given number of iterations. At the end, the #
# commands of the CLEANUP section are run once. #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# PREPARATION #
#-----------------------------------------------------------------------------#
#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 &
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
# NOTE !!!
# For RS485_1 to work:
# * ensure the debug cable is not connected
# * ensure that "tty0" is used in kernel command-line (not ttymxc0)
# * one time run "systemctl disable serial-getty@ttymxc0.service" (and reboot afterwars)
#-----------------------------------------------------------------------------#
# TESTCASES #
#-----------------------------------------------------------------------------#
Temp lm73temp -n lm75 -b 1 -d 0049
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
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
# 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 [ 1 -eq $(gpioget -l $(gpiofind 24VOUT_OK) ) ]
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_sdl
#-----------------------------------------------------------------------------#
# DESCRIPTION #
# ----------- #
# This is a configuration file for the Garz & Fricke Built-In-Test Framework, #
# which is implemented using tests from the LTP. Thus, the configuration file #
# looks very similar to LTP configuration files and can actually be used by #
# LTP. However, it should not, since there are slight differences: #
# This file is divided into three sections: PREPARATION, TESTCASES and #
# CLEANUP. Each section contains lines beginning with a name and ending with #
# a command line. The command lines of the PREPARATION section are executed #
# once at the start of the execution. Then, the command lines of the TEST- #
# CASES section is looped for the given number of iterations. At the end, the #
# commands of the CLEANUP section are run once. #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# PREPARATION #
#-----------------------------------------------------------------------------#
#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 &
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
# NOTE !!!
# For RS485_1 to work:
# * ensure the debug cable is not connected
# * ensure that "tty0" is used in kernel command-line (not ttymxc0)
# * one time run "systemctl disable serial-getty@ttymxc0.service" (and reboot afterwars)
#-----------------------------------------------------------------------------#
# TESTCASES #
#-----------------------------------------------------------------------------#
Temp lm73temp -n lm75 -b 1 -d 0049
eMMC_write_25kB fwrite -q -n /file25k -b 25000 -i 1
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
# 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 [ 1 -eq $(gpioget -l $(gpiofind 24VOUT_OK) ) ]
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_sdl
Fingerpaint_stop killall fingerpaint_sdl
#!/bin/sh
# Test for relay and dig in on pbb
#
# The relays NC=GND NO=24V C - > DIG_IN
RELAY_GPIO="$1"
DIGIN_GPIO="$2"
relay=$(gpiofind "$RELAY_GPIO")
digin=$(gpiofind "$DIGIN_GPIO")
if [ -z "$relay" ]; then
echo "Failed to find relay '$RELAY_GPIO'.".
exit 1
fi
if [ -z "$digin" ]; then
echo "Failed to find relay '$RELAY_GPIO'."
exit 1
fi
# Set the relay to normal state
# shellcheck disable=2086
gpioset $relay=0
usleep 10000
# Read the input
# shellcheck disable=2086
v0="$(gpioget -l $digin)"
usleep 100000
# Set the relay to enabled state
# shellcheck disable=2086
gpioset $relay=1
usleep 10000
# Read the input
# shellcheck disable=2086
v1="$(gpioget -l $digin)"
usleep 10000
# Reset the relay to normal state
# shellcheck disable=2086
gpioset $relay=0
echo " $v0 $v1 "
if [ "$v0" = "0" ] && [ "$v1" = "1" ];then
exit 0
else
exit 1
fi
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