Suppose that:
- I have an open source project with a permissive license (MIT or Apache);
- This project builds two targets:
- A library object code file that other, dependent programs would link to;
- An executable unit test suite that other programs would not link to;
- The unit test suite links to a GPL-licensed library;
- The library object code that other object code programs would link to does not.
- The unit test's source code is embedded in the same source files as the main library code, albeit it's clearly delimited as separate modules from the main library.
Could my project be considered a derived work of the GPL library even if I only use the latter in the test suite? Some details that might be relevant:
- My library is a collection of random number generators, and it obeys a standard external interface specified by my programming language;
- The GPL library in question is one that is written for testing random number generators generically (can be used to test any random number generator).
- I could trivially write a separate, third program that links both my MIT library and the 3rd party GPL one and runs the latter's tests with the output from the former. What linking to the GPL library from my library's unit test suite would do is just automate this and make the process more convenient.