Skip to content

Commit

Permalink
Merge pull request #170 from smartdevicelink/fix/xml_reporting
Browse files Browse the repository at this point in the history
Switch off XML Report by default
  • Loading branch information
jacobkeeler committed Sep 5, 2019
2 parents d6c2138 + 36200d4 commit 2403b45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions modules/atf_logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ local controlMessagesHB = {}
controlMessagesHB[ford_constants.FRAME_INFO.HEARTBEAT] = "Heartbeat"
controlMessagesHB[ford_constants.FRAME_INFO.HEARTBEAT_ACK] = "HeartbeatACK"

Logger.mobile_log_format = "%s (%s) [%s, sessionId: %s, version: %s, frameType: %s, "
.. "encryption: %s, serviceType: %s, frameInfo: %s, messageId: %s, binaryDataSize: %s] : %s \n"
Logger.hmi_log_format = "%s (%s) : %s \n"
Logger.mobile_log_format = "%s [%s] [%s, sessionId: %s, version: %s, frameType: %s, "
.. "encryption: %s, serviceType: %s, frameInfo: %s, messageId: %s, binaryDataSize: %s] : %s \n\n"
Logger.hmi_log_format = "%s [%s] %s \n"

local rpc_function_id

Expand Down Expand Up @@ -93,7 +93,7 @@ function Logger.formated_time(without_date)
if without_date == true then
return qdatetime.get_datetime("hh:mm:ss,zzz")
end
return qdatetime.get_datetime("dd MM yyyy hh:mm:ss, zzz")
return qdatetime.get_datetime("dd-MM-yyyy hh:mm:ss,zzz")
end

--- Check message is it HMI tract
Expand Down Expand Up @@ -123,7 +123,7 @@ end
-- @tparam string tract Tract information
-- @tparam string message String representation of message from mobile application to SDL
function Logger:MOBtoSDL(tract, message)
local log_str = string.format(Logger.mobile_log_format,"MOB->SDL ", Logger.formated_time(),
local log_str = string.format(Logger.mobile_log_format,"MOB->SDL", Logger.formated_time(),
get_function_name(message), message.sessionId, message.version, message.frameType,
message.encryption, message.serviceType, message.frameInfo, message.messageId, getBinaryDataSize(message.binaryData), message.payload)
if is_hmi_tract(tract, message) then
Expand Down Expand Up @@ -167,7 +167,7 @@ end
-- @tparam string tract Tract information
-- @tparam string message String representation of message from HMI to SDL
function Logger:HMItoSDL(tract, message)
local log_str = string.format(Logger.hmi_log_format, "HMI->SDL", Logger.formated_time(), message)
local log_str = string.format(Logger.hmi_log_format, "HMI->SDL", Logger.formated_time(), message .. "\n")
if is_hmi_tract(tract, message) then
self.atf_log_file:write(log_str)
end
Expand Down Expand Up @@ -244,18 +244,16 @@ function Logger.init_log(script_name)
return Logger
end

--- Store auxiliary message about start of new test step of test scenario into ATF log file (only if `config.excludeReport` is set to `false`)
--- Store auxiliary message about start of new test step of test scenario into ATF log file
-- @tparam string test_case Test step name
function Logger.LOGTestCaseStart(test_case)
if config.excludeReport then return end
Logger:StartTestCase(test_case)
end

--- Store message on baasis on tract information into ATF log file
-- @tparam string tract Tract information
-- @tparam string message String representation of message
function Logger.LOG(tract, message)
if config.excludeReport then return end
Logger[tract](Logger, tract, message)
end

Expand Down
2 changes: 1 addition & 1 deletion modules/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ config.ShowTimeInConsole = true
--- Flag which defines whether ATF performs validation of Mobile and HMI messages by API
config.ValidateSchema = true
--- Flag which defines whether ATF ignores collecting of reports
config.excludeReport = false
config.excludeReport = true
--- Flag which defines whether ATF creates full ATF logs (with json files and service messages)
config.storeFullATFLogs = true
--- Flag which defines whether ATF stores full SDLCore logs
Expand Down

0 comments on commit 2403b45

Please sign in to comment.