Sigma icon indicating copy to clipboard operation
Sigma copied to clipboard

Auto build of GTests and Travis building and executing it

Open Zardoz89 opened this issue 11 years ago • 1 comments

Change how GTests are build. Now uses ENV variable to know were is GTest source/include/lib (GTEST_ROOT env. variable). Also, now CMake flag BUILD_TESTS_Sigma (-DBUILD_TESTS_Sigma) enables/disables building tests (by default is true), and Travis should now build it and execute it. The side effect of this is that is necessary set this environment variable if someone desired to generate the unit tests. In Linux/Mac should be like (could be put in ~/.bashrc or similar file in Mac) :

$> GTEST_ROOT=/usr/src/gtest/
$> export GTEST_ROOT

In Windows, In Control Panel / System there is place to set-up env. variables.

I apply this to Virtual Computer repository and is working very fine (See: https://travis-ci.org/trillek-team/trillek-tr3200-vm). The only thing that I don't know very well, is how will work in Windows. In the worst case, will advice that can't fin these environment variable, and will not generate the tests. Also, I renamed a bit some stuff in the main CMakeLists.txt, to clarify that the files in /src/tests (now /src/execs) are executables.

Finally, I must comment a few lines in /include/resources/Texture.h as GL_MIRROR_CLAMP_TO_EDGE is not in OpenGL 3.2 core, and gives a compile error on Linux.

Zardoz89 avatar Mar 06 '14 22:03 Zardoz89

This was happening before my patch. I only not noticed because I was initially compiling without CEF. Also, with the latest stable version of CEF there is other problems compiling, like wrong signature of some functions. I can try to open other branch to fix it.

In file included from /home/travis/build/adam4813/Sigma/src/components/WebGUIComponent.cpp:1:0:

/home/travis/build/adam4813/Sigma/include/components/WebGUIComponent.h:13:9: error: forward declaration of ‘class Sigma::resource::Texture’

class Texture;

Zardoz89 avatar Mar 07 '14 06:03 Zardoz89