Fix VtsKernelCheckpointDTFstabTest
This fixes the incorrect usage of asserts occurs in the if(target_file_utils.Exists(dt)) path
Bug: b/138097599
Test: vts-tradefed run vts -m VtsKernelCheckpointDTFstabTest -a arm64-v8a
Change-Id: I6eeb64fb42186b07898e5e85120a53a28fa9f358
diff --git a/checkpoint/VtsKernelCheckpointDTFstabTest.py b/checkpoint/VtsKernelCheckpointDTFstabTest.py
index 7556528..9c384bb 100644
--- a/checkpoint/VtsKernelCheckpointDTFstabTest.py
+++ b/checkpoint/VtsKernelCheckpointDTFstabTest.py
@@ -24,6 +24,7 @@
from vts.runners.host import test_runner
from vts.utils.python.file import target_file_utils
+
class VtsKernelCheckpointDTFstabTest(base_test.BaseTestClass):
"""A test class to verify dynamic partitions are enabled."""
@@ -39,10 +40,12 @@
"""
fstab = "/proc/device-tree/firmware/android/fstab"
if target_file_utils.Exists(fstab, self.shell):
- asserts.assertTrue(target_file_utils.Exists(fstab + "/metadata",
- self.shell))
+ asserts.assertTrue(
+ target_file_utils.Exists(fstab + "/metadata", self.shell),
+ "No metadata found in fstab!")
else:
logging.info("device is not using device tree fstab")
+
if __name__ == "__main__":
test_runner.main()