mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-31 16:04:27 +02:00
merge develop
This commit is contained in:
commit
d63c8afbb8
1
.gitignore
vendored
1
.gitignore
vendored
@ -77,6 +77,7 @@ Thumbs.db
|
|||||||
*.suo
|
*.suo
|
||||||
*.sdf
|
*.sdf
|
||||||
*.opensdf
|
*.opensdf
|
||||||
|
*.opendb
|
||||||
*.tlb
|
*.tlb
|
||||||
*.tlh
|
*.tlh
|
||||||
*.ilk
|
*.ilk
|
||||||
|
@ -26,6 +26,7 @@ services:
|
|||||||
- mongodb
|
- mongodb
|
||||||
- redis-server
|
- redis-server
|
||||||
- postgresql
|
- postgresql
|
||||||
|
- mysql
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.3"
|
postgresql: "9.3"
|
||||||
@ -45,6 +46,7 @@ before_script:
|
|||||||
- sqlite3 -version
|
- sqlite3 -version
|
||||||
- chmod 755 ./travis/Linux/runtests.sh
|
- chmod 755 ./travis/Linux/runtests.sh
|
||||||
- chmod 755 ./travis/OSX/runtests.sh
|
- chmod 755 ./travis/OSX/runtests.sh
|
||||||
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql -u root -e 'create database pocotestdb;'; fi
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -55,7 +55,6 @@ SessionImpl::SessionImpl(const std::string& connectionString, std::size_t loginT
|
|||||||
addProperty("insertId", &SessionImpl::setInsertId, &SessionImpl::getInsertId);
|
addProperty("insertId", &SessionImpl::setInsertId, &SessionImpl::getInsertId);
|
||||||
setProperty("handle", static_cast<MYSQL*>(_handle));
|
setProperty("handle", static_cast<MYSQL*>(_handle));
|
||||||
open();
|
open();
|
||||||
setConnectionTimeout(CONNECTION_TIMEOUT_DEFAULT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|x64">
|
<ProjectConfiguration Include="debug_shared|x64">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<RootNamespace>TestSuite</RootNamespace>
|
<RootNamespace>TestSuite</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@ -63,27 +63,27 @@
|
|||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros"/>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||||
@ -136,7 +136,7 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@ -167,9 +167,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -196,7 +196,7 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@ -227,9 +227,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -256,7 +256,7 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@ -287,9 +287,9 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat />
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -304,16 +304,22 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="src\MySQLTest.h"/>
|
<ClInclude Include="src\MySQLTest.h" />
|
||||||
<ClInclude Include="src\MySQLTestSuite.h"/>
|
<ClInclude Include="src\MySQLTestSuite.h" />
|
||||||
<ClInclude Include="src\SQLExecutor.h"/>
|
<ClInclude Include="src\SQLExecutor.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\Driver.cpp"/>
|
<ClCompile Include="src\Driver.cpp" />
|
||||||
<ClCompile Include="src\MySQLTest.cpp"/>
|
<ClCompile Include="src\MySQLTest.cpp" />
|
||||||
<ClCompile Include="src\MySQLTestSuite.cpp"/>
|
<ClCompile Include="src\MySQLTestSuite.cpp" />
|
||||||
<ClCompile Include="src\SQLExecutor.cpp"/>
|
<ClCompile Include="src\SQLExecutor.cpp">
|
||||||
|
<PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</PreprocessToFile>
|
||||||
|
<PreprocessKeepComments Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</PreprocessKeepComments>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<ItemGroup>
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<None Include="obj64\TestSuite\release_shared\SQLExecutor.i" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -51,4 +51,9 @@
|
|||||||
<Filter>_Driver\Source Files</Filter>
|
<Filter>_Driver\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="obj64\TestSuite\release_shared\SQLExecutor.i">
|
||||||
|
<Filter>MySQL\Source Files</Filter>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -13,6 +13,7 @@
|
|||||||
#include "MySQLTest.h"
|
#include "MySQLTest.h"
|
||||||
#include "Poco/CppUnit/TestCaller.h"
|
#include "Poco/CppUnit/TestCaller.h"
|
||||||
#include "Poco/CppUnit/TestSuite.h"
|
#include "Poco/CppUnit/TestSuite.h"
|
||||||
|
#include "Poco/Environment.h"
|
||||||
#include "Poco/String.h"
|
#include "Poco/String.h"
|
||||||
#include "Poco/Format.h"
|
#include "Poco/Format.h"
|
||||||
#include "Poco/Tuple.h"
|
#include "Poco/Tuple.h"
|
||||||
@ -33,6 +34,7 @@ using Poco::Data::MySQL::ConnectionException;
|
|||||||
using Poco::Data::MySQL::Utility;
|
using Poco::Data::MySQL::Utility;
|
||||||
using Poco::Data::MySQL::StatementException;
|
using Poco::Data::MySQL::StatementException;
|
||||||
using Poco::format;
|
using Poco::format;
|
||||||
|
using Poco::Environment;
|
||||||
using Poco::NotFoundException;
|
using Poco::NotFoundException;
|
||||||
using Poco::Int32;
|
using Poco::Int32;
|
||||||
using Poco::Nullable;
|
using Poco::Nullable;
|
||||||
@ -44,21 +46,39 @@ Poco::SharedPtr<SQLExecutor> MySQLTest::_pExecutor = 0;
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Parameters for barebone-test
|
// Parameters for barebone-test
|
||||||
#define MYSQL_USER "root"
|
|
||||||
#define MYSQL_PWD "poco"
|
std::string MySQLTest::getHost()
|
||||||
#define MYSQL_HOST "localhost"
|
{
|
||||||
#define MYSQL_PORT 3306
|
return "localhost";
|
||||||
#define MYSQL_DB "pocotestdb"
|
}
|
||||||
|
std::string MySQLTest::getPort()
|
||||||
|
{
|
||||||
|
return "3306";
|
||||||
|
}
|
||||||
|
std::string MySQLTest::getUser()
|
||||||
|
{
|
||||||
|
return "root";
|
||||||
|
}
|
||||||
|
std::string MySQLTest::getPass()
|
||||||
|
{
|
||||||
|
if (Environment::has("APPVEYOR"))
|
||||||
|
return "Password12!";
|
||||||
|
else if (Environment::has("TRAVIS"))
|
||||||
|
return "";
|
||||||
|
else
|
||||||
|
return "poco";
|
||||||
|
}
|
||||||
|
std::string MySQLTest::getBase()
|
||||||
|
{
|
||||||
|
return "pocotestdb";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string MySQLTest::_dbConnString;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Connection string
|
// Connection string
|
||||||
std::string MySQLTest::_dbConnString = "host=" MYSQL_HOST
|
|
||||||
";user=" MYSQL_USER
|
|
||||||
";password=" MYSQL_PWD
|
|
||||||
";db=" MYSQL_DB
|
|
||||||
";compress=true"
|
|
||||||
";auto-reconnect=true"
|
|
||||||
";secure-auth=true";
|
|
||||||
|
|
||||||
|
|
||||||
MySQLTest::MySQLTest(const std::string& name):
|
MySQLTest::MySQLTest(const std::string& name):
|
||||||
@ -84,17 +104,18 @@ void MySQLTest::dbInfo(Session& session)
|
|||||||
|
|
||||||
void MySQLTest::connectNoDB()
|
void MySQLTest::connectNoDB()
|
||||||
{
|
{
|
||||||
std::string dbConnString = "host=" MYSQL_HOST
|
std::string dbConnString;
|
||||||
";user=" MYSQL_USER
|
dbConnString = "host=" + getHost();
|
||||||
";password=" MYSQL_PWD
|
dbConnString += ";user=" + getUser();
|
||||||
";compress=true;auto-reconnect=true";
|
dbConnString += ";password=" + getPass();
|
||||||
|
dbConnString += ";compress=true;auto-reconnect=true";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Session session(MySQL::Connector::KEY, dbConnString);
|
Session session(MySQL::Connector::KEY, dbConnString);
|
||||||
std::cout << "Connected to [" << "MySQL" << "] without database." << std::endl;
|
std::cout << "Connected to [" << "MySQL" << "] without database." << std::endl;
|
||||||
dbInfo(session);
|
dbInfo(session);
|
||||||
session << "CREATE DATABASE IF NOT EXISTS " MYSQL_DB ";", now;
|
session << "CREATE DATABASE IF NOT EXISTS " + getBase() + ";", now;
|
||||||
std::cout << "Disconnecting ..." << std::endl;
|
std::cout << "Disconnecting ..." << std::endl;
|
||||||
session.close();
|
session.close();
|
||||||
std::cout << "Disconnected." << std::endl;
|
std::cout << "Disconnected." << std::endl;
|
||||||
@ -117,7 +138,7 @@ void MySQLTest::testBareboneMySQL()
|
|||||||
"Fourth INTEGER,"
|
"Fourth INTEGER,"
|
||||||
"Fifth FLOAT)";
|
"Fifth FLOAT)";
|
||||||
|
|
||||||
_pExecutor->bareboneMySQLTest(MYSQL_HOST, MYSQL_USER, MYSQL_PWD, MYSQL_DB, MYSQL_PORT, tableCreateString.c_str());
|
_pExecutor->bareboneMySQLTest(getHost(), getUser(), getPass(), getBase(), getPort(), tableCreateString.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -837,6 +858,14 @@ CppUnit::Test* MySQLTest::suite()
|
|||||||
{
|
{
|
||||||
MySQL::Connector::registerConnector();
|
MySQL::Connector::registerConnector();
|
||||||
|
|
||||||
|
_dbConnString = "host=" + getHost();
|
||||||
|
_dbConnString += ";user=" + getUser();
|
||||||
|
_dbConnString += ";password=" + getPass();
|
||||||
|
_dbConnString += ";db=" + getBase();
|
||||||
|
_dbConnString += ";compress=true";
|
||||||
|
_dbConnString += ";auto-reconnect=true";
|
||||||
|
_dbConnString += ";secure-auth=true";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_pSession = new Session(MySQL::Connector::KEY, _dbConnString);
|
_pSession = new Session(MySQL::Connector::KEY, _dbConnString);
|
||||||
|
@ -128,6 +128,11 @@ private:
|
|||||||
|
|
||||||
static void dbInfo(Poco::Data::Session& session);
|
static void dbInfo(Poco::Data::Session& session);
|
||||||
|
|
||||||
|
static std::string getHost();
|
||||||
|
static std::string getPort();
|
||||||
|
static std::string getUser();
|
||||||
|
static std::string getPass();
|
||||||
|
static std::string getBase();
|
||||||
static std::string _dbConnString;
|
static std::string _dbConnString;
|
||||||
static Poco::SharedPtr<Poco::Data::Session> _pSession;
|
static Poco::SharedPtr<Poco::Data::Session> _pSession;
|
||||||
static Poco::SharedPtr<SQLExecutor> _pExecutor;
|
static Poco::SharedPtr<SQLExecutor> _pExecutor;
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include "Poco/CppUnit/TestCase.h"
|
#include "Poco/CppUnit/TestCase.h"
|
||||||
#include "SQLExecutor.h"
|
#include "SQLExecutor.h"
|
||||||
|
#include "Poco/NumberParser.h"
|
||||||
#include "Poco/String.h"
|
#include "Poco/String.h"
|
||||||
#include "Poco/Format.h"
|
#include "Poco/Format.h"
|
||||||
#include "Poco/Tuple.h"
|
#include "Poco/Tuple.h"
|
||||||
@ -27,10 +27,6 @@
|
|||||||
#include "Poco/Data/MySQL/Connector.h"
|
#include "Poco/Data/MySQL/Connector.h"
|
||||||
#include "Poco/Data/MySQL/MySQLException.h"
|
#include "Poco/Data/MySQL/MySQLException.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <Winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -43,6 +39,7 @@ using Poco::Data::MySQL::StatementException;
|
|||||||
using Poco::format;
|
using Poco::format;
|
||||||
using Poco::Tuple;
|
using Poco::Tuple;
|
||||||
using Poco::DateTime;
|
using Poco::DateTime;
|
||||||
|
using Poco::NumberParser;
|
||||||
using Poco::Any;
|
using Poco::Any;
|
||||||
using Poco::AnyCast;
|
using Poco::AnyCast;
|
||||||
using Poco::NotFoundException;
|
using Poco::NotFoundException;
|
||||||
@ -155,13 +152,13 @@ SQLExecutor::~SQLExecutor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLExecutor::bareboneMySQLTest(const char* host, const char* user, const char* pwd, const char* db, int port, const char* tableCreateString)
|
void SQLExecutor::bareboneMySQLTest(const std::string& host, const std::string& user, const std::string& pwd, const std::string& db, const std::string& port, const char* tableCreateString)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
MYSQL* hsession = mysql_init(0);
|
MYSQL* hsession = mysql_init(0);
|
||||||
assert (hsession != 0);
|
assert (hsession != 0);
|
||||||
|
|
||||||
MYSQL* tmp = mysql_real_connect(hsession, host, user, pwd, db, port, 0, 0);
|
MYSQL* tmp = mysql_real_connect(hsession, host.c_str(), user.c_str(), pwd.c_str(), db.c_str(), NumberParser::parse(port), 0, 0);
|
||||||
assert(tmp == hsession);
|
assert(tmp == hsession);
|
||||||
|
|
||||||
MYSQL_STMT* hstmt = mysql_stmt_init(hsession);
|
MYSQL_STMT* hstmt = mysql_stmt_init(hsession);
|
||||||
|
@ -38,7 +38,7 @@ public:
|
|||||||
SQLExecutor(const std::string& name, Poco::Data::Session* _pSession);
|
SQLExecutor(const std::string& name, Poco::Data::Session* _pSession);
|
||||||
~SQLExecutor();
|
~SQLExecutor();
|
||||||
|
|
||||||
void bareboneMySQLTest(const char* host, const char* user, const char* pwd, const char* db, int port, const char* tableCreateString);
|
void bareboneMySQLTest(const std::string& host, const std::string& user, const std::string& pwd, const std::string& db, const std::string& port, const char* tableCreateString);
|
||||||
/// This function uses "bare bone" MySQL API calls (i.e. calls are not
|
/// This function uses "bare bone" MySQL API calls (i.e. calls are not
|
||||||
/// "wrapped" in PocoData framework structures).
|
/// "wrapped" in PocoData framework structures).
|
||||||
/// The purpose of the function is to verify that driver behaves
|
/// The purpose of the function is to verify that driver behaves
|
||||||
|
@ -83,7 +83,7 @@ std::string PostgreSQLTest::getBase(){
|
|||||||
std::string PostgreSQLTest::getUser(){
|
std::string PostgreSQLTest::getUser(){
|
||||||
return "postgres";
|
return "postgres";
|
||||||
}
|
}
|
||||||
std::string PostgreSQLTest::getPassword(){
|
std::string PostgreSQLTest::getPass(){
|
||||||
if (Environment::has("APPVEYOR"))
|
if (Environment::has("APPVEYOR"))
|
||||||
{
|
{
|
||||||
return "Password12!";
|
return "Password12!";
|
||||||
@ -123,7 +123,7 @@ void PostgreSQLTest::testConnectNoDB()
|
|||||||
std::string dbConnString;
|
std::string dbConnString;
|
||||||
dbConnString += "host=" + getHost();
|
dbConnString += "host=" + getHost();
|
||||||
dbConnString += " user=" + getUser();
|
dbConnString += " user=" + getUser();
|
||||||
dbConnString += " password=" + getPassword();
|
dbConnString += " password=" + getPass();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -293,7 +293,7 @@ void PostgreSQLTest::testPostgreSQLOIDs()
|
|||||||
142
|
142
|
||||||
};
|
};
|
||||||
|
|
||||||
_pExecutor->oidPostgreSQLTest(getHost(), getUser(), getPassword(), getBase(), getPort(), tableCreateString.c_str(), OIDArray);
|
_pExecutor->oidPostgreSQLTest(getHost(), getUser(), getPass(), getBase(), getPort(), tableCreateString.c_str(), OIDArray);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1047,7 +1047,7 @@ CppUnit::Test* PostgreSQLTest::suite()
|
|||||||
|
|
||||||
_dbConnString += "host=" + getHost();
|
_dbConnString += "host=" + getHost();
|
||||||
_dbConnString += " user=" + getUser();
|
_dbConnString += " user=" + getUser();
|
||||||
_dbConnString += " password=" + getPassword();
|
_dbConnString += " password=" + getPass();
|
||||||
_dbConnString += " dbname=" + getBase();
|
_dbConnString += " dbname=" + getBase();
|
||||||
_dbConnString += " port=" + getPort();
|
_dbConnString += " port=" + getPort();
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ private:
|
|||||||
static std::string getPort();
|
static std::string getPort();
|
||||||
static std::string getBase();
|
static std::string getBase();
|
||||||
static std::string getUser();
|
static std::string getUser();
|
||||||
static std::string getPassword();
|
static std::string getPass();
|
||||||
|
|
||||||
static std::string _dbConnString;
|
static std::string _dbConnString;
|
||||||
static Poco::SharedPtr<Poco::Data::Session> _pSession;
|
static Poco::SharedPtr<Poco::Data::Session> _pSession;
|
||||||
|
0
PocoDoc/resources/js/iframeResizer.contentWindow.js
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.contentWindow.js
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.contentWindow.min.js
vendored
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.contentWindow.min.js
vendored
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.js
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.js
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.min.js
vendored
Executable file → Normal file
0
PocoDoc/resources/js/iframeResizer.min.js
vendored
Executable file → Normal file
0
SevenZip/src/7z.h
Executable file → Normal file
0
SevenZip/src/7z.h
Executable file → Normal file
0
SevenZip/src/7zAlloc.c
Executable file → Normal file
0
SevenZip/src/7zAlloc.c
Executable file → Normal file
0
SevenZip/src/7zAlloc.h
Executable file → Normal file
0
SevenZip/src/7zAlloc.h
Executable file → Normal file
0
SevenZip/src/7zBuf.c
Executable file → Normal file
0
SevenZip/src/7zBuf.c
Executable file → Normal file
0
SevenZip/src/7zBuf.h
Executable file → Normal file
0
SevenZip/src/7zBuf.h
Executable file → Normal file
0
SevenZip/src/7zBuf2.c
Executable file → Normal file
0
SevenZip/src/7zBuf2.c
Executable file → Normal file
0
SevenZip/src/7zCrc.c
Executable file → Normal file
0
SevenZip/src/7zCrc.c
Executable file → Normal file
0
SevenZip/src/7zCrc.h
Executable file → Normal file
0
SevenZip/src/7zCrc.h
Executable file → Normal file
0
SevenZip/src/7zCrcOpt.c
Executable file → Normal file
0
SevenZip/src/7zCrcOpt.c
Executable file → Normal file
0
SevenZip/src/7zDec.c
Executable file → Normal file
0
SevenZip/src/7zDec.c
Executable file → Normal file
0
SevenZip/src/7zFile.c
Executable file → Normal file
0
SevenZip/src/7zFile.c
Executable file → Normal file
0
SevenZip/src/7zFile.h
Executable file → Normal file
0
SevenZip/src/7zFile.h
Executable file → Normal file
0
SevenZip/src/7zIn.c
Executable file → Normal file
0
SevenZip/src/7zIn.c
Executable file → Normal file
0
SevenZip/src/7zStream.c
Executable file → Normal file
0
SevenZip/src/7zStream.c
Executable file → Normal file
0
SevenZip/src/7zVersion.h
Executable file → Normal file
0
SevenZip/src/7zVersion.h
Executable file → Normal file
0
SevenZip/src/Alloc.c
Executable file → Normal file
0
SevenZip/src/Alloc.c
Executable file → Normal file
0
SevenZip/src/Alloc.h
Executable file → Normal file
0
SevenZip/src/Alloc.h
Executable file → Normal file
0
SevenZip/src/Bcj2.c
Executable file → Normal file
0
SevenZip/src/Bcj2.c
Executable file → Normal file
0
SevenZip/src/Bcj2.h
Executable file → Normal file
0
SevenZip/src/Bcj2.h
Executable file → Normal file
0
SevenZip/src/Bra.c
Executable file → Normal file
0
SevenZip/src/Bra.c
Executable file → Normal file
0
SevenZip/src/Bra.h
Executable file → Normal file
0
SevenZip/src/Bra.h
Executable file → Normal file
0
SevenZip/src/Bra86.c
Executable file → Normal file
0
SevenZip/src/Bra86.c
Executable file → Normal file
0
SevenZip/src/BraIA64.c
Executable file → Normal file
0
SevenZip/src/BraIA64.c
Executable file → Normal file
0
SevenZip/src/CpuArch.c
Executable file → Normal file
0
SevenZip/src/CpuArch.c
Executable file → Normal file
0
SevenZip/src/CpuArch.h
Executable file → Normal file
0
SevenZip/src/CpuArch.h
Executable file → Normal file
0
SevenZip/src/Delta.c
Executable file → Normal file
0
SevenZip/src/Delta.c
Executable file → Normal file
0
SevenZip/src/Delta.h
Executable file → Normal file
0
SevenZip/src/Delta.h
Executable file → Normal file
0
SevenZip/src/LzFind.c
Executable file → Normal file
0
SevenZip/src/LzFind.c
Executable file → Normal file
0
SevenZip/src/LzFind.h
Executable file → Normal file
0
SevenZip/src/LzFind.h
Executable file → Normal file
0
SevenZip/src/LzFindMt.c
Executable file → Normal file
0
SevenZip/src/LzFindMt.c
Executable file → Normal file
0
SevenZip/src/LzFindMt.h
Executable file → Normal file
0
SevenZip/src/LzFindMt.h
Executable file → Normal file
0
SevenZip/src/LzHash.h
Executable file → Normal file
0
SevenZip/src/LzHash.h
Executable file → Normal file
0
SevenZip/src/Lzma2Dec.c
Executable file → Normal file
0
SevenZip/src/Lzma2Dec.c
Executable file → Normal file
0
SevenZip/src/Lzma2Dec.h
Executable file → Normal file
0
SevenZip/src/Lzma2Dec.h
Executable file → Normal file
0
SevenZip/src/Lzma2Enc.c
Executable file → Normal file
0
SevenZip/src/Lzma2Enc.c
Executable file → Normal file
0
SevenZip/src/Lzma2Enc.h
Executable file → Normal file
0
SevenZip/src/Lzma2Enc.h
Executable file → Normal file
0
SevenZip/src/Lzma86.h
Executable file → Normal file
0
SevenZip/src/Lzma86.h
Executable file → Normal file
0
SevenZip/src/Lzma86Dec.c
Executable file → Normal file
0
SevenZip/src/Lzma86Dec.c
Executable file → Normal file
0
SevenZip/src/Lzma86Enc.c
Executable file → Normal file
0
SevenZip/src/Lzma86Enc.c
Executable file → Normal file
0
SevenZip/src/LzmaDec.c
Executable file → Normal file
0
SevenZip/src/LzmaDec.c
Executable file → Normal file
0
SevenZip/src/LzmaDec.h
Executable file → Normal file
0
SevenZip/src/LzmaDec.h
Executable file → Normal file
0
SevenZip/src/LzmaEnc.c
Executable file → Normal file
0
SevenZip/src/LzmaEnc.c
Executable file → Normal file
0
SevenZip/src/LzmaEnc.h
Executable file → Normal file
0
SevenZip/src/LzmaEnc.h
Executable file → Normal file
0
SevenZip/src/LzmaLib.c
Executable file → Normal file
0
SevenZip/src/LzmaLib.c
Executable file → Normal file
0
SevenZip/src/LzmaLib.h
Executable file → Normal file
0
SevenZip/src/LzmaLib.h
Executable file → Normal file
0
SevenZip/src/MtCoder.c
Executable file → Normal file
0
SevenZip/src/MtCoder.c
Executable file → Normal file
0
SevenZip/src/MtCoder.h
Executable file → Normal file
0
SevenZip/src/MtCoder.h
Executable file → Normal file
0
SevenZip/src/Ppmd.h
Executable file → Normal file
0
SevenZip/src/Ppmd.h
Executable file → Normal file
0
SevenZip/src/Ppmd7.c
Executable file → Normal file
0
SevenZip/src/Ppmd7.c
Executable file → Normal file
0
SevenZip/src/Ppmd7.h
Executable file → Normal file
0
SevenZip/src/Ppmd7.h
Executable file → Normal file
0
SevenZip/src/Ppmd7Dec.c
Executable file → Normal file
0
SevenZip/src/Ppmd7Dec.c
Executable file → Normal file
0
SevenZip/src/Ppmd7Enc.c
Executable file → Normal file
0
SevenZip/src/Ppmd7Enc.c
Executable file → Normal file
0
SevenZip/src/RotateDefs.h
Executable file → Normal file
0
SevenZip/src/RotateDefs.h
Executable file → Normal file
0
SevenZip/src/Sha256.c
Executable file → Normal file
0
SevenZip/src/Sha256.c
Executable file → Normal file
0
SevenZip/src/Sha256.h
Executable file → Normal file
0
SevenZip/src/Sha256.h
Executable file → Normal file
0
SevenZip/src/Threads.c
Executable file → Normal file
0
SevenZip/src/Threads.c
Executable file → Normal file
0
SevenZip/src/Threads.h
Executable file → Normal file
0
SevenZip/src/Threads.h
Executable file → Normal file
0
SevenZip/src/Types.h
Executable file → Normal file
0
SevenZip/src/Types.h
Executable file → Normal file
0
SevenZip/src/Xz.c
Executable file → Normal file
0
SevenZip/src/Xz.c
Executable file → Normal file
0
SevenZip/src/Xz.h
Executable file → Normal file
0
SevenZip/src/Xz.h
Executable file → Normal file
0
SevenZip/src/XzCrc64.c
Executable file → Normal file
0
SevenZip/src/XzCrc64.c
Executable file → Normal file
0
SevenZip/src/XzCrc64.h
Executable file → Normal file
0
SevenZip/src/XzCrc64.h
Executable file → Normal file
0
SevenZip/src/XzDec.c
Executable file → Normal file
0
SevenZip/src/XzDec.c
Executable file → Normal file
0
SevenZip/src/XzEnc.c
Executable file → Normal file
0
SevenZip/src/XzEnc.c
Executable file → Normal file
0
SevenZip/src/XzEnc.h
Executable file → Normal file
0
SevenZip/src/XzEnc.h
Executable file → Normal file
0
SevenZip/src/XzIn.c
Executable file → Normal file
0
SevenZip/src/XzIn.c
Executable file → Normal file
173
appveyor.yml
173
appveyor.yml
@ -5,29 +5,31 @@ cache:
|
|||||||
- C:\ProgramData\chocolatey
|
- C:\ProgramData\chocolatey
|
||||||
- C:\OpenSSL-Win32
|
- C:\OpenSSL-Win32
|
||||||
- C:\OpenSSL-Win64
|
- C:\OpenSSL-Win64
|
||||||
|
- C:\Program Files (x86)\PostgreSQL\9.4
|
||||||
|
- C:\Program Files\PostgreSQL\9.4
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
localhost: 127.0.0.1
|
localhost: 127.0.0.1
|
||||||
db.server.com: 127.0.0.2
|
db.server.com: 127.0.0.2
|
||||||
|
|
||||||
|
services:
|
||||||
# mysql : server: localhost, port: 3306
|
# mysql : server: localhost, port: 3306
|
||||||
# mysql : user : root, password: Password12!
|
# mysql : user : root, password: Password12!
|
||||||
# - mysql
|
- mysql
|
||||||
|
|
||||||
# mongodb config : C:\mongodb\mongod.cfg
|
# mongodb config : C:\mongodb\mongod.cfg
|
||||||
# mongodb database: C:\mongodb\data\db
|
# mongodb database: C:\mongodb\data\db
|
||||||
|
- mongodb
|
||||||
|
|
||||||
# Server name: localhost
|
# Server name: localhost
|
||||||
# Server port: 5432
|
# Server port: 5432
|
||||||
# postgres account password: Password12!
|
# postgres account password: Password12!
|
||||||
services:
|
|
||||||
- postgresql94
|
- postgresql94
|
||||||
- mongodb
|
|
||||||
|
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
- x64
|
|
||||||
- Win32
|
- Win32
|
||||||
|
- x64
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# building debug configuration doubles the round time and isn't so useful.
|
# building debug configuration doubles the round time and isn't so useful.
|
||||||
@ -40,6 +42,10 @@ configuration:
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
bundling: bundled
|
bundling: bundled
|
||||||
|
MYSQL32: C:\mysql-5.7.9-win32
|
||||||
|
MYSQL64: C:\Program Files\MySql\MySQL Server 5.6
|
||||||
|
POSTGRES32: C:\Program Files (x86)\PostgreSQL\9.4
|
||||||
|
POSTGRES64: C:\Program Files\PostgreSQL\9.4
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
|
||||||
@ -155,53 +161,80 @@ install:
|
|||||||
# MySQL 32 bit is not available by default on AppVeyor
|
# MySQL 32 bit is not available by default on AppVeyor
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
if (Test-Path "c:\mysql-5.7.9-win32") {
|
if (Test-Path $env:MYSQL32) {
|
||||||
echo "using c:\mysql-5.7.9-win32 from cache"
|
echo "using $env:MYSQL32 from cache"
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "downloading mysql-5.7.9-win32"
|
|
||||||
Invoke-WebRequest "http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-win32.zip" -OutFile mysql-5.7.9-win32.zip
|
|
||||||
echo "installing c:\mysql-5.7.9-win32"
|
|
||||||
7z x -y mysql-5.7.9-win32.zip -oc:\
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
# -------------------------------------------------------------------------------------------
|
else
|
||||||
|
{
|
||||||
|
echo "downloading $env:MYSQL32"
|
||||||
|
Invoke-WebRequest "http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.11-win32.zip" -OutFile mysql-5.7.9-win32.zip
|
||||||
|
echo "installing $env:MYSQL32"
|
||||||
|
7z x -y mysql-5.7.9-win32.zip -oc:\
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
# PostgreSQL 32 bit is not available by default on AppVeyor
|
||||||
|
# http://www.enterprisedb.com/products-services-training/pgdownload#windows
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
- ps: |
|
||||||
|
if ($env:platform -eq "Win32")
|
||||||
|
{
|
||||||
|
if (Test-Path $env:POSTGRES32) {
|
||||||
|
echo "using $env:POSTGRES32 from cache"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "Installing $env:POSTGRES32 ..." -ForegroundColor Cyan
|
||||||
|
Write-Host "Downloading..."
|
||||||
|
$exePath = "$($env:USERPROFILE)\postgresql-9.4.5-1-windows.exe"
|
||||||
|
(New-Object Net.WebClient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-9.4.5-1-windows.exe', $exePath)
|
||||||
|
Write-Host "Installing..."
|
||||||
|
cmd /c start /wait $exePath --mode unattended --superpassword Password12!
|
||||||
|
del $exePath
|
||||||
|
Write-Host "Setting up services..."
|
||||||
|
Stop-Service postgresql-9.4
|
||||||
|
Set-Service -Name postgresql-9.4 -StartupType Manual
|
||||||
|
|
||||||
|
Write-Host "$env:POSTGRES32 installed" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:vsver -eq "110")
|
if ($env:vsver -eq "110")
|
||||||
{
|
{
|
||||||
$vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010'
|
$vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010'
|
||||||
if($env:platform -eq 'Win32') { $vctool='';}
|
if($env:platform -eq 'Win32') { $vctool='';}
|
||||||
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
||||||
|
}
|
||||||
|
if ($env:vsver -eq "120")
|
||||||
|
{
|
||||||
|
$vspath= convert-path $env:VS120COMNTOOLS\..\..\VC\bin;$yyyy='2013'
|
||||||
|
if($env:platform -eq 'Win32') { $vctool='';}
|
||||||
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
||||||
|
}
|
||||||
|
if ($env:vsver -eq "140")
|
||||||
|
{
|
||||||
|
$vspath= convert-path $env:VS140COMNTOOLS\..\..\VC\bin; $yyyy='2015'
|
||||||
|
if($env:platform -eq 'Win32') { $vctool='';}
|
||||||
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
||||||
|
}
|
||||||
|
pushd $vspath;
|
||||||
|
$tool= if($vctool -eq '') {'32'} else {$vctool}
|
||||||
|
cmd /c "vcvars$tool.bat&set" |
|
||||||
|
foreach {
|
||||||
|
if ($_ -match "=") {
|
||||||
|
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
|
||||||
}
|
}
|
||||||
if ($env:vsver -eq "120")
|
}
|
||||||
{
|
popd
|
||||||
$vspath= convert-path $env:VS120COMNTOOLS\..\..\VC\bin;$yyyy='2013'
|
write-host "`nVisual Studio $yyyy CLI variables set." -ForegroundColor Yellow
|
||||||
if($env:platform -eq 'Win32') { $vctool='';}
|
|
||||||
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($env:vsver -eq "140")
|
|
||||||
{
|
|
||||||
$vspath= convert-path $env:VS140COMNTOOLS\..\..\VC\bin; $yyyy='2015'
|
|
||||||
if($env:platform -eq 'Win32') { $vctool='';}
|
|
||||||
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
|
||||||
}
|
|
||||||
pushd $vspath;
|
|
||||||
$tool= if($vctool -eq '') {'32'} else {$vctool}
|
|
||||||
cmd /c "vcvars$tool.bat&set" |
|
|
||||||
foreach {
|
|
||||||
if ($_ -match "=") {
|
|
||||||
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
popd
|
|
||||||
write-host "`nVisual Studio $yyyy CLI variables set." -ForegroundColor Yellow
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# MySQL
|
# MySQL
|
||||||
@ -209,14 +242,32 @@ before_build:
|
|||||||
- ps: |
|
- ps: |
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$env:INCLUDE = "C:\mysql-5.7.9-win32\include;" + $env:INCLUDE
|
$env:INCLUDE = $env:MYSQL32 + "\include;" + $env:INCLUDE
|
||||||
$env:LIB = "C:\mysql-5.7.9-win32\lib;" + $env:LIB
|
$env:LIB = $env:MYSQL32 + "\lib;" + $env:LIB
|
||||||
|
$env:PATH = $env:MYSQL32 + "\bin;" + $env:PATH
|
||||||
|
if (Test-Path ($env:MYSQL32 + "\lib\libmysql.dll")) {
|
||||||
|
$from = $env:MYSQL32 + "\lib\libmysql.dll";
|
||||||
|
$to = $env:MYSQL32 + "\bin\libmysql.dll"
|
||||||
|
copy $from $to
|
||||||
|
}
|
||||||
|
& C:\cygwin\bin\ls -lR $env:MYSQL32
|
||||||
}
|
}
|
||||||
if ($env:platform -eq "x64")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
$env:INCLUDE = "C:\Program Files\MySql\MySQL Server 5.6\include;" + $env:INCLUDE
|
$env:INCLUDE = $env:MYSQL64 + "\include;" + $env:INCLUDE
|
||||||
$env:LIB = "C:\Program Files\MySql\MySQL Server 5.6\lib;" + $env:LIB
|
$env:LIB = $env:MYSQL64 + "\lib;" + $env:LIB
|
||||||
|
$env:PATH = $env:MYSQL64 + "\bin;" + $env:PATH
|
||||||
|
if (Test-Path ($env:MYSQL64 + "\lib\libmysql.dll")) {
|
||||||
|
$from = $env:MYSQL64 + "\lib\libmysql.dll";
|
||||||
|
$to = $env:MYSQL64 + "\bin\libmysql.dll"
|
||||||
|
copy $from $to
|
||||||
|
}
|
||||||
|
& C:\cygwin\bin\ls -lR $env:MYSQL64
|
||||||
}
|
}
|
||||||
|
$env:MYSQL_PWD="Password12!"
|
||||||
|
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
|
||||||
|
iex "& $cmd"
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
@ -224,13 +275,15 @@ before_build:
|
|||||||
- ps: |
|
- ps: |
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$env:INCLUDE = "C:\Program Files (x86)\PostgreSQL\9.4\include;" + $env:INCLUDE
|
$env:INCLUDE = $env:POSTGRES32 + "\include;" + $env:INCLUDE
|
||||||
$env:LIB = "C:\Program Files (x86)\PostgreSQL\9.4\lib;" + $env:LIB
|
$env:LIB = $env:POSTGRES32 + "\lib;" + $env:LIB
|
||||||
|
$env:PATH = $env:POSTGRES32 + "\bin;" + $env:PATH
|
||||||
}
|
}
|
||||||
if ($env:platform -eq "x64")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
$env:INCLUDE = "C:\Program Files\PostgreSQL\9.4\include;" + $env:INCLUDE
|
$env:INCLUDE = $env:POSTGRES64 + "\include;" + $env:INCLUDE
|
||||||
$env:LIB = "C:\Program Files\PostgreSQL\9.4\lib;" + $env:LIB
|
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
|
||||||
|
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
@ -330,12 +383,7 @@ build_script:
|
|||||||
}
|
}
|
||||||
|
|
||||||
before_test:
|
before_test:
|
||||||
# -------------------------------------------------------------------------------------------
|
- ps: |
|
||||||
# PostgreSQL
|
|
||||||
- set PATH=C:\Program Files\PostgreSQL\9.4\bin\;%PATH%
|
|
||||||
# -------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- ps: |
|
|
||||||
$line='-------------------------------------------------------------------------------------';
|
$line='-------------------------------------------------------------------------------------';
|
||||||
$CPPUNIT_IGNORE='';
|
$CPPUNIT_IGNORE='';
|
||||||
$CPPUNIT_IGNORE+='class CppUnit::TestCaller<class NTPClientTest>.testTimeSync';
|
$CPPUNIT_IGNORE+='class CppUnit::TestCaller<class NTPClientTest>.testTimeSync';
|
||||||
@ -352,6 +400,7 @@ before_test:
|
|||||||
|
|
||||||
after_test:
|
after_test:
|
||||||
|
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- ps: |
|
- ps: |
|
||||||
$runs=0;$fails=0;$failedTests='';$status=0;$tab="`t";
|
$runs=0;$fails=0;$failedTests='';$status=0;$tab="`t";
|
||||||
@ -364,12 +413,12 @@ test_script:
|
|||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$env:PATH = "$env:POCO_BASE\bin;" + $env:PATH;$suffix = '';
|
$env:PATH = "$env:POCO_BASE\bin;" + $env:PATH;$suffix = '';
|
||||||
$excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Data/PostgreSQL', 'Redis', 'PDF')
|
$excluded = @('Data', 'Data/ODBC', 'Data/MySQL', 'Redis', 'PDF')
|
||||||
}
|
}
|
||||||
if ($env:platform -eq "x64")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
$env:PATH = "$env:POCO_BASE\bin64;" + $env:PATH;$suffix = 64;
|
$env:PATH = "$env:POCO_BASE\bin64;" + $env:PATH;$suffix = 64;
|
||||||
$excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF')
|
$excluded = @('Data', 'Data/ODBC','Redis', 'PDF')
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;
|
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;
|
||||||
|
@ -11,7 +11,6 @@ NetSSL_Win
|
|||||||
Data
|
Data
|
||||||
Data/SQLite
|
Data/SQLite
|
||||||
Data/ODBC
|
Data/ODBC
|
||||||
Data/MySQL
|
|
||||||
Data/PostgreSQL
|
Data/PostgreSQL
|
||||||
Zip
|
Zip
|
||||||
PageCompiler
|
PageCompiler
|
||||||
@ -22,3 +21,4 @@ MongoDB
|
|||||||
Redis
|
Redis
|
||||||
PocoDoc
|
PocoDoc
|
||||||
ProGen
|
ProGen
|
||||||
|
Data/MySQL
|
||||||
|
2
travis/Linux/excluded.sh
Executable file → Normal file
2
travis/Linux/excluded.sh
Executable file → Normal file
@ -1,2 +1,2 @@
|
|||||||
export EXCLUDE_TESTS="Data/MySQL Data/ODBC PDF"
|
export EXCLUDE_TESTS="Data/ODBC PDF"
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
# set -ev
|
# set -ev
|
||||||
|
#
|
||||||
set -v
|
set -v
|
||||||
export POCO_BASE=`pwd`
|
export POCO_BASE=`pwd`
|
||||||
export PATH=$PATH:.
|
export PATH=$PATH:.
|
||||||
|
0
travis/OSX/excluded.sh
Executable file → Normal file
0
travis/OSX/excluded.sh
Executable file → Normal file
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
# set -ev
|
# set -ev
|
||||||
|
#
|
||||||
set -v
|
set -v
|
||||||
export POCO_BASE=`pwd`
|
export POCO_BASE=`pwd`
|
||||||
export PATH=$PATH:.
|
export PATH=$PATH:.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user