self-diagnostics: 1.0.11

This commit is contained in:
Vivek Kumar Dutta 2024-11-04 17:32:53 +05:30
parent 6129323ca3
commit 8e774faa3e
3 changed files with 7 additions and 5 deletions

View file

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=self-diagnostics
PKG_VERSION:=1.0.10
PKG_VERSION:=1.0.11
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-only

View file

@ -2,5 +2,5 @@ config globals 'globals'
option extended_spec_dir '/etc/self-diagnostics/spec'
option exec_timeout '5'
option report_name 'self-diagnostics-report-$MODEL-$SERIAL'
option verbose '0'
option verbose '1'
option compression_level '9'

View file

@ -116,15 +116,16 @@ config_load()
exec_spec()
{
local json_file exec_skip name timeout exec_timeout rc
local json_file exec_skip name timeout exec_timeout rc start_time end_time
start_time="$(date +%s)"
json_file="$1"
[ -z "$json_file" ] && {
err_log "No/invalid spec json_file"
return 1
}
log "Loading $json_file ..."
log "# Loading $json_file at ${start_time} ..."
json_init
json_load_file "${json_file}" || {
@ -238,7 +239,8 @@ exec_spec()
json_select ..
fi
log "Handling of $json_file done"
end_time="$(date +%s)"
log "# Handling of $json_file done, time: ${end_time}, time_spent: $((end_time - start_time)) sec"
log ""
}