[erlang-questions] A PropEr announcement
Thu Jun 16 10:30:59 CEST 2011
On 2011-06-16 08:43, Max Lapshin wrote:
> Of course, tests aren't covered with the same license.
> GCC is licensed under GPL. You are writing C code, which has ifdefs
> for GCC and for MSVC. How can you imagine, that someone will order you
> to release your program under GPL?
> PropEr is just a tool. If you distribute this tool, you must share
> sources. You may sell it, but with opened sources. But you don't have
> any restrictions about files, that this tool works with.
This is pretty simple: to a compiler, the source code you write are just
input, and the resulting object files are just output, and these are not
affected in any way by the licensing of the compiler itself, just like
editing a photo in GIMP has no legal implications on the resulting image
There is one exception: if the generated object code contains
significant portions of code copied from templates that belong to the
compiler - then the license of the templates applies to the generated
object code. The GNU Bison parser is such a case: see
for their explanation of how they originally used GPL for the template
code as well, but later dropped that so it could be used freely by anyone.
(This also applies to code fragments in included header files - the
guideline is that macros of up to 10 lines of code are not considered
significant, but if they are larger, the author of the header file
should consider adding an exception to the license - I have done that in
EUnit - or use different licensing for the header files in order to
avoid tainting users' code.)
But in a test framework, you often write code (your tests) which calls
out to the test framework library code. In this respect, test code is no
different from, say, scientific code that calls a math library. The
resulting code, after linking (statically or at run-time) is a work
based on the code of the test framework.
I guess that if the test code is written solely as callbacks, as done in
the Common Test style of test suites, the situation is less clear.
More information about the erlang-questions