MCPcopy Create free account
hub / github.com/pytorch/executorch / assert_cmake_cache

Method assert_cmake_cache

tools/cmake/common/__init__.py:131–143  ·  view source on GitHub ↗
(
        self,
        key: str,
        expected_value: str,
        expected_type: str,
    )

Source from the content-addressed store, hash-verified

129 self.assertTrue(os.path.exists(os.path.join(self.workspace, "cmake-out")))
130
131 def assert_cmake_cache(
132 self,
133 key: str,
134 expected_value: str,
135 expected_type: str,
136 ):
137 cache = CMakeCache(os.path.join(self.workspace, "cmake-out", "CMakeCache.txt"))
138 self.assertEqual(
139 cache.get(key).value, expected_value, f"unexpected value for {key}"
140 )
141 self.assertEqual(
142 cache.get(key).value_type, expected_type, f"unexpected value type for {key}"
143 )

Calls 2

getMethod · 0.95
CMakeCacheClass · 0.90