mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-14 14:26:55 +00:00
58886c3571
Currently there is no testing for ClangTypeParser even though it's used in production. This is because adding integration tests is very hard: they require testing the build time behaviour at runtime, or else they'd be build failures intead of test failures. There's a PR available for integration tests but it's incomplete. In contrast ClangTypeParser can be sort of unit tested. This follows the structure of `test/test_drgn_parser.cpp` with some differences. There is a tonne of boilerplate for setting up the Clang tool, and this set of testing operates on type names instead of OID functions. The new tests are also incredibly slow as they compile the entire `integration_test_target.cpp` (which is huge) for every test case. I don't think this is avoidable without compromising the separation of the tests somewhat due to the way Clang tooling forces the code to be structured. Test plan: - Tested locally - CI |
||
---|---|---|
.. | ||
integration | ||
ci.oid.toml | ||
CMakeLists.txt | ||
integration_entry_doStuff_arg0.oid | ||
integration_entry_doStuff_this.oid | ||
integration_entry_inc_arg0.oid | ||
integration_mttest.cpp | ||
integration_return_incN_arg0.oid | ||
integration_sleepy.cpp | ||
integration.py | ||
main.cpp | ||
mocks.h | ||
mttest.h | ||
test_add_children.cpp | ||
test_add_padding.cpp | ||
test_alignment_calc.cpp | ||
test_codegen.cpp | ||
test_compiler.cpp | ||
test_container_info.cpp | ||
test_drgn_parser.cpp | ||
test_drgn_parser.h | ||
test_enforce_compatibility.cpp | ||
test_flattener.cpp | ||
test_identify_containers.cpp | ||
test_key_capture.cpp | ||
test_name_gen.cpp | ||
test_node_tracker.cpp | ||
test_parser.cpp | ||
test_prune.cpp | ||
test_remove_members.cpp | ||
test_remove_top_level_pointer.cpp | ||
test_topo_sorter.cpp | ||
test_type_identifier.cpp | ||
type_graph_utils.cpp | ||
type_graph_utils.h | ||
TypeGraphParser.cpp | ||
TypeGraphParser.h |