This is an archive of the discontinued LLVM Phabricator instance.

Make things less hard coded
Needs ReviewPublic

Authored by hnrklssn on Aug 29 2023, 5:55 AM.

Details

Reviewers
xgupta
Summary

[patch-coverage] return to cwd after building

Updates paths to be relative to the build directory or the root
directory.

[patch-coverage] Use lit to determine test vs source code

Instead of just checking for "test" in the path and whether the filename
ends with ".ll", call lit and parse the output to determine which files
are test files.

[patch-coverage] Pass build directory and test paths as CLI args

Instead of hard-coding the build directory as "build" and test
directories as "llvm/test" and "clang/test", let the user pass them to
the CLI. Build directory is passed using -b or --build-dir, while one or
more paths to test files or directories containing tests should be
passed as positional arguments.

[patch-coverage] don't overwrite user's build config

Instead of completely reconfiguring the build directory, expect that the
user has configured it in line with their needs, and simply amend the
config to generate source coverage.

Diff Detail

Unit TestsFailed