Switch Atest to use CommandRunner instead of console

Atest never runs in interactive mode so it's better to go
through the runner (like TF subprocess mode).

CommandRunner will give an exit code 7
(NO_DEVICE_ALLOCATED) if it fails to find a device after
1 minute.

Test: atest unit tests
atest com.android.server.wm.ScreenDecorWindowTests#testMultipleDecors
Bug: 80539300

Change-Id: Ia086cd0bd138e6a84c540235437fcb7614efb07c
diff --git a/atest/test_runners/atest_tf_test_runner.py b/atest/test_runners/atest_tf_test_runner.py
index 5b3352a..257eb17 100644
--- a/atest/test_runners/atest_tf_test_runner.py
+++ b/atest/test_runners/atest_tf_test_runner.py
@@ -61,7 +61,7 @@
     NAME = 'AtestTradefedTestRunner'
     EXECUTABLE = 'atest_tradefed.sh'
     _TF_TEMPLATE = 'template/local_min'
-    _RUN_CMD = ('{exe} run commandAndExit {template} --template:map '
+    _RUN_CMD = ('{exe} {template} --template:map '
                 'test=atest {args}')
     _BUILD_REQ = {'tradefed-core'}
 
diff --git a/atest_tradefed.sh b/atest_tradefed.sh
index 680ac25..bdbf981 100755
--- a/atest_tradefed.sh
+++ b/atest_tradefed.sh
@@ -42,4 +42,4 @@
 
 # Note: must leave $RDBG_FLAG and $TRADEFED_OPTS unquoted so that they go away when unset
 java $RDBG_FLAG -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow $TRADEFED_OPTS \
-  -cp "${TF_PATH}" -DTF_JAR_DIR=${TF_JAR_DIR} ${java_tmp_dir_opt} com.android.tradefed.command.Console "$@"
+  -cp "${TF_PATH}" -DTF_JAR_DIR=${TF_JAR_DIR} ${java_tmp_dir_opt} com.android.tradefed.command.CommandRunner "$@"