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.


Just keep the licenses of the files as-is.

Make a clear statement and indication that separate licenses and attribution apply to the files used for regression tests as indicated in either the files respectively (I'd choose that) or a separate file you maintain where you state license and attribution by file.

Of course you may not violate the terms of those licenses - but you are distributing them unmodified as source with their license - that does not pose a problem with any open source license (if it does, it's not open source).

I assume building your binary (without regression testing) does not require any of these files. Thus your own code and distribution of binaries is not affected by the license of the files in the regression tests. It can have any license iff your distributed binaries don't depend on the regression tests in your repository; thus the regression tests are a mere tool you use to develop your programme and verify its quality and providing them along with your source is thus a service to developers of your programme.

  • Thanks I will make sure to copy the licenses for each snippet.
    – tkruse
    Apr 1 '20 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.