assy tests triggered by a uboot env variable

This commit is contained in:
Vincent-FK 2020-11-20 15:41:56 +01:00
parent ec69eb8296
commit 311a200581
5 changed files with 11 additions and 8 deletions

View File

@ -2,8 +2,9 @@
## Check if tests must be run
RUN_FILE=/mnt/.assembly_tests
if [ ! -f ${RUN_FILE} ]; then
echo "${RUN_FILE} not present, not performing assembly tests."
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
if [ ! -f ${RUN_FILE} -a "x${RUN_ENV_VAR}" != "x1" ]; then
#echo "${RUN_FILE} not present, not performing assembly tests."
exit 0
fi
@ -29,7 +30,7 @@ stop_loop=false
proc_uid=$($GET_PROC_UID)
## Defines
VERSION="0.01"
VERSION="1.00"
LOG_FILE="/root/logs/assembly_tests/assy_tests_${proc_uid}.log"
[ -d $(dirname $LOG_FILE) ] || mkdir -p $(dirname $LOG_FILE)
MAGNET_DETECTED_FILE="/root/.assembly_tests_magnet_detected"
@ -359,7 +360,7 @@ ro
## Exit processes
if ! $test_failed; then
## Remove run file => no assembly tests on next run
rm ${RUN_FILE}
rm -f ${RUN_FILE}
sync
exit 0
else

View File

@ -9,7 +9,7 @@ if [ ${#} -ne 0 ]; then
fi
# Sanity check: Check if integer
brightness=$(fw_printenv | grep brightness= | cut -d'=' -f 2-)
brightness=$(fw_printenv -n brightness 2>/dev/null)
if ! [ ! "${brightness}" -ne "${brightness}" ] 2> /dev/null; then
brightness=${BRIGHTNESS_DEFAULT_VALUE}
fw_setenv brightness ${brightness}

View File

@ -9,7 +9,7 @@ if [ ${#} -ne 0 ]; then
fi
# Sanity check: Check if integer
volume=$(fw_printenv | grep volume= | cut -d'=' -f 2-)
volume=$(fw_printenv -n volume 2>/dev/null)
if ! [ ! "${volume}" -ne "${volume}" ] 2> /dev/null; then
volume=${VOLUME_DEFAULT_VALUE}
fw_setenv volume ${volume}

View File

@ -9,7 +9,7 @@ if [ ${#} -ne 0 ]; then
fi
# Sanity check: Check if integer
brightness=$(fw_printenv | grep brightness= | cut -d'=' -f 2-)
brightness=$(fw_printenv -n brightness 2>/dev/null)
if ! [ ! "${brightness}" -ne "${brightness}" ] 2> /dev/null; then
brightness=${BRIGHTNESS_DEFAULT_VALUE}
fw_setenv brightness ${brightness}

View File

@ -227,9 +227,11 @@ menu_run () {
if [ $? -eq 0 ]; then
if [ -e /mnt/.assembly_tests ]; then
rm -f /mnt/.assembly_tests
fw_setenv assembly_tests 0
message=" FACTORY TESTS ENABLE"
else
touch /mnt/.assembly_tests
#touch /mnt/.assembly_tests
fw_setenv assembly_tests 1
message=" FACTORY TESTS DISABLE"
fi
notif "${message}"