Fix exception if input test is not a real module
Add check for is_tradefed_testable_module() if input mod-info is None to
prevent exception happend.
Bug: 271223457
Test: m atest ; atest-dev HelloWorldTests
Test: m atest ; atest-dev native-benchmark
Change-Id: I951c6282dc41eb436bda399be1e209e4ca783fd7
diff --git a/atest/module_info.py b/atest/module_info.py
index 1ce9a70..87b69e7 100644
--- a/atest/module_info.py
+++ b/atest/module_info.py
@@ -421,6 +421,8 @@
def is_tradefed_testable_module(self, info: Dict[str, Any]) -> bool:
"""Check whether the module is a Tradefed executable test."""
+ if not info:
+ return False
if not info.get(constants.MODULE_INSTALLED, []):
return False
return bool(info.get(constants.MODULE_TEST_CONFIG, []) or