D.gnu - [Bug 199] New: unittests not linked unless module is imported
- via D.gnu (30/30) Sep 21 2015 Date: Mon, 21 Sep 2015 11:29:03 +0100
Date: Mon, 21 Sep 2015 11:29:03 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" http://bugzilla.gdcproject.org/show_bug.cgi?id=199 Bug ID: 199 Summary: unittests not linked unless module is imported Product: GDC Version: 4.9.x Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: Normal Component: gdc Assignee: ibuclaw gdcproject.org Reporter: alex sunopti.com I have a build system that makes a static library with a bunch of code, and then links it into several executables. If I add a new module with unittest{ } section and compile it into the static library, the unittests are not run by any of the executables unless the module is referenced somewhere. All compiled with -funittest switch. I suspect this is behaviour gdc has inherited from the linker. gdc should probably force all modules with unittests to be linked in. This should be a supported development path: write code, test it, integrate it. Because the code is compiled etc, it can take some time to figure out that the tests are not being run, and it is not obvious why. -- You are receiving this mail because: You are watching all bug changes.
Sep 21 2015