Testing CG/SQL

Testing CG/SQL

Basic testing commands you should know.

While standing in the /sources directory you may use test.sh and with these important options.

CommandDetails
./test.shBuild the compiler and run the suite. This is the bread an butter of the dev cycle.
--use_amalgamBuild the compiler from the amalgam and then tests it as above.
--use_asanEnable address sanitizer. Great for finding memory safety issues.
--use_clangClang finds more warnings than GCC in general, recommened before any PR.
--use_gccIf cc maps to clang, you should also try gcc before any PR.
--non_interactiveUsed when calling from a script file. Disables prompting for diffs.
--coverageTriggers coverage options needed by cov.sh. Not intended for direct use.
cov.shSee Code Coverage

See details in our Developer Guide

NOTE: For productivity it’s not uncommon to tweak test.sh so that the test you care about runs first. But don’t submit a PR with the tests reordered. Not that the author has ever made that mistake or anything. But it could happen – you know – to other people…