splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Automatically run all tests after building release

Open gablank opened this issue 10 years ago • 2 comments

After building all desired combinations of architectures and compilers we should run all tests. Return value of last command is stored in $? in bash. Catch seems to return 0 when all tests pass, 1 otherwise. Check if this assumption is true before implementing.

gablank avatar Sep 07 '15 13:09 gablank

Hi @gablank , I am a mobile developer and a starter on open source projects. I want to contribute to open source starting with small things as I learn.I found this issue on github with tag beginner.Could you please suggest how I can get started on this issue?

kumarSC avatar Oct 24 '15 09:10 kumarSC

Hello @kumarSC,

We have a script called build_release.sh which builds the library for all combinations of x86 and x86_64 with the available compilers (that we look for). What we want is to extend that script so that after each build it runs the unit tests for that build, then at the end it reports if any tests failed (and in case of a fail, which build failed). You could add a function which looks somewhat like this:

function run_unit_test { ./splinter-test if [ $? -eq 0]; then echo "Unit test passed!" else echo "Unit test failed!" fi }

You need to make sure you call that function after all compiles, and make sure the directory is correct (the script creates a separate directory for each compile, see line 130 for gcc/clang, and line 204 for msvc).

As for getting your changes merged, we prefer pull requests, which you can find information about on the internet. Please note that development is the branch we are currently working on, and master is only ever changed by merging development into it.

I'm in a bit of a hurry, so if any of this didn't make sense please don't hesitate to ask!

Thanks for showing your interest in SPLINTER!

gablank avatar Oct 24 '15 10:10 gablank