DescriptionRestore logging level after test is finished.
In run_test.Main, there are two places that logging level may be changed:
1. BrowserFinderOptions, when calling parser.parse_args, in which logging level
is set based on verbosity's value.
2. run_test.Main, in which logging level is set to WARN if verbosity is 0.
Such change on logging level causes problem to caller like autotest, which
relies on logging level to log details during the test, and output messages
from different logging level to different log file, e.g., client.DEBUG,
client.INFO etc.
This CL added some fix to:
1. Cache the logging level at the beginning of the Main method.
2. Always restore logging level at the end of the Main method.
BUG=chromium:284763
TEST=verified in local dut with autotest:
test_that --fast -b lumpy 172.22.75.225 telemetry_UnitTests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223504
Patch Set 1 #
Total comments: 2
Patch Set 2 : #
Total comments: 2
Patch Set 3 : #
Total comments: 2
Patch Set 4 : Fix function name to follow Chome standard #Patch Set 5 : Use decorator as a wrapper to restore logging level. #
Total comments: 6
Patch Set 6 : Clean up the decorator #Messages
Total messages: 13 (0 generated)
|