Flesh out error messages for test montors to locate test owners more
easily.
Bug: 191067323
Test: unittest
Change-Id: I81bbb87cc51fe0e5e6ba487af69317fe242ceb0a
diff --git a/javatests/com/android/tradefed/presubmit/TestMappingsValidation.java b/javatests/com/android/tradefed/presubmit/TestMappingsValidation.java
index eba2379..6089f23 100644
--- a/javatests/com/android/tradefed/presubmit/TestMappingsValidation.java
+++ b/javatests/com/android/tradefed/presubmit/TestMappingsValidation.java
@@ -218,7 +218,17 @@
}
}
if (!errors.isEmpty()) {
- String error = format("Fail test entry check:\n%s", Joiner.on("\n").join(errors));
+ String error =
+ format(
+ "Fail test entry check. Some test modules are not found or the module"
+ + " name has been changed or been removed from build file. \n\n"
+ + "To locate owner that is responsible for the breakage, try to do"
+ + " code search on the test modules, check the changelog/blame of"
+ + " the broken TEST_MAPPING file or Android.bp/mk to locate the"
+ + " owner.\n\n"
+ + "Details: \n"
+ + "%s",
+ Joiner.on("\n").join(errors));
if (!mEnforceModuleNameCheck) {
CLog.w(error);
} else {