Multiple jobs are not allowed to persist the same files to a workspace.
This commit takes the lazy approach of splitting the type-graph and
non-type-graph jobs into different workspaces and creating a second
coverage job to avoid the conflict.
These represent types which don't store any interesting data for us to
measure, but which are required by a real container so can not be
replaced with our own generated class types.
std::allocator often has bad DWARF, so it must be replaced after the
DWARF is fixed up in Flattener. The others could be replaced earlier in
the transformation process if desired, but I've left them all together
for simplicity for now.
This fixes the folly::fbstring tests.
CTest can't forward command line arguments to the test runner, so add
the option to using an environment variable to enable features instead.
CMake issue tracking the feature that would have been needed:
https://gitlab.kitware.com/cmake/cmake/-/issues/20470
Tests which aren't passing yet have been disabled in CI.
The worry about doing this earlier was performance, but on a further
reading of the code, both legacy OICodeGen and new DrgnParser have been
calling into drgn_type_fully_qualified_name() for every class for a long
time already.
We want to use the fully qualified name for scoped enums to keep the C++
compiler happy. When a parameter expects an enum value, we must supply
an enum value and not its underlying integer value.
Before:
isset_bitset<1, 0>
After:
isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked>
The C++ compiler generates implicit branches for exception handling,
which is particularly common when calling standard library functions.
It's not generally useful to have tests for the case when
std::vector::push_back fails due to an out-of-memory condition, so in
this PR we use a feature in the latest lcov release to filter out these
compiler-generated branches.
Our code coverage numbers consequently go way up!
Multi dimensional arrays are not flattened into 1-D arrays when using
TypeGraph. Update TreeBuilder to account for this.
By not flattening arrays, we are able to produce more descriptive
results.
The disadvantage is that we must now recurse inside arrays
containing only primitives. A better solution to requiring flattening
would be the planned work to not recurse into any static types (not just
primitives). This would also apply to multi-dimensional arrays of
primtivies.
When we were previously removing allocators, we were only able to work
with containers whose allocators appeared as their last template
parameter.
Now we can replace allocators in the middle of a parameter list.
This fixes tests for folly::sorted_vector_set.