This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Add build file for DebugInfoPDBTests
ClosedPublic

Authored by thakis on Jan 4 2019, 10:59 AM.

Details

Summary

I'm pretty unhappy this patch. DebugInfoPDBTests uses an API that requires some magic txt file to be next to the unit test executable that stores the absolute path to the LLVM source root. The choices here are:

  1. Don't use the unittest() template for DebugInfoPDBTests and set output_dir for unit tests in two places (the gni file for every test but this one, and the BUILD.gn file for this specific test).
  1. Add a 3rd unittest_foo() template variation for this one test.

I went with the former, and added a comment to the template to look out for this.

(The CMake build has the same issue.)

Diff Detail

Repository
rL LLVM

Event Timeline

It looks like I need to add knowledge about the tests going in target_out_dir in two other places, so I think I'll remove the new template() here and put this directly in the build file of the test, and just add a comment in the gni file along the lines of If you change output_dir, look through git grep target_out_dir '*/unittests/*'`.

thakis updated this revision to Diff 180308.Jan 4 2019, 1:10 PM
thakis edited the summary of this revision. (Show Details)

no template

phosek accepted this revision.Jan 4 2019, 4:03 PM

LGTM but don't forget to update the message.

This revision is now accepted and ready to land.Jan 4 2019, 4:03 PM
This revision was automatically updated to reflect the committed changes.