Add an integration test

Add a test to verify that the parameters passed from the
envsetup.sh function are compatible with the actual tool
event logger implementation.

Note that this change adds support for extra logger arguments.
This enables calling the real logger binary with a 'dry run'
flag to avoid actual logging during test execution.

Test: atest rul_tool_with_logging_test
Bug: 331638854

Change-Id: I6b280c53baae03477d4f52f0084efb1f500bd5d0
This commit is contained in:
Zhuoyao Zhang
2024-04-30 00:28:34 +00:00
parent cc1dd590fd
commit db666bcb0c
3 changed files with 43 additions and 8 deletions

View File

@@ -1134,8 +1134,9 @@ function run_tool_with_logging() {
--tool_tag "${tool_tag}" \
--start_timestamp "${start_time}" \
--end_timestamp "$(date +%s.%N)" \
--tool_args \""${@}"\" \
--tool_args "$*" \
--exit_code "${exit_code}" \
${ANDROID_TOOL_LOGGER_EXTRA_ARGS} \
> /dev/null 2>&1 &
exit ${exit_code}
' SIGINT SIGTERM SIGQUIT EXIT