Fix check target files vintf test.

check_vintf now checks deprecation as well, which
requires matrix fragments to exist. Update tests to
reflect this.

The test also uses legacy vendor manifest path, which makes
it not combined with the ODM manifests, causing sku_compat
test to fail. Fix it by using the new vendor manifest path
(which libvintf correctly combines it with the ODM manifests.)

Fixes: 155131894
Test: python -m unittest test_check_target_files_vintf
Change-Id: Ib660f8796efc3465d9513688695dac29c63a7514
diff --git a/tools/releasetools/test_check_target_files_vintf.py b/tools/releasetools/test_check_target_files_vintf.py
index 79f9018..d326229 100644
--- a/tools/releasetools/test_check_target_files_vintf.py
+++ b/tools/releasetools/test_check_target_files_vintf.py
@@ -35,20 +35,20 @@
     'SYSTEM_EXT/etc/build.prop': '',
 
     # Non-empty files
-    'SYSTEM/compatibility_matrix.xml':"""
-        <compatibility-matrix version="1.0" type="framework">
+    'SYSTEM/etc/vintf/compatibility_matrix.1.xml':"""
+        <compatibility-matrix version="1.0" level="1" type="framework">
             <sepolicy>
                 <sepolicy-version>0.0</sepolicy-version>
                 <kernel-sepolicy-version>0</kernel-sepolicy-version>
             </sepolicy>
         </compatibility-matrix>""",
     'SYSTEM/manifest.xml':
-        '<manifest version="1.0" type="framework" />',
+        '<manifest version="1.0" type="framework"/>',
     'VENDOR/build.prop': 'ro.product.first_api_level=29\n',
     'VENDOR/compatibility_matrix.xml':
         '<compatibility-matrix version="1.0" type="device" />',
-    'VENDOR/manifest.xml':
-        '<manifest version="1.0" type="device"/>',
+    'VENDOR/etc/vintf/manifest.xml':
+        '<manifest version="1.0" target-level="1" type="device"/>',
     'META/misc_info.txt':
         'recovery_api_version=3\nfstab_version=2\nvintf_enforce=true\n',
 }
@@ -140,6 +140,6 @@
   def test_CheckVintf_bad_xml(self):
     test_dir = self.prepare_test_dir('does-not-exist')
     write_string_to_file('not an XML',
-                         os.path.join(test_dir, 'VENDOR/manifest.xml'))
+                         os.path.join(test_dir, 'VENDOR/etc/vintf/manifest.xml'))
     # Should raise an error because a file has invalid format.
     self.assertRaises(common.ExternalError, CheckVintf, test_dir)