facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Accessing files across directories #2719

Open champak opened 2 years ago

champak commented 2 years ago

Hi folks, I am looking for advice on how tp go “across” dirs with buck/bzl

My files are organized as follows: Foo/tests/< a template test file> Foo/srcs/< source files>

I want to create a test target per source file based off the template test file. I would like to glob the files under srcs from a BZL macro in tests. What is a good way to go about it ? I run into package boundary complaints if I try to glob at the files under srcs from tests. Is there some way tp export files from srcs so they are visible in tests ? I want to be able to process these files in a BZL macro in tests to instantiate the test targets.

Thanks for any pointers !