@@ -44,6 +44,7 @@ def _test_py_cc_toolchain_impl(env, target):
4444 )
4545 toolchain .python_version ().equals ("3.999" )
4646
47+ # ===== Verify headers info =====
4748 headers_providers = toolchain .headers ().providers_map ()
4849 headers_providers .keys ().contains_exactly (["CcInfo" , "DefaultInfo" ])
4950
@@ -68,6 +69,32 @@ def _test_py_cc_toolchain_impl(env, target):
6869 matching .str_matches ("*/cc_toolchains/data.txt" ),
6970 )
7071
72+ # ===== Verify headers_abi3 info =====
73+ headers_abi3_providers = toolchain .headers_abi3 ().providers_map ()
74+ headers_abi3_providers .keys ().contains_exactly (["CcInfo" , "DefaultInfo" ])
75+
76+ cc_info = headers_abi3_providers .get ("CcInfo" , factory = cc_info_subject )
77+
78+ compilation_context = cc_info .compilation_context ()
79+ compilation_context .direct_headers ().contains_exactly ([
80+ env .ctx .file .header ,
81+ ])
82+ compilation_context .direct_public_headers ().contains_exactly ([
83+ env .ctx .file .header ,
84+ ])
85+
86+ # NOTE: The include dir gets added twice, once for the source path,
87+ # and once for the config-specific path, but we don't care about that.
88+ compilation_context .system_includes ().contains_at_least_predicates ([
89+ matching .str_matches ("*/fake_include" ),
90+ ])
91+
92+ default_info = headers_abi3_providers .get ("DefaultInfo" , factory = subjects .default_info )
93+ default_info .runfiles ().contains_predicate (
94+ matching .str_matches ("*/cc_toolchains/data.txt" ),
95+ )
96+
97+ # ===== Verify libs info =====
7198 libs_providers = toolchain .libs ().providers_map ()
7299 libs_providers .keys ().contains_exactly (["CcInfo" , "DefaultInfo" ])
73100
0 commit comments