Fix a bug in tf test runner
Atest will mistakenly always run tests with pretty output even though
the old output is enabled.
Test: m atest && ATEST_OLD_OUTPUT=1 atest-dev HelloWorldTests
Change-Id: Iae660ced73881ac84e4605556897bc5bb72ac4cf
diff --git a/atest/test_runners/atest_tf_test_runner.py b/atest/test_runners/atest_tf_test_runner.py
index 881b73a..0cbeb5d 100644
--- a/atest/test_runners/atest_tf_test_runner.py
+++ b/atest/test_runners/atest_tf_test_runner.py
@@ -257,7 +257,8 @@
os.chdir(os.path.abspath(os.getenv(constants.ANDROID_BUILD_TOP)))
if os.getenv(trb.OLD_OUTPUT_ENV_VAR):
result = self.run_tests_raw(test_infos, extra_args, reporter)
- result = self.run_tests_pretty(test_infos, extra_args, reporter)
+ else:
+ result = self.run_tests_pretty(test_infos, extra_args, reporter)
except atest_error.DryRunVerificationError as e:
atest_utils.colorful_print(str(e), constants.RED)
return ExitCode.VERIFY_FAILURE