I am maintaining a free open-source (3-clause BSD) code checker for c++ files, and to run regression tests on real-world code, I added isolated C++ files from other high-profile open-source projects (such as Chromium, Boost), all of which have different licenses. I only picked 1-2 files from each, so not a whole filetree.
I do not compile or run those source files, I just use them as text input for the linter. Since I keep those files in my repository, I am wondering whether this kind of usage has any chance of becoming a serious legal issue, ever. I guess my tests could instead download those files on each run from some static web location if necessary, but it seems unlikely to me that this is a serious breach of license.