File tree Expand file tree Collapse file tree 5 files changed +11
-8
lines changed
FunKey/board/funkey/rootfs-overlay/usr/local/sbin
Recovery/board/funkey/rootfs-overlay/usr/local/sbin Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 22
33# # Check if tests must be run
44RUN_FILE=/mnt/.assembly_tests
5- if [ ! -f ${RUN_FILE} ]; then
6- echo " ${RUN_FILE} not present, not performing assembly tests."
5+ RUN_ENV_VAR=$( fw_printenv -n assembly_tests 2> /dev/null)
6+ if [ ! -f ${RUN_FILE} -a " x${RUN_ENV_VAR} " != " x1" ]; then
7+ # echo "${RUN_FILE} not present, not performing assembly tests."
78 exit 0
89fi
910
@@ -29,7 +30,7 @@ stop_loop=false
2930proc_uid=$( $GET_PROC_UID )
3031
3132# # Defines
32- VERSION=" 0.01 "
33+ VERSION=" 1.00 "
3334LOG_FILE=" /root/logs/assembly_tests/assy_tests_${proc_uid} .log"
3435[ -d $( dirname $LOG_FILE ) ] || mkdir -p $( dirname $LOG_FILE )
3536MAGNET_DETECTED_FILE=" /root/.assembly_tests_magnet_detected"
359360# # Exit processes
360361if ! $test_failed ; then
361362 # # Remove run file => no assembly tests on next run
362- rm ${RUN_FILE}
363+ rm -f ${RUN_FILE}
363364 sync
364365 exit 0
365366else
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if [ ${#} -ne 0 ]; then
99fi
1010
1111# Sanity check: Check if integer
12- brightness=$( fw_printenv | grep brightness= | cut -d ' = ' -f 2- )
12+ brightness=$( fw_printenv -n brightness 2> /dev/null )
1313if ! [ ! " ${brightness} " -ne " ${brightness} " ] 2> /dev/null; then
1414 brightness=${BRIGHTNESS_DEFAULT_VALUE}
1515 fw_setenv brightness ${brightness}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if [ ${#} -ne 0 ]; then
99fi
1010
1111# Sanity check: Check if integer
12- volume=$( fw_printenv | grep volume= | cut -d ' = ' -f 2- )
12+ volume=$( fw_printenv -n volume 2> /dev/null )
1313if ! [ ! " ${volume} " -ne " ${volume} " ] 2> /dev/null; then
1414 volume=${VOLUME_DEFAULT_VALUE}
1515 fw_setenv volume ${volume}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if [ ${#} -ne 0 ]; then
99fi
1010
1111# Sanity check: Check if integer
12- brightness=$( fw_printenv | grep brightness= | cut -d ' = ' -f 2- )
12+ brightness=$( fw_printenv -n brightness 2> /dev/null )
1313if ! [ ! " ${brightness} " -ne " ${brightness} " ] 2> /dev/null; then
1414 brightness=${BRIGHTNESS_DEFAULT_VALUE}
1515 fw_setenv brightness ${brightness}
Original file line number Diff line number Diff line change @@ -227,9 +227,11 @@ menu_run () {
227227 if [ $? -eq 0 ]; then
228228 if [ -e /mnt/.assembly_tests ]; then
229229 rm -f /mnt/.assembly_tests
230+ fw_setenv assembly_tests 0
230231 message=" FACTORY TESTS ENABLE"
231232 else
232- touch /mnt/.assembly_tests
233+ # touch /mnt/.assembly_tests
234+ fw_setenv assembly_tests 1
233235 message=" FACTORY TESTS DISABLE"
234236 fi
235237 notif " ${message} "
You can’t perform that action at this time.
0 commit comments