Fixed shaders compiler test on linux and possibly windows

This commit is contained in:
MapsWithMe OSM User 2014-01-20 18:37:13 +01:00 committed by Alex Zolotarev
parent 526ead510e
commit 2135c325cf
4 changed files with 15 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -4,10 +4,23 @@
#include "../../platform/platform.hpp"
#include "../../std/sstream.hpp"
#include "../../std/target_os.hpp"
#include <QtCore/QProcess>
#include <QtCore/QTextStream>
#if defined (OMIM_OS_MAC)
#define SHADERS_COMPILER "GLSLESCompiler_Series5.mac"
#elif defined (OMIM_OS_LINUX)
#define SHADERS_COMPILER "GLSLESCompiler_Series5"
#elif defined (OMIM_OS_WINDOWS)
#define SHADERS_COMPILER "GLSLESCompiler_Series5.exe"
#else
#error "Define shaders compiler for your platform"
#endif
string DebugPrint(QString const & s)
{
return s.toStdString();
@ -16,10 +29,10 @@ string DebugPrint(QString const & s)
UNIT_TEST(CompileShaders_Test)
{
Platform & platform = GetPlatform();
string glslCompilerPath = platform.ResourcesDir() + "glslcompiler_sgx535";
string glslCompilerPath = platform.ResourcesDir() + "shaders_compiler/" SHADERS_COMPILER;
if (!platform.IsFileExistsByFullPath(glslCompilerPath))
{
glslCompilerPath = platform.WritableDir() + "glslcompiler_sgx535";
glslCompilerPath = platform.WritableDir() + "shaders_compiler/" SHADERS_COMPILER;
if (!platform.IsFileExistsByFullPath(glslCompilerPath))
TEST_EQUAL(false, true, ("GLSL compiler not found"));
}