1import("//third-party/unittest/unittest.gni") 2 3unittest("DebugInfoPDBTests") { 4 deps = [ 5 "//llvm/lib/DebugInfo/CodeView", 6 "//llvm/lib/DebugInfo/MSF", 7 "//llvm/lib/DebugInfo/PDB", 8 "//llvm/lib/Testing/Support", 9 ] 10 sources = [ 11 "HashTableTest.cpp", 12 "NativeSessionTest.cpp", 13 "NativeSymbolReuseTest.cpp", 14 "PDBApiTest.cpp", 15 "StringTableBuilderTest.cpp", 16 ] 17 18 # DebugInfoPDBTests uses llvm::getInputFileDirectory(), which expects 19 # a file called llvm.srcdir.txt next to the test executable that contains 20 # the path of the source directory (which contains this file). 21 # lit doesn't change the cwd while running googletests, so the cwd isn't 22 # well-defined. This means this has to be an absolute path. 23 # FIXME: This doesn't work with swarming. This should really be a data 24 # dependency, and the cwd while tests requiring input files run should 25 # be required to be some fixed directory. 26 # FIXME: Also, the GN way is to write this file at build time. But since 27 # there's only two uses of this, and since this is a pattern that hopefully 28 # will disappear again, and since it doesn't have any measurable performance 29 # hit, write the file at GN time. 30 # Note: This line here implicitly depends on unittest() setting output_dir to 31 # target_out_dir. 32 write_file("$target_out_dir/llvm.srcdir.txt", rebase_path(".")) 33} 34