Page MenuHomeWildfire Games

Refactor the CxxTest premake module
ClosedPublic

Authored by Itms on Dec 1 2017, 2:55 PM.

Details

Summary

This differential goes further from the change in D1068 and refactors the CxxTest premake module to avoid shortcomings. It includes proper links to current issues with pre-build commands. It is also designed to be extended into a fully-fledged CxxTest module for use outside 0 A.D.

Test Plan
  • On Windows, with and without PCH
  • On Linux, with and without PCH, with -j N where N is the maximum you can afford, with and without --jenkins-tests
  • On Mac, with and without PCH, with gmake and xcode

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Itms created this revision.Dec 1 2017, 2:55 PM
Vulcan added a subscriber: Vulcan.Dec 1 2017, 3:07 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Dec 1 2017, 3:09 PM
Executing section Default...
Executing section Source...
Executing section JS...
elexis added a comment.Dec 1 2017, 3:50 PM

I didn't look at the patch, but it allows me to compile with gcc 6 with precompiled headers following one of the VS2015 compatibility commits.
I believe I had this one when compiling with clang too and don't have it anymore make[1]: *** No rule to make target '../../../source/test_root.cpp', needed by 'obj/test_Release/test_root.o'. Stop.. (But I don't know which revisions were involved.)

Imarok added a subscriber: Imarok.Dec 4 2017, 12:17 PM
In D1092#43322, @elexis wrote:

I didn't look at the patch, but it allows me to compile with gcc 6 with precompiled headers following one of the VS2015 compatibility commits.
I believe I had this one when compiling with clang too and don't have it anymore make[1]: *** No rule to make target '../../../source/test_root.cpp', needed by 'obj/test_Release/test_root.o'. Stop.. (But I don't know which revisions were involved.)

Same for me with gcc5

elexis added a comment.Dec 4 2017, 1:59 PM

19:08 <@Itms> bb1: as elexis said, is it fixed by D1092?
19:08 <@Itms> (if yes you can accept the patch ;) )

I testify that I witnessed being able to compile again and would be happy to be able to do that. But the code "is all Greek to me", hence not a correct, nor a complete, hence not a review.
So I can accept a commit of this patch it in the Wikipedia definition "a person's assent to the reality of a situation".
But so far I have only pressed the Accept button Phabricator if I have read, understood a patch and at least considered correctness and completeness (except once and that turned out to be a mistake).
If we don't require the reader to comprehend the text in front of him, why do we even require anyone pressing the green checkbox?

bb added a subscriber: bb.Dec 8 2017, 10:17 PM
bb added inline comments.
build/premake/cxxtest/cxxtest.lua
41–42 ↗(On Diff #4475)

now we seem to get this message on every build, also when nothing changed, so we don't need to generate a new file (it would be the same no?)

Itms added a comment.Dec 8 2017, 10:27 PM

Thanks for testing everyone!

In D1092#43973, @elexis wrote:

If we don't require the reader to comprehend the text in front of him, why do we even require anyone pressing the green checkbox?

Don't torture yourself over this. I do not request a review from you, I just wanted to make sure it fixed your issue. @wraitii is the one who would be able to review this, but if he doesn't have time I'll rely upon the fact that three different team members tested it and experienced no other bugs, and I'll commit.

build/premake/cxxtest/cxxtest.lua
41–42 ↗(On Diff #4475)

Actually this was already the case before (the root file is always generated each time), but the fact that the generation command is displayed is an issue with Premake: https://github.com/premake/premake-core/issues/954

Itms updated this revision to Diff 4690.Dec 10 2017, 10:57 AM

Use the Utility workaround only with gmake, as it doesn't work with XCode and is useless and noisy with Visual Studio.

wraitii accepted this revision.Dec 10 2017, 11:34 AM

Behaves on gcc and xCode still needs the build commands to run so that doesn't change.

This revision is now accepted and ready to land.Dec 10 2017, 11:34 AM
This revision was automatically updated to reflect the committed changes.

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...