Page MenuHomePhabricator

Update build system
ClosedPublic

Authored by ardunster on Feb 24 2021, 2:10 PM.

Details

Summary

Update build files and create tester directory and files

Troubleshoot CMake

Rename console directory and fix buildfiles

Test Plan

Builds and has prototype Goldilocks test frame included

Revert Plan

set it on fire

Diff Detail

Repository
rR Ratscript
Lint
Lint Not Applicable

Event Timeline

Restricted Application completed remote builds in Restricted Buildable.Feb 24 2021, 2:10 PM
  • Comment line to get rid of lint error
Restricted Application completed remote builds in Restricted Buildable.Feb 24 2021, 2:13 PM

@jcmcdonald this was way messier than simplexpress, but, after some directory renames and rearranging, make ready and make console and make tester are all functioning as one would expect them to without errors. And on the ++ side, I have the tester ready to install tests to.

Side note, does it work to put the .hpp and .cpp files for individual tests and suites in the tester subdirectory, rather than cluttering up the main source directories with them?

If you want to put your tests in separate directories, I recommend using these locations:

  • ratscript-source/include/ratscript/tests/
  • ratscript-source/src/tests/
  • ratscript-console/include/ratscript-console/tests/
  • ratscript-console/src/

I anticipate you'll need tests for both Ratscript itself and its console, eventually, since both are shippable software.

The weird nesting I'm suggesting gives you some pretty include statements:

#include "ratscript/lexer.hpp"
#include "ratscript/tests/lexer_test.hpp"

That makes sense. I'm curious why you wouldn't put them inside, say, {project}-tester, though?

Because we have the principle of shipping tests with the library or product. If someone only uses the language, and not the console, they still need access to the language's tests.

  • Update cpp properties with directory renames
Restricted Application completed remote builds in Restricted Buildable.Feb 26 2021, 11:56 AM
  • Fix gitignore, restore missing files
Restricted Application completed remote builds in Restricted Buildable.Feb 26 2021, 1:24 PM

I think this is ready for review, assuming I didn't miss something else like git ignoring all my include files 🤦‍♀️ I'm not going to add actual tests here, because this code doesn't have anything worth testing, but once I merge into D383 (undoubtedly going to be a mess with all the renames and added files and so on) I'll add them there.

This revision is now accepted and ready to land.Feb 27 2021, 11:13 AM
This revision was automatically updated to reflect the committed changes.