From 83cfe05e690461bf50126c2d442f15ce47299420 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 10:18:57 +0100 Subject: [PATCH 01/69] Use build as msbuild Signed-off-by: FrancisANDRE --- appveyor.yml | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e9bc36af3..8ab40317f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,22 +50,28 @@ environment: verbosity: minimal matrix: - - builder: 120 + - builder: msbuild + vsver: 120 linkmode: shared -# - builder: 120 +# - builder: msbuild +# vsver: 120 # linkmode: static_md -# - builder: 120 +# - builder: msbuild +# vsver: 120 # linkmode: static_mt - - builder: 140 + - builder: msbuild + vsver: 140 linkmode: shared -# - builder: 140 +# - builder: msbuild +# vsver: 140 # linkmode: static_md -# - builder: 140 +# - builder: msbuild +# vsver: 140 # linkmode: static_mt @@ -75,7 +81,7 @@ matrix: before_build: - ps: | - if ($env:builder -eq "120") + if ($env:vsver -eq "120") { if ($env:platform -eq "Win32") { @@ -88,7 +94,7 @@ before_build: $env:suffix = 64 } } - if ($env:builder -eq "140") + if ($env:vsver -eq "140") { if ($env:platform -eq "Win32") { @@ -142,7 +148,8 @@ after_build: build_script: - - buildwin %builder% build %linkmode% %configuration% %platform% %samples% %tests% msbuild %verbosity% %logger% + - if %builder%==msbuild (buildwin %builder% build %linkmode% %configuration% %platform% %samples% %tests% msbuild %verbosity% %logger%) + before_test: @@ -184,14 +191,16 @@ test_script: foreach ($component in $components) { if ($excluded -notcontains $component) { - [string]$path = $component + "\testsuite\bin$suffix\TestSuite.exe"; + if ($env:msbuild -eq "msbuild") + { + [string]$path = $component + "\testsuite\bin$suffix\TestSuite.exe"; - if (Test-Path -Path $path) { + if (Test-Path -Path $path) { $runs += 1; Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Running' Write-Host -ForegroundColor Yellow $line; - Write-Host -ForegroundColor Yellow '|' $env:APPVEYOR_BUILD_VERSION $env:vs$builder $env:Platform $env:Configuration $env:linkmode '|' $tab $tab $component; + Write-Host -ForegroundColor Yellow '|' $env:APPVEYOR_BUILD_VERSION $env:vs$vsver $env:Platform $env:Configuration $env:linkmode '|' $tab $tab $component; Write-Host -ForegroundColor Yellow $line; $started = Get-Date @@ -210,7 +219,8 @@ test_script: { Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec } - } + } + } } else { From 7c92d8556654f082f3fa58443e8779d74d91a1cc Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 14:57:40 +0100 Subject: [PATCH 02/69] Align PS snippets Signed-off-by: FrancisANDRE --- appveyor.yml | 70 +++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8ab40317f..f7f5936b3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,29 +19,6 @@ configuration: - release - debug -install: - - systeminfo - - c:\cygwin\bin\uname -a - - c:\cygwin\bin\cat /proc/cpuinfo - - c:\cygwin\bin\cat /proc/meminfo - - set - -# MySQL 32 bit is not available by default on AppVeyor - - ps: | - if ($env:platform -eq "Win32") - { - if (Test-Path "c:\mysql-5.7.9-win32") { - echo "using mysql-5.7.9-win32 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 mysql-5.7.9-win32" - 7z x -y mysql-5.7.9-win32.zip -oc:\ - } - } - environment: bundling: bundled logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll' @@ -78,11 +55,34 @@ environment: matrix: fast_finish: true +install: + - systeminfo + - c:\cygwin\bin\uname -a + - c:\cygwin\bin\cat /proc/cpuinfo + - c:\cygwin\bin\cat /proc/meminfo + - set + +# MySQL 32 bit is not available by default on AppVeyor + - ps: | + if ($env:platform -eq "Win32") + { + if (Test-Path "c:\mysql-5.7.9-win32") { + echo "using mysql-5.7.9-win32 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 mysql-5.7.9-win32" + 7z x -y mysql-5.7.9-win32.zip -oc:\ + } + } + before_build: - ps: | - if ($env:vsver -eq "120") - { + if ($env:vsver -eq "120") + { if ($env:platform -eq "Win32") { & "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 @@ -93,9 +93,9 @@ before_build: & "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 $env:suffix = 64 } - } - if ($env:vsver -eq "140") - { + } + if ($env:vsver -eq "140") + { if ($env:platform -eq "Win32") { & "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 @@ -106,7 +106,7 @@ before_build: & "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 $env:suffix = 64 } - } + } # MySQL - ps: | @@ -148,7 +148,15 @@ after_build: build_script: - - if %builder%==msbuild (buildwin %builder% build %linkmode% %configuration% %platform% %samples% %tests% msbuild %verbosity% %logger%) + - ps: | + if ($env:builder -eq "msbuild") + { + $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" + -Args "build $env:linkmode $env:configuration $env:platform $env:samples $env:tests msbuild $env:verbosity $env:logger" + -RSO "cout" -RSE "cerr"; + gc cout; gc cerr; + } + @@ -206,7 +214,7 @@ test_script: $started = Get-Date $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO "cout" -RSE "cerr"; $ended = Get-Date - $millisec = ($ended - $started).ticks + $millisec = ($ended - $started).totalmilliseconds gc cout; gc cerr; From e4a0a3bf9aeb17923b1e2ac1f2e2f78e90f4b20e Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 15:21:28 +0100 Subject: [PATCH 03/69] Add cmake Signed-off-by: FrancisANDRE --- appveyor.yml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f7f5936b3..3277e3e95 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,6 +27,9 @@ environment: verbosity: minimal matrix: + - builder: cmake + vsver: 120 + - builder: msbuild vsver: 120 linkmode: shared @@ -60,8 +63,20 @@ install: - c:\cygwin\bin\uname -a - c:\cygwin\bin\cat /proc/cpuinfo - c:\cygwin\bin\cat /proc/meminfo + - cinst cmake + - set PATH=C:\ProgramData\chocolatey\bin;%PATH% + - where cmake - set +# chocolatey brokes jom, here's workaround +# see https://github.com/jcfr/qt-easy-build/commit/6366f4275562bdaf4f686838600f46894579c41e) + - ps: | + if ($env:builder -eq "cmake") + { + $env:PATH = $env:ChocolateyInstall + "\bin" + ";" + $env:PATH + $env:PATH = $env:ChocolateyInstall + "\lib\jom\content" + ";" + $env:PATH + } + # MySQL 32 bit is not available by default on AppVeyor - ps: | if ($env:platform -eq "Win32") @@ -80,6 +95,8 @@ install: before_build: + - set %CD% + - set POCO_BASE=%CD% - ps: | if ($env:vsver -eq "120") { @@ -130,19 +147,19 @@ after_build: Write-Host -ForegroundColor Yellow $line; $word='FIXME' - Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO "cout" -RSE "cerr"; + Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host;Write-Host; Write-Host -ForegroundColor Yellow $line; $word='TODO' - Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO "cout" -RSE "cerr"; + Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host;Write-Host; Write-Host -ForegroundColor Yellow $line; $word='HACK' - Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO "cout" -RSE "cerr"; + Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host;Write-Host; @@ -153,10 +170,15 @@ build_script: { $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" -Args "build $env:linkmode $env:configuration $env:platform $env:samples $env:tests msbuild $env:verbosity $env:logger" - -RSO "cout" -RSE "cerr"; + -RSO cout -RSE cerr; gc cout; gc cerr; } - + if ($env:builder -eq "cmake") + { + mkdir cmake-build | out-null;cd cmake-build; + cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL_OPENSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; + cmake --build . --config $enc:configuration -- /nologo; + } @@ -212,7 +234,7 @@ test_script: Write-Host -ForegroundColor Yellow $line; $started = Get-Date - $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO "cout" -RSE "cerr"; + $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO cout -RSE cerr; $ended = Get-Date $millisec = ($ended - $started).totalmilliseconds @@ -228,6 +250,10 @@ test_script: Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec } } + else + { + Write-Host -ForegroundColor Yellow 'using cmake' + } } } else From 8ddab518e4b92cec489efd255aaf5949b2f198e6 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 15:22:12 +0100 Subject: [PATCH 04/69] Add Debug Signed-off-by: FrancisANDRE --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6d1f1e024..af48274f9 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,4 @@ openssl/packages/ !openssl/win64/lib/debug/*.pdb !openssl/win64/lib/release/*.lib +/Debug From 544db5c73b19e3d3f8b8ba97dba729281cc46684 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 15:26:47 +0100 Subject: [PATCH 05/69] Remove set Signed-off-by: FrancisANDRE --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3277e3e95..4c24691ea 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -95,7 +95,6 @@ install: before_build: - - set %CD% - set POCO_BASE=%CD% - ps: | if ($env:vsver -eq "120") From 559c5d385b1f55b4c8ad6b1c0bf110ec3a716503 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 15:39:34 +0100 Subject: [PATCH 06/69] Display cl version Signed-off-by: FrancisANDRE --- appveyor.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4c24691ea..3d7bfe7eb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -78,24 +78,23 @@ install: } # MySQL 32 bit is not available by default on AppVeyor - - ps: | - if ($env:platform -eq "Win32") - { - if (Test-Path "c:\mysql-5.7.9-win32") { - echo "using mysql-5.7.9-win32 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 mysql-5.7.9-win32" - 7z x -y mysql-5.7.9-win32.zip -oc:\ - } - } +# - ps: | +# if ($env:platform -eq "Win32") +# { +# if (Test-Path "c:\mysql-5.7.9-win32") { +# echo "using mysql-5.7.9-win32 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 mysql-5.7.9-win32" +# 7z x -y mysql-5.7.9-win32.zip -oc:\ +# } +# } before_build: - - set POCO_BASE=%CD% - ps: | if ($env:vsver -eq "120") { @@ -123,6 +122,9 @@ before_build: $env:suffix = 64 } } + - set POCO_BASE=%CD% + - where cl + - cl # MySQL - ps: | @@ -176,7 +178,7 @@ build_script: { mkdir cmake-build | out-null;cd cmake-build; cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL_OPENSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; - cmake --build . --config $enc:configuration -- /nologo; + cmake --build . --config $env:configuration -- /nologo; } From 62159ad0bb66714776b764d394fb65c4f6236fb7 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 16:09:39 +0100 Subject: [PATCH 07/69] Put VS variables in $env Signed-off-by: FrancisANDRE --- appveyor.yml | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3d7bfe7eb..39e91839c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -98,33 +98,21 @@ before_build: - ps: | if ($env:vsver -eq "120") { - if ($env:platform -eq "Win32") - { - & "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 - $env:suffix = "" - } - if ($env:platform -eq "x64") - { - & "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64 - $env:suffix = 64 - } + pushd $env:VS120COMNTOOLS } if ($env:vsver -eq "140") { - if ($env:platform -eq "Win32") - { - & "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 - $env:suffix = "" - } - if ($env:platform -eq "x64") - { - & "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 - $env:suffix = 64 + pushd $env:VS140COMNTOOLS + } + cmd /c "vsvars32.bat&set" | + foreach { + if ($_ -match "=") { + $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } - - set POCO_BASE=%CD% + popd + write-host "`nVisual Studio $env:vsver Command Prompt variables set." -ForegroundColor Yellow - where cl - - cl # MySQL - ps: | @@ -170,7 +158,7 @@ build_script: if ($env:builder -eq "msbuild") { $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" - -Args "build $env:linkmode $env:configuration $env:platform $env:samples $env:tests msbuild $env:verbosity $env:logger" + -Args "$env:vsver build $env:linkmode $env:configuration $env:platform $env:samples $env:tests msbuild $env:verbosity $env:logger" -RSO cout -RSE cerr; gc cout; gc cerr; } From d446f3d6ad0b2858307860a43504d64c6d047642 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 16:21:48 +0100 Subject: [PATCH 08/69] Install jom Signed-off-by: FrancisANDRE --- appveyor.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 39e91839c..a89b0ae78 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -59,12 +59,22 @@ matrix: fast_finish: true install: + - set PATH=C:\ProgramData\chocolatey\bin;%PATH% - systeminfo - c:\cygwin\bin\uname -a - c:\cygwin\bin\cat /proc/cpuinfo - c:\cygwin\bin\cat /proc/meminfo - - cinst cmake - - set PATH=C:\ProgramData\chocolatey\bin;%PATH% + - ps: | + if (Test-Path "$env:ChocolateyInstall/bin/jom.exe") { + echo "using jom from cache" + } else { + choco install jom + } + if (Test-Path "$env:ChocolateyInstall/bin/cmake.exe") { + echo "using cmake from cache" + } else { + choco install cmake + } - where cmake - set @@ -92,7 +102,6 @@ install: # 7z x -y mysql-5.7.9-win32.zip -oc:\ # } # } - before_build: - ps: | From 1c89dc5c97ea08baa8d2cffe6e4b7ffcdeb62b47 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 16:56:47 +0100 Subject: [PATCH 09/69] use jom Signed-off-by: FrancisANDRE --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a89b0ae78..1f60730ab 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -174,9 +174,10 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;cd cmake-build; - cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL_OPENSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; - cmake --build . --config $env:configuration -- /nologo; + cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; + jom } +# cmake --build . --config $env:configuration -- /nologo; From 6e97a9f11b1c3c0d02931d3d7cfe2088dc637bb9 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 17:15:55 +0100 Subject: [PATCH 10/69] Split tests into samples & tests. Signed-off-by: FrancisANDRE --- ApacheConnector/CMakeLists.txt | 2 +- Crypto/CMakeLists.txt | 8 ++++++-- Data/CMakeLists.txt | 4 +++- Foundation/CMakeLists.txt | 4 +++- JSON/CMakeLists.txt | 4 +++- MongoDB/CMakeLists.txt | 4 +++- Net/CMakeLists.txt | 4 +++- NetSSL_OpenSSL/CMakeLists.txt | 4 +++- NetSSL_Win/CMakeLists.txt | 5 ++++- PDF/CMakeLists.txt | 4 +++- PageCompiler/CMakeLists.txt | 4 ++++ Redis/CMakeLists.txt | 4 +++- SevenZip/CMakeLists.txt | 4 +++- Util/CMakeLists.txt | 4 +++- XML/CMakeLists.txt | 4 +++- Zip/CMakeLists.txt | 4 +++- appveyor.yml | 3 +-- 17 files changed, 52 insertions(+), 18 deletions(-) diff --git a/ApacheConnector/CMakeLists.txt b/ApacheConnector/CMakeLists.txt index 4328c18b6..88eb2a8a9 100644 --- a/ApacheConnector/CMakeLists.txt +++ b/ApacheConnector/CMakeLists.txt @@ -21,6 +21,6 @@ target_include_directories( "${LIBNAME}" PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ) -if (ENABLE_TESTS) +if (ENABLE_SAMPLES) add_subdirectory(samples) endif () \ No newline at end of file diff --git a/Crypto/CMakeLists.txt b/Crypto/CMakeLists.txt index ea948be79..2f3bd41f1 100644 --- a/Crypto/CMakeLists.txt +++ b/Crypto/CMakeLists.txt @@ -25,7 +25,9 @@ target_include_directories( "${LIBNAME}" PUBLIC $ $ - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${OPENSSL_INCLUDE_DIR} ) target_compile_definitions("${LIBNAME}" PUBLIC ${LIB_MODE_DEFINITIONS}) @@ -33,6 +35,8 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/Data/CMakeLists.txt b/Data/CMakeLists.txt index ab77443cf..3d6044ab9 100644 --- a/Data/CMakeLists.txt +++ b/Data/CMakeLists.txt @@ -73,6 +73,8 @@ if(ENABLE_DATA_ODBC) endif(ENABLE_DATA_ODBC) if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt index 539369e2e..a583c8985 100644 --- a/Foundation/CMakeLists.txt +++ b/Foundation/CMakeLists.txt @@ -174,7 +174,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory( samples ) add_subdirectory( testsuite ) endif () +if (ENABLE_SAMPLES) + add_subdirectory( samples ) +endif () diff --git a/JSON/CMakeLists.txt b/JSON/CMakeLists.txt index 9f73e0376..1414d2884 100644 --- a/JSON/CMakeLists.txt +++ b/JSON/CMakeLists.txt @@ -31,7 +31,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/MongoDB/CMakeLists.txt b/MongoDB/CMakeLists.txt index e9f443026..332438206 100644 --- a/MongoDB/CMakeLists.txt +++ b/MongoDB/CMakeLists.txt @@ -31,7 +31,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/Net/CMakeLists.txt b/Net/CMakeLists.txt index e6ef2636f..f4276ced3 100644 --- a/Net/CMakeLists.txt +++ b/Net/CMakeLists.txt @@ -41,6 +41,8 @@ POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) add_subdirectory(samples) - add_subdirectory(testsuite) +endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) endif () diff --git a/NetSSL_OpenSSL/CMakeLists.txt b/NetSSL_OpenSSL/CMakeLists.txt index b6e376a21..6688dfb4c 100644 --- a/NetSSL_OpenSSL/CMakeLists.txt +++ b/NetSSL_OpenSSL/CMakeLists.txt @@ -31,7 +31,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/NetSSL_Win/CMakeLists.txt b/NetSSL_Win/CMakeLists.txt index 6a9b13297..6935e1c8b 100644 --- a/NetSSL_Win/CMakeLists.txt +++ b/NetSSL_Win/CMakeLists.txt @@ -31,8 +31,11 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) + #TODO: +# add_subdirectory(testsuite) +endif () +if (ENABLE_SAMPLES) #TODO: Looks like the samples use crypto somehow? #add_subdirectory(samples) - #add_subdirectory(testsuite) endif () diff --git a/PDF/CMakeLists.txt b/PDF/CMakeLists.txt index 3ecb9574a..876dd0986 100644 --- a/PDF/CMakeLists.txt +++ b/PDF/CMakeLists.txt @@ -136,7 +136,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/PageCompiler/CMakeLists.txt b/PageCompiler/CMakeLists.txt index 3a55c5575..4aa148965 100644 --- a/PageCompiler/CMakeLists.txt +++ b/PageCompiler/CMakeLists.txt @@ -19,3 +19,7 @@ install( RUNTIME DESTINATION bin INCLUDES DESTINATION include ) +if (ENABLE_SAMPLES) +# add_subdirectory(samples) +endif () + \ No newline at end of file diff --git a/Redis/CMakeLists.txt b/Redis/CMakeLists.txt index 191014eee..bd048482b 100644 --- a/Redis/CMakeLists.txt +++ b/Redis/CMakeLists.txt @@ -31,7 +31,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) -# add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) +# add_subdirectory(samples) +endif () diff --git a/SevenZip/CMakeLists.txt b/SevenZip/CMakeLists.txt index fd13ee3a9..c4f3abcaa 100644 --- a/SevenZip/CMakeLists.txt +++ b/SevenZip/CMakeLists.txt @@ -72,8 +72,10 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) # TODO: Add tests #add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/Util/CMakeLists.txt b/Util/CMakeLists.txt index a367f12ea..ea442b225 100644 --- a/Util/CMakeLists.txt +++ b/Util/CMakeLists.txt @@ -48,6 +48,8 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt index d0410781c..372465d85 100644 --- a/XML/CMakeLists.txt +++ b/XML/CMakeLists.txt @@ -54,7 +54,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/Zip/CMakeLists.txt b/Zip/CMakeLists.txt index 5054baad1..0942a84d5 100644 --- a/Zip/CMakeLists.txt +++ b/Zip/CMakeLists.txt @@ -31,7 +31,9 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) add_subdirectory(testsuite) endif () +if (ENABLE_SAMPLES) + add_subdirectory(samples) +endif () diff --git a/appveyor.yml b/appveyor.yml index 1f60730ab..eed2b4ed0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -175,9 +175,8 @@ build_script: { mkdir cmake-build | out-null;cd cmake-build; cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; - jom + cmake --build . --config $env:configuration -- /nologo; } -# cmake --build . --config $env:configuration -- /nologo; From 1dcd0e90a406351576b627828961c1721b72e49c Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 17:20:40 +0100 Subject: [PATCH 11/69] Remove /nologo Signed-off-by: FrancisANDRE --- appveyor.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index eed2b4ed0..3bf2e3f41 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,11 +21,7 @@ configuration: environment: bundling: bundled - logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll' - samples: samples - tests: tests - verbosity: minimal - + matrix: - builder: cmake vsver: 120 @@ -166,16 +162,21 @@ build_script: - ps: | if ($env:builder -eq "msbuild") { + $logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll' + $samples: samples + $tests: tests + $verbosity: minimal + $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" - -Args "$env:vsver build $env:linkmode $env:configuration $env:platform $env:samples $env:tests msbuild $env:verbosity $env:logger" + -Args "$env:vsver build $env:linkmode $env:configuration $env:platform $samples $tests msbuild $verbosity $logger" -RSO cout -RSE cerr; gc cout; gc cerr; } if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;cd cmake-build; - cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; - cmake --build . --config $env:configuration -- /nologo; + cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF + cmake --build . --config $env:configuration } From 8d1a832bc157b0c25cdc97f3e8473d2a6ac09a5e Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 17:27:12 +0100 Subject: [PATCH 12/69] Use assig glyph. Signed-off-by: FrancisANDRE --- appveyor.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3bf2e3f41..d91099bd0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -162,12 +162,11 @@ build_script: - ps: | if ($env:builder -eq "msbuild") { - $logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll' - $samples: samples - $tests: tests - $verbosity: minimal + $logger='C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; + $samples='samples';$tests='tests';$verbosity='minimal'; - $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" + $process = Start-Process -PassThru -NoNewWindow -Wait + -FilePath "buildwin.cmd" -Args "$env:vsver build $env:linkmode $env:configuration $env:platform $samples $tests msbuild $verbosity $logger" -RSO cout -RSE cerr; gc cout; gc cerr; @@ -175,7 +174,7 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;cd cmake-build; - cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF + cmake ../. -G"NMake Makefiles" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF cmake --build . --config $env:configuration } From abfb94cd0dae48da36f9c398051275f50d7750cc Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 18:02:25 +0100 Subject: [PATCH 13/69] Remove NetSSL from crypto test dependencies. Signed-off-by: FrancisANDRE --- Crypto/testsuite/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Crypto/testsuite/CMakeLists.txt b/Crypto/testsuite/CMakeLists.txt index c0d6f8eed..a3ce109ec 100644 --- a/Crypto/testsuite/CMakeLists.txt +++ b/Crypto/testsuite/CMakeLists.txt @@ -18,7 +18,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) -target_link_libraries( ${TESTUNIT} PocoCrypto PocoNetSSL PocoXML PocoUtil PocoFoundation CppUnit ) +target_link_libraries( ${TESTUNIT} PocoCrypto PocoXML PocoUtil PocoFoundation CppUnit ) if(UNIX) target_link_libraries( ${TESTUNIT} pthread) endif(UNIX) From 5f21424b0f4352496e8fdb9775b1a3afe255161f Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 18:03:56 +0100 Subject: [PATCH 14/69] Add testsuite directory instead of samples when ENABLE_TESTS Signed-off-by: FrancisANDRE --- Net/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Net/CMakeLists.txt b/Net/CMakeLists.txt index f4276ced3..f70de57c5 100644 --- a/Net/CMakeLists.txt +++ b/Net/CMakeLists.txt @@ -40,7 +40,7 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - add_subdirectory(samples) + add_subdirectory(testsuite) endif () if (ENABLE_SAMPLES) add_subdirectory(samples) From 1ef27f847c0c19ec018bbee9e15e1d88b8fb4989 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 18:17:25 +0100 Subject: [PATCH 15/69] Remove where cl Signed-off-by: FrancisANDRE --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d91099bd0..05e6a81b1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -117,7 +117,6 @@ before_build: } popd write-host "`nVisual Studio $env:vsver Command Prompt variables set." -ForegroundColor Yellow - - where cl # MySQL - ps: | From 0b9a2d8f51806639ae0be525e95c3ba89ee4e966 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sat, 19 Dec 2015 18:30:08 +0100 Subject: [PATCH 16/69] Where cl, mc, nmake Signed-off-by: FrancisANDRE --- appveyor.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 05e6a81b1..84eba90dd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -117,7 +117,10 @@ before_build: } popd write-host "`nVisual Studio $env:vsver Command Prompt variables set." -ForegroundColor Yellow - + - where cl + - where mc + - where nmake + # MySQL - ps: | if ($env:platform -eq "Win32") From 21ce1a0ed7c48be3f6dd97a6865d6ea077226d12 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 07:14:47 +0100 Subject: [PATCH 17/69] Try/catch cmake exception on invoking the mc.exe compiler. Signed-off-by: FrancisANDRE --- appveyor.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 84eba90dd..37b417e24 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,8 +23,23 @@ environment: bundling: bundled matrix: - - builder: cmake - vsver: 120 +# ------------------------------------------------------------------------------------------- +# When builder is cmake, it remains one error reported below +# Once this problem fixed, the cmake builder will be operational +# +# [ 1%] Generating pocomsg.h +# cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc +# At line:16 char:3 +# + cmake --build . --config $env:configuration +# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# + CategoryInfo : NotSpecified: (MC: Compiling C.../src/pocomsg.mc:String) [], RemoteException +# + FullyQualifiedErrorId : NativeCommandError +# +# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc +# +# - builder: cmake +# vsver: 120 +# ------------------------------------------------------------------------------------------- - builder: msbuild vsver: 120 @@ -177,7 +192,11 @@ build_script: { mkdir cmake-build | out-null;cd cmake-build; cmake ../. -G"NMake Makefiles" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF - cmake --build . --config $env:configuration + try { + cmake --build . --config $env:configuration + } catch { + Write-Warning "Oops: $_" + } } From 1accfa38fbcc5ce6974764a4eb1f8c241632a627 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 07:26:22 +0100 Subject: [PATCH 18/69] Retest cmake Signed-off-by: FrancisANDRE --- appveyor.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 37b417e24..0914ebdc6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,8 +37,8 @@ environment: # # Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc # -# - builder: cmake -# vsver: 120 + - builder: cmake + vsver: 120 # ------------------------------------------------------------------------------------------- - builder: msbuild @@ -118,11 +118,11 @@ before_build: - ps: | if ($env:vsver -eq "120") { - pushd $env:VS120COMNTOOLS + pushd $env:VS120COMNTOOLS; $yyyy='2013' } if ($env:vsver -eq "140") { - pushd $env:VS140COMNTOOLS + pushd $env:VS140COMNTOOLS; $yyyy='2015' } cmd /c "vsvars32.bat&set" | foreach { @@ -131,10 +131,7 @@ before_build: } } popd - write-host "`nVisual Studio $env:vsver Command Prompt variables set." -ForegroundColor Yellow - - where cl - - where mc - - where nmake + write-host "`nVisual Studio $yyyy Command Prompt variables set." -ForegroundColor Yellow # MySQL - ps: | @@ -182,10 +179,9 @@ build_script: $logger='C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; $samples='samples';$tests='tests';$verbosity='minimal'; - $process = Start-Process -PassThru -NoNewWindow -Wait - -FilePath "buildwin.cmd" - -Args "$env:vsver build $env:linkmode $env:configuration $env:platform $samples $tests msbuild $verbosity $logger" - -RSO cout -RSE cerr; + $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" -RSO cout -RSE cerr ` + -Args "$env:vsver build $env:linkmode $env:configuration $env:platform ` + $samples $tests msbuild $verbosity $logger"; gc cout; gc cerr; } if ($env:builder -eq "cmake") @@ -198,12 +194,8 @@ build_script: Write-Warning "Oops: $_" } } - - before_test: - - set PATH=%CD%\bin;%PATH% - - set PATH=%CD%\bin64;%PATH% - set CPPUNIT_IGNORE="class CppUnit::TestCaller.testTimeSync" - set POCO_BASE=%CD% @@ -237,6 +229,7 @@ test_script: { $env:PATH = "$env:CD\bin64;" + $env:PATH;$suffix = 64; } + foreach ($component in $components) { if ($excluded -notcontains $component) { From dbf48b5440a46e0b0f135e3d6327c0aa94a0ef13 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 07:50:44 +0100 Subject: [PATCH 19/69] Add $ErrorActionPreference = 'Continue'; Signed-off-by: FrancisANDRE --- appveyor.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0914ebdc6..69fddd1f4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,8 +24,8 @@ environment: matrix: # ------------------------------------------------------------------------------------------- -# When builder is cmake, it remains one error reported below -# Once this problem fixed, the cmake builder will be operational +# When builder is cmake, it remains one exception reported below +# Once this problem fixed, the try/catch around the cmake builder can be removed # # [ 1%] Generating pocomsg.h # cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc @@ -36,7 +36,7 @@ environment: # + FullyQualifiedErrorId : NativeCommandError # # Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc -# +# ------------------------------------------------------------------------------------------- - builder: cmake vsver: 120 # ------------------------------------------------------------------------------------------- @@ -87,6 +87,7 @@ install: choco install cmake } - where cmake + - where jom - set # chocolatey brokes jom, here's workaround @@ -187,12 +188,14 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;cd cmake-build; - cmake ../. -G"NMake Makefiles" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF + cmake ../. -G"NMake Makefiles" -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF try { + $ErrorActionPreference = 'Continue'; cmake --build . --config $env:configuration } catch { Write-Warning "Oops: $_" } + $host.SetShouldExit(0); } before_test: From 1bffff11576cc4c0e03caa926cd937f5ecfab344 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 08:12:59 +0100 Subject: [PATCH 20/69] Display FIXME on adding tests & samples Signed-off-by: FrancisANDRE --- NetSSL_Win/CMakeLists.txt | 16 +++++++++++++--- appveyor.yml | 6 +++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/NetSSL_Win/CMakeLists.txt b/NetSSL_Win/CMakeLists.txt index 6935e1c8b..d00c8849e 100644 --- a/NetSSL_Win/CMakeLists.txt +++ b/NetSSL_Win/CMakeLists.txt @@ -31,11 +31,21 @@ POCO_INSTALL("${LIBNAME}") POCO_GENERATE_PACKAGE("${LIBNAME}") if (ENABLE_TESTS) - #TODO: +if (WIN32) +# FIXME: # add_subdirectory(testsuite) + message(STATUS "############ FIXME: add_subdirectory(testsuite)") +else () + add_subdirectory(testsuite) +endif () endif () if (ENABLE_SAMPLES) - #TODO: Looks like the samples use crypto somehow? - #add_subdirectory(samples) +if (WIN32) +# FIXME: Looks like the samples use crypto somehow? +# add_subdirectory(samples) +message(STATUS "############ FIXME: add_subdirectory(samples)") +else () + add_subdirectory(testsuite) +endif () endif () diff --git a/appveyor.yml b/appveyor.yml index 69fddd1f4..fc0eceb1b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -76,12 +76,12 @@ install: - c:\cygwin\bin\cat /proc/cpuinfo - c:\cygwin\bin\cat /proc/meminfo - ps: | - if (Test-Path "$env:ChocolateyInstall/bin/jom.exe") { + if (Test-Path "$env:ChocolateyInstall\bin\jom.exe") { echo "using jom from cache" } else { choco install jom } - if (Test-Path "$env:ChocolateyInstall/bin/cmake.exe") { + if (Test-Path "$env:ChocolateyInstall\bin\cmake.exe") { echo "using cmake from cache" } else { choco install cmake @@ -195,7 +195,7 @@ build_script: } catch { Write-Warning "Oops: $_" } - $host.SetShouldExit(0); + cd .. } before_test: From 3ebe0afd29d4031acfc9d799777def52712f1688 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 08:43:08 +0100 Subject: [PATCH 21/69] Dispaly using cmake test Signed-off-by: FrancisANDRE --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index fc0eceb1b..13c059847 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,8 @@ version: poco-1.7.0 {branch}-{build} cache: - - c:\mysql-5.7.9-win32 +# - c:\mysql-5.7.9-win32 + - C:\ProgramData\chocolatey hosts: localhost: 127.0.0.1 From 09e1f98b793b957ba90277654f0618269a56f86e Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 08:43:34 +0100 Subject: [PATCH 22/69] Show what to fix. Signed-off-by: FrancisANDRE --- NetSSL_Win/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NetSSL_Win/CMakeLists.txt b/NetSSL_Win/CMakeLists.txt index d00c8849e..527135765 100644 --- a/NetSSL_Win/CMakeLists.txt +++ b/NetSSL_Win/CMakeLists.txt @@ -34,7 +34,7 @@ if (ENABLE_TESTS) if (WIN32) # FIXME: # add_subdirectory(testsuite) - message(STATUS "############ FIXME: add_subdirectory(testsuite)") + message(STATUS "############ FIXME: ${LIBNAME} add_subdirectory(testsuite)") else () add_subdirectory(testsuite) endif () @@ -43,7 +43,7 @@ if (ENABLE_SAMPLES) if (WIN32) # FIXME: Looks like the samples use crypto somehow? # add_subdirectory(samples) -message(STATUS "############ FIXME: add_subdirectory(samples)") + message(STATUS "############ FIXME: ${LIBNAME} add_subdirectory(samples)") else () add_subdirectory(testsuite) endif () From 33a4d781b98c93046de7162f0303ad9af5b8ec1c Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 08:47:04 +0100 Subject: [PATCH 23/69] Display component under ctest. Signed-off-by: FrancisANDRE --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 13c059847..ed97e11de 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -266,11 +266,11 @@ test_script: Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec } } - else - { - Write-Host -ForegroundColor Yellow 'using cmake' - } } + else + { + Write-Host -ForegroundColor Yellow 'using ctest -VV -R ' $component + } } else { From 680b29198cb4ad0d42068c9d7de2a3efd76bdf8c Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 09:13:44 +0100 Subject: [PATCH 24/69] Add single quote '\'' as delimiter. Signed-off-by: FrancisANDRE --- CppUnit/src/TextTestResult.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppUnit/src/TextTestResult.cpp b/CppUnit/src/TextTestResult.cpp index 25d74c65f..25e7cadab 100644 --- a/CppUnit/src/TextTestResult.cpp +++ b/CppUnit/src/TextTestResult.cpp @@ -43,10 +43,10 @@ void TextTestResult::setup() std::string::const_iterator end = ignored.end(); while (it != end) { - while (it != end && (std::isspace(*it) || *it == '"')) ++it; + while (it != end && (std::isspace(*it) || *it == '"' || *it == '\'')) ++it; std::string test; - while (it != end && *it != ',' && *it != '"') test += *it++; - if (it != end && (*it == ',' || *it == '"')) ++it; + while (it != end && *it != ',' && *it != '"' && *it != '\'') test += *it++; + if (it != end && (*it == ',' || *it == '"' || *it == '\'')) ++it; if (!test.empty()) _ignored.insert(test); } } From 39ca46f7ce38b9b7b7797c12477eb6a941d899e2 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 09:18:13 +0100 Subject: [PATCH 25/69] Run ctest.. Signed-off-by: FrancisANDRE --- appveyor.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ed97e11de..c2a1508cf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -200,15 +200,28 @@ build_script: } before_test: - - set CPPUNIT_IGNORE="class CppUnit::TestCaller.testTimeSync" - set POCO_BASE=%CD% + - set CPPUNIT_IGNORE='class CppUnit::TestCaller.testTimeSync, class CppUnit::TestCaller.testEchoIPv4, class CppUnit::TestCaller.test +SendToReceiveFromIPv4, class CppUnit::TestCaller.testPing' after_test: test_script: - ps: | - $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') + if ($env:builder -eq "msbuild") + { + $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') + } + if ($env:builder -eq "cmake") + { + $excluded = @( + 'CppUnit', 'CppUnit/WinTestRunner', 'NetSSL_OpenSSL', + 'Data','Data/ODBC','Data/MySQL', + 'PageCompiler','PageCompiler/File2Page', + 'PDF','Redis', 'PocoDoc','ProGen' + ) + } $runs=0;$fails=0;$failedTests='';$status=0;$tab="`t"; $line='-------------------------------------------------------------------------------------'; @@ -270,6 +283,7 @@ test_script: else { Write-Host -ForegroundColor Yellow 'using ctest -VV -R ' $component + ctest -VV -R $component } } else From 0100acee17a2cf7b2ed91aee4ecc8159f1f11f76 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 09:48:31 +0100 Subject: [PATCH 26/69] Set CPPUNIT_IGNORE with PS Signed-off-by: FrancisANDRE --- appveyor.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c2a1508cf..7099298c9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -201,14 +201,18 @@ build_script: before_test: - set POCO_BASE=%CD% - - set CPPUNIT_IGNORE='class CppUnit::TestCaller.testTimeSync, class CppUnit::TestCaller.testEchoIPv4, class CppUnit::TestCaller.test -SendToReceiveFromIPv4, class CppUnit::TestCaller.testPing' + - ps: | + $CPPUNIT_IGNORE=''; + $CPPUNIT_IGNORE+='class CppUnit::TestCaller.testTimeSync'; + $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testEchoIPv4'; + $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testSendToReceiveFromIPv4'; + $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testPing'; + set-item -force -path "ENV:CPPUNIT_IGNORE" -value $CPPUNIT_IGNORE after_test: test_script: - ps: | - if ($env:builder -eq "msbuild") { $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') From 924dc12d0501c0bde6f2b1f7b961ba5d1507a7cd Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 10:15:21 +0100 Subject: [PATCH 27/69] Stay in cmake-build for the build with cmake Signed-off-by: FrancisANDRE --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7099298c9..75af55d99 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -196,7 +196,7 @@ build_script: } catch { Write-Warning "Oops: $_" } - cd .. + $ErrorActionPreference = 'Stop'; } before_test: @@ -215,10 +215,12 @@ test_script: - ps: | if ($env:builder -eq "msbuild") { + $components = gc components; $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') } if ($env:builder -eq "cmake") { + $components = gc ..\components; $excluded = @( 'CppUnit', 'CppUnit/WinTestRunner', 'NetSSL_OpenSSL', 'Data','Data/ODBC','Data/MySQL', @@ -229,7 +231,6 @@ test_script: $runs=0;$fails=0;$failedTests='';$status=0;$tab="`t"; $line='-------------------------------------------------------------------------------------'; - $components = gc components; Write-Host components; Write-Host -ForegroundColor Yellow $line; $components; From 5dd501fd1e131aecd88addfdecf9238678359869 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 10:36:59 +0100 Subject: [PATCH 28/69] Reformat. Signed-off-by: FrancisANDRE --- appveyor.yml | 81 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 33 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 75af55d99..d9d1f8c5a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,13 +46,13 @@ environment: vsver: 120 linkmode: shared -# - builder: msbuild -# vsver: 120 -# linkmode: static_md + - builder: msbuild + vsver: 120 + linkmode: static_md -# - builder: msbuild -# vsver: 120 -# linkmode: static_mt + - builder: msbuild + vsver: 120 + linkmode: static_mt - builder: msbuild vsver: 140 @@ -117,6 +117,7 @@ install: # } before_build: + - set POCO_BASE=%CD% - ps: | if ($env:vsver -eq "120") { @@ -185,6 +186,7 @@ build_script: -Args "$env:vsver build $env:linkmode $env:configuration $env:platform ` $samples $tests msbuild $verbosity $logger"; gc cout; gc cerr; + Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; } if ($env:builder -eq "cmake") { @@ -196,11 +198,11 @@ build_script: } catch { Write-Warning "Oops: $_" } + Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; $ErrorActionPreference = 'Stop'; } before_test: - - set POCO_BASE=%CD% - ps: | $CPPUNIT_IGNORE=''; $CPPUNIT_IGNORE+='class CppUnit::TestCaller.testTimeSync'; @@ -215,18 +217,9 @@ test_script: - ps: | if ($env:builder -eq "msbuild") { - $components = gc components; - $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') } if ($env:builder -eq "cmake") { - $components = gc ..\components; - $excluded = @( - 'CppUnit', 'CppUnit/WinTestRunner', 'NetSSL_OpenSSL', - 'Data','Data/ODBC','Data/MySQL', - 'PageCompiler','PageCompiler/File2Page', - 'PDF','Redis', 'PocoDoc','ProGen' - ) } $runs=0;$fails=0;$failedTests='';$status=0;$tab="`t"; @@ -242,20 +235,24 @@ test_script: if ($env:configuration -eq "release") { - $suffix = ''; - if ($env:platform -eq "Win32") + if ($env:msbuild -eq "msbuild") { - $env:PATH = "$env:CD\bin;" + $env:PATH;$suffix = ''; - } - if ($env:platform -eq "x64") - { - $env:PATH = "$env:CD\bin64;" + $env:PATH;$suffix = 64; - } - - foreach ($component in $components) { - if ($excluded -notcontains $component) + $suffix = ''; + if ($env:platform -eq "Win32") { - if ($env:msbuild -eq "msbuild") + $env:PATH = "$env:POCO_BASE\bin;" + $env:PATH;$suffix = ''; + } + if ($env:platform -eq "x64") + { + $env:PATH = "$env:POCO_BASE\bin64;" + $env:PATH;$suffix = 64; + } + + Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; + $components = gc components; + $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') + + foreach ($component in $components) { + if ($excluded -notcontains $component) { [string]$path = $component + "\testsuite\bin$suffix\TestSuite.exe"; @@ -286,14 +283,32 @@ test_script: } } else + { + Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' + } + } + } + if ($env:msbuild -eq "cmake") + { + Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; + $components = gc ..\components; + $excluded = @( + 'CppUnit', 'CppUnit/WinTestRunner', 'NetSSL_OpenSSL', + 'Data','Data/ODBC','Data/MySQL', + 'PageCompiler','PageCompiler/File2Page', + 'PDF','Redis', 'PocoDoc','ProGen' + ); + + foreach ($component in $components) { + if ($excluded -notcontains $component) { Write-Host -ForegroundColor Yellow 'using ctest -VV -R ' $component ctest -VV -R $component - } - } - else - { - Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' + } + else + { + Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' + } } } Write-Host $runs' runs, ' $fails' fails' From 6b6081d95d876cf1cff2fe7a40e8e9555344da70 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 11:13:44 +0100 Subject: [PATCH 29/69] Stay in $POCO_BASE all time Signed-off-by: FrancisANDRE --- appveyor.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d9d1f8c5a..4b8ea44fd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -153,7 +153,7 @@ after_build: - ps: | $line='-------------------------------------------------------------------------------------'; $find='c:\cygwin\bin\find.exe'; - $arg1=". -type f -name '*.cpp' -exec c:\cygwin\bin\grep -n -H "; + $arg1="$env:POCO_BASE -type f -name '*.cpp' -exec c:\cygwin\bin\grep -n -H "; $arg2=" {} ;" Write-Host -ForegroundColor Yellow $line; @@ -190,7 +190,7 @@ build_script: } if ($env:builder -eq "cmake") { - mkdir cmake-build | out-null;cd cmake-build; + mkdir cmake-build | out-null;pushd cmake-build; cmake ../. -G"NMake Makefiles" -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF try { $ErrorActionPreference = 'Continue'; @@ -198,6 +198,7 @@ build_script: } catch { Write-Warning "Oops: $_" } + popd Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; $ErrorActionPreference = 'Stop'; } @@ -210,28 +211,19 @@ before_test: $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testSendToReceiveFromIPv4'; $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testPing'; set-item -force -path "ENV:CPPUNIT_IGNORE" -value $CPPUNIT_IGNORE + Write-Host -ForegroundColor Yellow 'CPPUNIT_IGNORE:' $env:CPPUNIT_IGNORE; after_test: test_script: - ps: | - if ($env:builder -eq "msbuild") - { - } - if ($env:builder -eq "cmake") - { - } - + $components = gc $env:poco_base\components; $runs=0;$fails=0;$failedTests='';$status=0;$tab="`t"; $line='-------------------------------------------------------------------------------------'; Write-Host components; Write-Host -ForegroundColor Yellow $line; $components; Write-Host -ForegroundColor Yellow $line; - Write-Host excluded; - Write-Host -ForegroundColor Yellow $line; - $excluded - Write-Host -ForegroundColor Yellow $line; if ($env:configuration -eq "release") { @@ -248,9 +240,13 @@ test_script: } Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; - $components = gc components; $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') + Write-Host excluded; + Write-Host -ForegroundColor Yellow $line; + $excluded + Write-Host -ForegroundColor Yellow $line; + foreach ($component in $components) { if ($excluded -notcontains $component) { @@ -291,7 +287,7 @@ test_script: if ($env:msbuild -eq "cmake") { Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; - $components = gc ..\components; + pushd cmake-build; $excluded = @( 'CppUnit', 'CppUnit/WinTestRunner', 'NetSSL_OpenSSL', 'Data','Data/ODBC','Data/MySQL', @@ -299,6 +295,11 @@ test_script: 'PDF','Redis', 'PocoDoc','ProGen' ); + Write-Host excluded; + Write-Host -ForegroundColor Yellow $line; + $excluded + Write-Host -ForegroundColor Yellow $line; + foreach ($component in $components) { if ($excluded -notcontains $component) { @@ -310,6 +311,7 @@ test_script: Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' } } + popd } Write-Host $runs' runs, ' $fails' fails' if ($fails -gt 0) From 1b20ce5a85c86e28f5611e823eb9ef007b8f1f1f Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 14:40:04 +0100 Subject: [PATCH 30/69] Fix typos build instead of msbuild Signed-off-by: FrancisANDRE --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4b8ea44fd..e9f005147 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -182,7 +182,7 @@ build_script: $logger='C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; $samples='samples';$tests='tests';$verbosity='minimal'; - $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd" -RSO cout -RSE cerr ` + $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath ".\buildwin.cmd" -RSO cout -RSE cerr ` -Args "$env:vsver build $env:linkmode $env:configuration $env:platform ` $samples $tests msbuild $verbosity $logger"; gc cout; gc cerr; @@ -227,7 +227,7 @@ test_script: if ($env:configuration -eq "release") { - if ($env:msbuild -eq "msbuild") + if ($env:build -eq "msbuild") { $suffix = ''; if ($env:platform -eq "Win32") @@ -284,7 +284,7 @@ test_script: } } } - if ($env:msbuild -eq "cmake") + if ($env:build -eq "cmake") { Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; pushd cmake-build; From 67e63ba83785718600f604441f2170b22d95435d Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 14:57:36 +0100 Subject: [PATCH 31/69] it is builder instead of build...grrr Signed-off-by: FrancisANDRE --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e9f005147..940c3a47b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -182,7 +182,7 @@ build_script: $logger='C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; $samples='samples';$tests='tests';$verbosity='minimal'; - $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath ".\buildwin.cmd" -RSO cout -RSE cerr ` + $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` -Args "$env:vsver build $env:linkmode $env:configuration $env:platform ` $samples $tests msbuild $verbosity $logger"; gc cout; gc cerr; @@ -227,7 +227,7 @@ test_script: if ($env:configuration -eq "release") { - if ($env:build -eq "msbuild") + if ($env:builder -eq "msbuild") { $suffix = ''; if ($env:platform -eq "Win32") @@ -284,7 +284,7 @@ test_script: } } } - if ($env:build -eq "cmake") + if ($env:builder -eq "cmake") { Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; pushd cmake-build; From a5ec27b0ba98eca077515a49e0a2f34a66d85586 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 18:32:59 +0100 Subject: [PATCH 32/69] Use ctest -VV as standalone runner Signed-off-by: FrancisANDRE --- appveyor.yml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 940c3a47b..50d015bef 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -217,14 +217,8 @@ after_test: test_script: - ps: | - $components = gc $env:poco_base\components; $runs=0;$fails=0;$failedTests='';$status=0;$tab="`t"; $line='-------------------------------------------------------------------------------------'; - Write-Host components; - Write-Host -ForegroundColor Yellow $line; - $components; - Write-Host -ForegroundColor Yellow $line; - if ($env:configuration -eq "release") { if ($env:builder -eq "msbuild") @@ -240,6 +234,13 @@ test_script: } Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; + + $components = gc $env:poco_base\components; + Write-Host components; + Write-Host -ForegroundColor Yellow $line; + $components; + Write-Host -ForegroundColor Yellow $line; + $excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF') Write-Host excluded; @@ -288,28 +289,11 @@ test_script: { Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; pushd cmake-build; - $excluded = @( - 'CppUnit', 'CppUnit/WinTestRunner', 'NetSSL_OpenSSL', - 'Data','Data/ODBC','Data/MySQL', - 'PageCompiler','PageCompiler/File2Page', - 'PDF','Redis', 'PocoDoc','ProGen' - ); - - Write-Host excluded; Write-Host -ForegroundColor Yellow $line; - $excluded + ctest -VV -N Write-Host -ForegroundColor Yellow $line; - foreach ($component in $components) { - if ($excluded -notcontains $component) - { - Write-Host -ForegroundColor Yellow 'using ctest -VV -R ' $component - ctest -VV -R $component - } - else - { - Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' - } + ctest -VV -E DataODBC } popd } From 09e6aef0fe3ea794cab93ff5b9708636aab46e88 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 19:13:47 +0100 Subject: [PATCH 33/69] Remove extra typo. Signed-off-by: FrancisANDRE --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 50d015bef..052ad5098 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -294,7 +294,6 @@ test_script: Write-Host -ForegroundColor Yellow $line; ctest -VV -E DataODBC - } popd } Write-Host $runs' runs, ' $fails' fails' From 7f8bd7d11e71cd3ffbd065254227bf4ec900bab6 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Sun, 20 Dec 2015 21:10:43 +0100 Subject: [PATCH 34/69] Restore MySQL for Win32 Signed-off-by: FrancisANDRE --- appveyor.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 052ad5098..f207ef72a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ version: poco-1.7.0 {branch}-{build} cache: -# - c:\mysql-5.7.9-win32 + - c:\mysql-5.7.9-win32 - C:\ProgramData\chocolatey hosts: @@ -101,20 +101,20 @@ install: } # MySQL 32 bit is not available by default on AppVeyor -# - ps: | -# if ($env:platform -eq "Win32") -# { -# if (Test-Path "c:\mysql-5.7.9-win32") { -# echo "using mysql-5.7.9-win32 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 mysql-5.7.9-win32" -# 7z x -y mysql-5.7.9-win32.zip -oc:\ -# } -# } + - ps: | + if ($env:platform -eq "Win32") + { + if (Test-Path "c:\mysql-5.7.9-win32") { + echo "using mysql-5.7.9-win32 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 mysql-5.7.9-win32" + 7z x -y mysql-5.7.9-win32.zip -oc:\ + } + } before_build: - set POCO_BASE=%CD% From bb1e1f053cd948f15ae618dcced61d503a2ab672 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 08:37:36 +0100 Subject: [PATCH 35/69] Add ENABLE_SAMPLES Signed-off-by: FrancisANDRE --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c0ed3f9e..ea0922305 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ # # ENABLE_{COMPONENT} # ENABLE_TESTS +# ENABLE_SAMPLES cmake_minimum_required(VERSION 3.0.0) From 3de6f2f0558d79440e9ab9a1f54dbf2cdc4b29a4 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 08:38:07 +0100 Subject: [PATCH 36/69] CMake: exclude Data which is looping Signed-off-by: FrancisANDRE --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f207ef72a..f73115feb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -293,7 +293,7 @@ test_script: ctest -VV -N Write-Host -ForegroundColor Yellow $line; - ctest -VV -E DataODBC + ctest -VV -E Data* popd } Write-Host $runs' runs, ' $fails' fails' From 4c4238dff7bebd817046cf9c4491040726b91c02 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 11:47:17 +0100 Subject: [PATCH 37/69] Setup proper vctool: (x86 | x86_amd64) Signed-off-by: FrancisANDRE --- appveyor.yml | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f73115feb..5c66e3762 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,35 +37,47 @@ environment: # + FullyQualifiedErrorId : NativeCommandError # # Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc -# ------------------------------------------------------------------------------------------- - - builder: cmake - vsver: 120 -# ------------------------------------------------------------------------------------------- - builder: msbuild vsver: 120 linkmode: shared + vctool: x86 + + - builder: msbuild + vsver: 120 + linkmode: shared + vctool: x86_amd64 - builder: msbuild vsver: 120 linkmode: static_md + vctool: x86 - builder: msbuild vsver: 120 linkmode: static_mt + vctool: x86 - builder: msbuild vsver: 140 linkmode: shared + vctool: x86 # - builder: msbuild # vsver: 140 # linkmode: static_md +# vctool: x86 # - builder: msbuild # vsver: 140 # linkmode: static_mt +# vctool: x86 +# ------------------------------------------------------------------------------------------- + - builder: cmake + vsver: 120 + vctool: x86 +# ------------------------------------------------------------------------------------------- matrix: fast_finish: true @@ -119,15 +131,21 @@ install: before_build: - set POCO_BASE=%CD% - ps: | + if ($env:vsver -eq "110") + { + $vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010' + } if ($env:vsver -eq "120") { - pushd $env:VS120COMNTOOLS; $yyyy='2013' + $vspath= convert-path $env:VS120COMNTOOLS\..\..\VC\bin; $yyyy='2013' } if ($env:vsver -eq "140") { - pushd $env:VS140COMNTOOLS; $yyyy='2015' + $vspath= convert-path $env:VS140COMNTOOLS\..\..\VC\bin; $yyyy='2015' } - cmd /c "vsvars32.bat&set" | + pushd $vspath; + $tool= if($env:vctool -eq "x86") {'x32'} else {$env:vctool} + cmd /c "vcvars$tool.bat&set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" @@ -135,6 +153,7 @@ before_build: } popd write-host "`nVisual Studio $yyyy Command Prompt variables set." -ForegroundColor Yellow + cl # MySQL - ps: | @@ -156,20 +175,26 @@ after_build: $arg1="$env:POCO_BASE -type f -name '*.cpp' -exec c:\cygwin\bin\grep -n -H "; $arg2=" {} ;" - Write-Host -ForegroundColor Yellow $line; $word='FIXME' + Write-Host -ForegroundColor Yellow $line; + Write-Host -ForegroundColor Yellow $word; + Write-Host -ForegroundColor Yellow $line; Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host;Write-Host; - Write-Host -ForegroundColor Yellow $line; $word='TODO' + Write-Host -ForegroundColor Yellow $line; + Write-Host -ForegroundColor Yellow $word; + Write-Host -ForegroundColor Yellow $line; Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host;Write-Host; - Write-Host -ForegroundColor Yellow $line; $word='HACK' + Write-Host -ForegroundColor Yellow $line; + Write-Host -ForegroundColor Yellow $word; + Write-Host -ForegroundColor Yellow $line; Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host;Write-Host; @@ -287,12 +312,12 @@ test_script: } if ($env:builder -eq "cmake") { - Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; pushd cmake-build; Write-Host -ForegroundColor Yellow $line; - ctest -VV -N + ctest -N Write-Host -ForegroundColor Yellow $line; + Write-Host -ForegroundColor Yellow 'ctest -VV -E Data*' ctest -VV -E Data* popd } From e744b6b95a3655d6d94baf63bc41074c6a8485bd Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 11:54:13 +0100 Subject: [PATCH 38/69] Fix bindirectory when not x86 Signed-off-by: FrancisANDRE --- appveyor.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 5c66e3762..ae3d0b2f8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -134,14 +134,18 @@ before_build: if ($env:vsver -eq "110") { $vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010' + if($env:vctool -ne "x86") { $vspath+=$env:vctool } } if ($env:vsver -eq "120") { - $vspath= convert-path $env:VS120COMNTOOLS\..\..\VC\bin; $yyyy='2013' + $vspath= convert-path $env:VS120COMNTOOLS\..\..\VC\bin;$yyyy='2013' + if($env:vctool -ne "x86") { $vspath+=$env:vctool } + } if ($env:vsver -eq "140") { $vspath= convert-path $env:VS140COMNTOOLS\..\..\VC\bin; $yyyy='2015' + if($env:vctool -ne "x86") { $vspath+=$env:vctool } } pushd $vspath; $tool= if($env:vctool -eq "x86") {'x32'} else {$env:vctool} From dfef644f61868f3aa54cb62c82578556b6e4aaae Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 12:04:13 +0100 Subject: [PATCH 39/69] Manage idiosyncrasies from VisualStudio Signed-off-by: FrancisANDRE --- appveyor.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ae3d0b2f8..72bccc367 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -134,21 +134,24 @@ before_build: if ($env:vsver -eq "110") { $vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010' - if($env:vctool -ne "x86") { $vspath+=$env:vctool } + if($env:platform -eq 'Win32') { $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:vctool -ne "x86") { $vspath+=$env:vctool } + 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:vctool -ne "x86") { $vspath+=$env:vctool } + if($env:platform -eq 'Win32') { $vctool='';} + if($env:platform -eq 'x64') { $vctool='x86_amd64;$vspath+=$vctool } } pushd $vspath; - $tool= if($env:vctool -eq "x86") {'x32'} else {$env:vctool} + $tool= if($vctool -eq '') {'32'} else {$vctool} cmd /c "vcvars$tool.bat&set" | foreach { if ($_ -match "=") { From e48a94c29ca60bd705376fc5de3911f017cc76c3 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 12:06:51 +0100 Subject: [PATCH 40/69] Remove vctool environment variable. Signed-off-by: FrancisANDRE --- appveyor.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 72bccc367..9a2443e17 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,42 +41,30 @@ environment: - builder: msbuild vsver: 120 linkmode: shared - vctool: x86 - - - builder: msbuild - vsver: 120 - linkmode: shared - vctool: x86_amd64 - builder: msbuild vsver: 120 linkmode: static_md - vctool: x86 - builder: msbuild vsver: 120 linkmode: static_mt - vctool: x86 - builder: msbuild vsver: 140 linkmode: shared - vctool: x86 # - builder: msbuild # vsver: 140 # linkmode: static_md -# vctool: x86 # - builder: msbuild # vsver: 140 # linkmode: static_mt -# vctool: x86 # ------------------------------------------------------------------------------------------- - builder: cmake vsver: 120 - vctool: x86 # ------------------------------------------------------------------------------------------- matrix: From 95183aa10be41065bc4582d4ebcf732734befff6 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 12:18:31 +0100 Subject: [PATCH 41/69] Fix path. Signed-off-by: FrancisANDRE --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9a2443e17..c364bc187 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -123,20 +123,20 @@ before_build: { $vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010' 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: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 } + if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool } } pushd $vspath; $tool= if($vctool -eq '') {'32'} else {$vctool} @@ -147,7 +147,7 @@ before_build: } } popd - write-host "`nVisual Studio $yyyy Command Prompt variables set." -ForegroundColor Yellow + write-host "`nVisual Studio $yyyy $vctool Command Prompt variables set." -ForegroundColor Yellow cl # MySQL From 24b5619c95a7bb3ea3ce1e034719551dea8b80ec Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 12:36:08 +0100 Subject: [PATCH 42/69] Avoid build on Travis for AppVeyor only changes Signed-off-by: FrancisANDRE --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 562133463..e9ab2d8b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,11 @@ language: cpp cache: - apt +branches: + except: + - - /*?pp?eyor*/ + + before_install: # we need a recent version of CMake # - sudo add-apt-repository -y ppa:andykimpe/cmake3 From f16eb43e6bd0050916eaa85c88cab122e8bcd6f7 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 12:37:44 +0100 Subject: [PATCH 43/69] Only one - please Signed-off-by: FrancisANDRE --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e9ab2d8b7..da3157848 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ cache: branches: except: - - - /*?pp?eyor*/ + - /*?pp?eyor*/ before_install: From 7dbca395c59a92fa86b39c6ed49916a85fcdc397 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 12:48:02 +0100 Subject: [PATCH 44/69] Do also install Signed-off-by: FrancisANDRE --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index da3157848..6ff6f4268 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,20 +54,20 @@ matrix: - env: TEST_NAME="Linux gcc (make) bundled" compiler: gcc script: - - ./configure --everything && make -s -j2 + - ./configure --everything && make install -s -j2 - ./travis/runtests.sh - env: TEST_NAME="Linux gcc (make) unbundled" compiler: gcc script: - sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev - - ./configure --everything --unbundled && make -s -j2 + - ./configure --everything --unbundled && make install -s -j2 - ./travis/runtests.sh - env: TEST_NAME="Linux clang (make)" compiler: clang script: - - ./configure --everything --config=Linux-clang && make -s -j2 + - ./configure --everything --config=Linux-clang && make install -s -j2 - ./travis/runtests.sh - env: TEST_NAME="Linux arm-linux-gnueabi- (make)" @@ -78,7 +78,7 @@ matrix: compiler: gcc script: # disable tests, gcc-4.6 gets an internal compiler error - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make install -j2 && cd .. - env: TEST_NAME="gcc-4.8 (CMake)" compiler: gcc @@ -88,24 +88,24 @@ matrix: - sudo apt-get install -qq -y g++-4.8 - export CC="gcc-4.8" - export CXX="g++-4.8" - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make install -j2 && cd .. - env: TEST_NAME="Linux clang (CMake)" compiler: clang script: - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make install -j2 && cd .. - env: TEST_NAME="Linux arm-linux-gnueabi-g++ (CMake)" script: - export CC="arm-linux-gnueabi-gcc" - export CXX="arm-linux-gnueabi-g++" - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make install -j2 && cd .. - env: TEST_NAME="Linux arm-linux-gnueabihf-g++ (CMake)" script: - export CC="arm-linux-gnueabihf-gcc" - export CXX="arm-linux-gnueabihf-g++" - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make install -j2 && cd .. # TODO osx build # TODO run test suite From 7fec1a24db2be3a3bc6b1256dc86698d144185e0 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 14:04:18 +0100 Subject: [PATCH 45/69] Reformat. Signed-off-by: FrancisANDRE --- .travis.yml | 10 +++++----- appveyor.yml | 27 ++++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ff6f4268..b2ff9fdb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,27 +47,27 @@ matrix: script: - ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite - cat config.* - - make install -j2 + - make install -j2 && ls -l /usr/local/lib/*Poco* - find . -name "*testrunner*" - ./travis/runtests.sh - env: TEST_NAME="Linux gcc (make) bundled" compiler: gcc script: - - ./configure --everything && make install -s -j2 + - ./configure --everything && make install -s -j2 && ls -l /usr/local/lib/*Poco* - ./travis/runtests.sh - env: TEST_NAME="Linux gcc (make) unbundled" compiler: gcc script: - sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev - - ./configure --everything --unbundled && make install -s -j2 + - ./configure --everything --unbundled && make install -s -j2 && ls -l /usr/local/lib/*Poco* - ./travis/runtests.sh - env: TEST_NAME="Linux clang (make)" compiler: clang script: - - ./configure --everything --config=Linux-clang && make install -s -j2 + - ./configure --everything --config=Linux-clang && make install -s -j2 && ls -l /usr/local/lib/*Poco* - ./travis/runtests.sh - env: TEST_NAME="Linux arm-linux-gnueabi- (make)" @@ -78,7 +78,7 @@ matrix: compiler: gcc script: # disable tests, gcc-4.6 gets an internal compiler error - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make install -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make install -j2 && cd .. && ls -l /usr/local/lib/*Poco* - env: TEST_NAME="gcc-4.8 (CMake)" compiler: gcc diff --git a/appveyor.yml b/appveyor.yml index c364bc187..cb8c5b366 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,20 +23,8 @@ configuration: environment: bundling: bundled + matrix: -# ------------------------------------------------------------------------------------------- -# When builder is cmake, it remains one exception reported below -# Once this problem fixed, the try/catch around the cmake builder can be removed -# -# [ 1%] Generating pocomsg.h -# cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc -# At line:16 char:3 -# + cmake --build . --config $env:configuration -# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# + CategoryInfo : NotSpecified: (MC: Compiling C.../src/pocomsg.mc:String) [], RemoteException -# + FullyQualifiedErrorId : NativeCommandError -# -# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc - builder: msbuild vsver: 120 @@ -62,6 +50,19 @@ environment: # vsver: 140 # linkmode: static_mt +# ------------------------------------------------------------------------------------------- +# When builder is cmake, it remains one exception reported below +# Once this problem fixed, the try/catch around the cmake builder can be removed +# +# [ 1%] Generating pocomsg.h +# cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc +# At line:16 char:3 +# + cmake --build . --config $env:configuration +# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# + CategoryInfo : NotSpecified: (MC: Compiling C.../src/pocomsg.mc:String) [], RemoteException +# + FullyQualifiedErrorId : NativeCommandError +# +# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc # ------------------------------------------------------------------------------------------- - builder: cmake vsver: 120 From 14383d81824cb63372552b4283575d85fc4d70aa Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 18:45:12 +0100 Subject: [PATCH 46/69] single cl command fails under PS. Signed-off-by: FrancisANDRE --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index cb8c5b366..c678a2e61 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -148,8 +148,7 @@ before_build: } } popd - write-host "`nVisual Studio $yyyy $vctool Command Prompt variables set." -ForegroundColor Yellow - cl + write-host "`nVisual Studio $yyyy Command Prompt variables set." -ForegroundColor Yellow # MySQL - ps: | From 2668dba030534f2890fb72131ee600451f50d53a Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 19:09:59 +0100 Subject: [PATCH 47/69] Load cmake only wghen builder is cmake Signed-off-by: FrancisANDRE --- appveyor.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c678a2e61..0ff867d81 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -78,18 +78,19 @@ install: - c:\cygwin\bin\cat /proc/cpuinfo - c:\cygwin\bin\cat /proc/meminfo - ps: | - if (Test-Path "$env:ChocolateyInstall\bin\jom.exe") { - echo "using jom from cache" - } else { - choco install jom - } - if (Test-Path "$env:ChocolateyInstall\bin\cmake.exe") { + if ($env:builder -eq "cmake") + { + if (Test-Path "$env:ChocolateyInstall\bin\jom.exe") { + echo "using jom from cache" + } else { + choco install jom + } + if (Test-Path "$env:ChocolateyInstall\bin\cmake.exe") { echo "using cmake from cache" - } else { + } else { choco install cmake + } } - - where cmake - - where jom - set # chocolatey brokes jom, here's workaround From dccf1bcc4034c6865867b985abcb65eb41bc7109 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 21:10:49 +0100 Subject: [PATCH 48/69] Do msbuild test only when shared build Signed-off-by: FrancisANDRE --- appveyor.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0ff867d81..c1779de88 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -172,27 +172,27 @@ after_build: $arg2=" {} ;" $word='FIXME' - Write-Host -ForegroundColor Yellow $line; Write-Host -ForegroundColor Yellow $word; Write-Host -ForegroundColor Yellow $line; Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; + Write-Host -ForegroundColor Yellow $line; Write-Host;Write-Host; $word='TODO' - Write-Host -ForegroundColor Yellow $line; Write-Host -ForegroundColor Yellow $word; Write-Host -ForegroundColor Yellow $line; Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; + Write-Host -ForegroundColor Yellow $line; Write-Host;Write-Host; $word='HACK' - Write-Host -ForegroundColor Yellow $line; Write-Host -ForegroundColor Yellow $word; Write-Host -ForegroundColor Yellow $line; Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; + Write-Host -ForegroundColor Yellow $line; Write-Host;Write-Host; @@ -200,7 +200,7 @@ build_script: - ps: | if ($env:builder -eq "msbuild") { - $logger='C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; + $logger='C:\Program Files (x86)\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; $samples='samples';$tests='tests';$verbosity='minimal'; $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` @@ -242,7 +242,7 @@ test_script: $line='-------------------------------------------------------------------------------------'; if ($env:configuration -eq "release") { - if ($env:builder -eq "msbuild") + if ($env:builder -eq "msbuild" -and $env:linkmode -eq "shared") { $suffix = ''; if ($env:platform -eq "Win32") @@ -270,9 +270,9 @@ test_script: Write-Host -ForegroundColor Yellow $line; foreach ($component in $components) { - if ($excluded -notcontains $component) - { - [string]$path = $component + "\testsuite\bin$suffix\TestSuite.exe"; + if ($excluded -notcontains $component) { + $path = "$env:poco_base\" + $component + "\testsuite\bin$suffix\TestSuite.exe"; + Write-Host -ForegroundColor Yellow 'path='$path; if (Test-Path -Path $path) { $runs += 1; @@ -289,19 +289,14 @@ test_script: gc cout; gc cerr; - if ($process.ExitCode -gt 0) - { + if ($process.ExitCode -gt 0) { $fails += 1;$failedTests += $component + ', '; Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Failed' -Duration $millisec - } - else - { + } else { Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec } } - } - else - { + } else { Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' } } From 482699581b3457513ae8b1c26b31c8aa26c6c703 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 21:38:23 +0100 Subject: [PATCH 49/69] put samples & tests as constant literal. Signed-off-by: FrancisANDRE --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c1779de88..26f1233da 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -200,12 +200,12 @@ build_script: - ps: | if ($env:builder -eq "msbuild") { - $logger='C:\Program Files (x86)\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; - $samples='samples';$tests='tests';$verbosity='minimal'; + $logger='"C:\Program Files (x86)\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'; + $verbosity='minimal'; $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` -Args "$env:vsver build $env:linkmode $env:configuration $env:platform ` - $samples $tests msbuild $verbosity $logger"; + samples tests msbuild $verbosity $logger"; gc cout; gc cerr; Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; } @@ -232,7 +232,7 @@ before_test: $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testSendToReceiveFromIPv4'; $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testPing'; set-item -force -path "ENV:CPPUNIT_IGNORE" -value $CPPUNIT_IGNORE - Write-Host -ForegroundColor Yellow 'CPPUNIT_IGNORE:' $env:CPPUNIT_IGNORE; + Write-Host -ForegroundColor Yellow 'CPPUNIT_IGNORE=' $env:CPPUNIT_IGNORE; after_test: From 38ed73bd846182476af3890dbcb56699caa8efb1 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 22:00:45 +0100 Subject: [PATCH 50/69] Put -Args parameters on a single line. Signed-off-by: FrancisANDRE --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 26f1233da..3701bc2ce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -204,8 +204,7 @@ build_script: $verbosity='minimal'; $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` - -Args "$env:vsver build $env:linkmode $env:configuration $env:platform ` - samples tests msbuild $verbosity $logger"; + -Args "$env:vsver build $env:linkmode $env:configuration $env:platform samples tests msbuild $verbosity $logger"; gc cout; gc cerr; Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; } From 94b2b7d907bd3a32e643ee464df5b68fd5201cdb Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 22:09:37 +0100 Subject: [PATCH 51/69] AppVeyor logger is a x64 dll Signed-off-by: FrancisANDRE --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3701bc2ce..f83a89d91 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -200,7 +200,7 @@ build_script: - ps: | if ($env:builder -eq "msbuild") { - $logger='"C:\Program Files (x86)\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'; + $logger='C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; $verbosity='minimal'; $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` From 896341d7a488f9a0d953bfe626fa4fba2e547694 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 22:17:05 +0100 Subject: [PATCH 52/69] Protect spaced path Signed-off-by: FrancisANDRE --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f83a89d91..db713de27 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -200,7 +200,7 @@ build_script: - ps: | if ($env:builder -eq "msbuild") { - $logger='C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'; + $logger='"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'; $verbosity='minimal'; $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` From 609072a5ada88d608efd8d7a35c6dcfd7d2f33e5 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 23:38:38 +0100 Subject: [PATCH 53/69] Add ENABLE_SAMPLES Signed-off-by: FrancisANDRE --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0922305..38d955994 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,10 @@ option(ENABLE_REDIS "Enable Redis" ON) option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF) option(ENABLE_TESTS - "Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF) + "Set to OFF|ON (default is OFF) to control build of POCO tests" OFF) + +option(ENABLE_SAMPLES + "Set to OFF|ON (default is OFF) to control build of POCO samples" OFF) option(POCO_STATIC "Set to OFF|ON (default is OFF) to control build of POCO as STATIC library" OFF) @@ -112,9 +115,15 @@ endif(POCO_STATIC) if (ENABLE_TESTS) include(CTest) enable_testing() - message(STATUS "Building with unittests & samples") + message(STATUS "Building with unittests") else () - message(STATUS "Building without tests & samples") + message(STATUS "Building without tests") +endif () + +if (ENABLE_SAMPLES) + message(STATUS "Building with samples") +else () + message(STATUS "Building without samples") endif () if (POCO_UNBUNDLED) From 6d96fb30ec0730c7019603cfd3438608428453d7 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 23:39:35 +0100 Subject: [PATCH 54/69] Remove try/catch. Exception is avoided by CPPUNI_IGNORE Signed-off-by: FrancisANDRE --- .../testsuite/src/HTTPSClientSessionTest.cpp | 39 ++++++++--------- .../testsuite/src/HTTPSStreamFactoryTest.cpp | 28 ++++++------- .../testsuite/src/HTTPSClientSessionTest.cpp | 42 +++++++++---------- .../testsuite/src/HTTPSStreamFactoryTest.cpp | 30 ++++++------- 4 files changed, 65 insertions(+), 74 deletions(-) diff --git a/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.cpp b/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.cpp index 7f0508cc0..93d0678dc 100644 --- a/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.cpp +++ b/NetSSL_OpenSSL/testsuite/src/HTTPSClientSessionTest.cpp @@ -307,27 +307,22 @@ void HTTPSClientSessionTest::testInterop() void HTTPSClientSessionTest::testProxy() { - try { - HTTPSTestServer srv; - HTTPSClientSession s("secure.appinf.com"); - s.setProxy( - Application::instance().config().getString("testsuite.proxy.host"), - Application::instance().config().getInt("testsuite.proxy.port") - ); - HTTPRequest request(HTTPRequest::HTTP_GET, "/public/poco/NetSSL.txt"); - s.sendRequest(request); - X509Certificate cert = s.serverCertificate(); - HTTPResponse response; - std::istream& rs = s.receiveResponse(response); - std::ostringstream ostr; - StreamCopier::copyStream(rs, ostr); - std::string str(ostr.str()); - assert(str == "This is a test file for NetSSL.\n"); - assert(cert.commonName() == "secure.appinf.com" || cert.commonName() == "*.appinf.com"); - } - catch (Poco::Net::HTTPException e) { - std::cout << e.displayText() << std::endl; - } + HTTPSTestServer srv; + HTTPSClientSession s("secure.appinf.com"); + s.setProxy( + Application::instance().config().getString("testsuite.proxy.host"), + Application::instance().config().getInt("testsuite.proxy.port") + ); + HTTPRequest request(HTTPRequest::HTTP_GET, "/public/poco/NetSSL.txt"); + s.sendRequest(request); + X509Certificate cert = s.serverCertificate(); + HTTPResponse response; + std::istream& rs = s.receiveResponse(response); + std::ostringstream ostr; + StreamCopier::copyStream(rs, ostr); + std::string str(ostr.str()); + assert(str == "This is a test file for NetSSL.\n"); + assert(cert.commonName() == "secure.appinf.com" || cert.commonName() == "*.appinf.com"); } @@ -480,7 +475,7 @@ CppUnit::Test* HTTPSClientSessionTest::suite() CppUnit_addTest(pSuite, HTTPSClientSessionTest, testKeepAlive); CppUnit_addTest(pSuite, HTTPSClientSessionTest, testInterop); #ifdef FIXME - should use a public proxy server + testProxy should use a public proxy server http://www.publicproxyservers.com/proxy/list1.html Really working public proxy servers - page 1 of 6. #endif diff --git a/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp b/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp index 91dee0a4c..a19c20692 100644 --- a/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp +++ b/NetSSL_OpenSSL/testsuite/src/HTTPSStreamFactoryTest.cpp @@ -85,21 +85,17 @@ void HTTPSStreamFactoryTest::testRedirect() void HTTPSStreamFactoryTest::testProxy() { - try { - HTTPSTestServer server; - HTTPSStreamFactory factory( - Application::instance().config().getString("testsuite.proxy.host"), - Application::instance().config().getInt("testsuite.proxy.port") - ); - URI uri("https://secure.appinf.com/public/poco/NetSSL.txt"); - std::auto_ptr pStr(factory.open(uri)); - std::ostringstream ostr; - StreamCopier::copyStream(*pStr.get(), ostr); - assert(ostr.str().length() > 0); - } - catch (Poco::Net::HTTPException e) { - std::cout << e.displayText() << std::endl; - } + HTTPSTestServer server; + HTTPSStreamFactory factory( + Application::instance().config().getString("testsuite.proxy.host"), + Application::instance().config().getInt("testsuite.proxy.port") + ); + URI uri("https://secure.appinf.com/public/poco/NetSSL.txt"); + std::auto_ptr pStr(factory.open(uri)); + std::ostringstream ostr; + StreamCopier::copyStream(*pStr.get(), ostr); + assert(ostr.str().length() > 0); + } @@ -139,7 +135,7 @@ CppUnit::Test* HTTPSStreamFactoryTest::suite() CppUnit_addTest(pSuite, HTTPSStreamFactoryTest, testEmptyPath); CppUnit_addTest(pSuite, HTTPSStreamFactoryTest, testRedirect); #ifdef FIXME - should use a public proxy server + testProxy should use a public proxy server http://www.publicproxyservers.com/proxy/list1.html Really working public proxy servers - page 1 of 6. #endif diff --git a/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp b/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp index 0e2fb1df3..706b45a7f 100644 --- a/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp +++ b/NetSSL_Win/testsuite/src/HTTPSClientSessionTest.cpp @@ -314,27 +314,27 @@ void HTTPSClientSessionTest::testInterop() void HTTPSClientSessionTest::testProxy() { - try { - HTTPSTestServer srv; - HTTPSClientSession s("secure.appinf.com"); - s.setProxy( - Application::instance().config().getString("testsuite.proxy.host"), - Application::instance().config().getInt("testsuite.proxy.port") - ); - HTTPRequest request(HTTPRequest::HTTP_GET, "/public/poco/NetSSL.txt"); - s.sendRequest(request); - Poco::Net::X509Certificate cert = s.serverCertificate(); - HTTPResponse response; - std::istream& rs = s.receiveResponse(response); - std::ostringstream ostr; - StreamCopier::copyStream(rs, ostr); - std::string str(ostr.str()); - assert(str == "This is a test file for NetSSL.\n"); - assert(cert.commonName() == "secure.appinf.com" || cert.commonName() == "*.appinf.com"); - } - catch (Poco::Exception e) { - std::cout << e.displayText() << std::endl; - } +#ifdef FIXME + testProxy should use a public proxy server + http://www.publicproxyservers.com/proxy/list1.html + Really working public proxy servers - page 1 of 6. +#endif + HTTPSTestServer srv; + HTTPSClientSession s("secure.appinf.com"); + s.setProxy( + Application::instance().config().getString("testsuite.proxy.host"), + Application::instance().config().getInt("testsuite.proxy.port") + ); + HTTPRequest request(HTTPRequest::HTTP_GET, "/public/poco/NetSSL.txt"); + s.sendRequest(request); + Poco::Net::X509Certificate cert = s.serverCertificate(); + HTTPResponse response; + std::istream& rs = s.receiveResponse(response); + std::ostringstream ostr; + StreamCopier::copyStream(rs, ostr); + std::string str(ostr.str()); + assert(str == "This is a test file for NetSSL.\n"); + assert(cert.commonName() == "secure.appinf.com" || cert.commonName() == "*.appinf.com"); } diff --git a/NetSSL_Win/testsuite/src/HTTPSStreamFactoryTest.cpp b/NetSSL_Win/testsuite/src/HTTPSStreamFactoryTest.cpp index bfb96a93b..ade7c79a4 100644 --- a/NetSSL_Win/testsuite/src/HTTPSStreamFactoryTest.cpp +++ b/NetSSL_Win/testsuite/src/HTTPSStreamFactoryTest.cpp @@ -85,21 +85,21 @@ void HTTPSStreamFactoryTest::testRedirect() void HTTPSStreamFactoryTest::testProxy() { - try { - HTTPSTestServer server; - HTTPSStreamFactory factory( - Application::instance().config().getString("testsuite.proxy.host"), - Application::instance().config().getInt("testsuite.proxy.port") - ); - URI uri("https://secure.appinf.com/public/poco/NetSSL.txt"); - std::auto_ptr pStr(factory.open(uri)); - std::ostringstream ostr; - StreamCopier::copyStream(*pStr.get(), ostr); - assert(ostr.str().length() > 0); - } - catch (Poco::Exception e) { - std::cout << e.displayText() << std::endl; - } +#ifdef FIXME + testProxy should use a public proxy server + http://www.publicproxyservers.com/proxy/list1.html + Really working public proxy servers - page 1 of 6. +#endif + HTTPSTestServer server; + HTTPSStreamFactory factory( + Application::instance().config().getString("testsuite.proxy.host"), + Application::instance().config().getInt("testsuite.proxy.port") + ); + URI uri("https://secure.appinf.com/public/poco/NetSSL.txt"); + std::auto_ptr pStr(factory.open(uri)); + std::ostringstream ostr; + StreamCopier::copyStream(*pStr.get(), ostr); + assert(ostr.str().length() > 0); } From a6d30fbde799824d5a02b4622619bce9efec3558 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 23:40:05 +0100 Subject: [PATCH 55/69] Display CPPUNIT_IGNORE list Signed-off-by: FrancisANDRE --- appveyor.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index db713de27..6b7ed4d61 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -225,13 +225,21 @@ build_script: before_test: - ps: | + $line='-------------------------------------------------------------------------------------'; $CPPUNIT_IGNORE=''; $CPPUNIT_IGNORE+='class CppUnit::TestCaller.testTimeSync'; $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testEchoIPv4'; $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testSendToReceiveFromIPv4'; $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testPing'; + $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testProxy'; + $CPPUNIT_IGNORE+=', class CppUnit::TestCaller.testProxy'; set-item -force -path "ENV:CPPUNIT_IGNORE" -value $CPPUNIT_IGNORE - Write-Host -ForegroundColor Yellow 'CPPUNIT_IGNORE=' $env:CPPUNIT_IGNORE; + Write-Host -ForegroundColor Yellow 'CPPUNIT_IGNORE' + Write-Host -ForegroundColor Yellow $line; + foreach($t in $CPPUNIT_IGNORE.split(",")) { Write-Host -ForegroundColor Yellow $t.trim() } + Write-Host -ForegroundColor Yellow $line; + +# N7CppUnit10TestCallerI19MulticastSocketTestEE.testMulticast, \ after_test: @@ -271,7 +279,6 @@ test_script: foreach ($component in $components) { if ($excluded -notcontains $component) { $path = "$env:poco_base\" + $component + "\testsuite\bin$suffix\TestSuite.exe"; - Write-Host -ForegroundColor Yellow 'path='$path; if (Test-Path -Path $path) { $runs += 1; @@ -294,6 +301,8 @@ test_script: } else { Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec } + } else { + Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'NotFound' } } else { Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped' From bd7c7514676c9a81cb15b47b7968d626faa695cb Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 23:40:59 +0100 Subject: [PATCH 56/69] Use sudo for make install Signed-off-by: FrancisANDRE --- .travis.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index b2ff9fdb9..3cc151dd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,29 +45,33 @@ matrix: compiler: clang os: osx script: - - ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite + - ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite && make -j2 - cat config.* - - make install -j2 && ls -l /usr/local/lib/*Poco* + - sudo make install + - ls -l /usr/local/lib/*Poco* - find . -name "*testrunner*" - ./travis/runtests.sh - env: TEST_NAME="Linux gcc (make) bundled" compiler: gcc script: - - ./configure --everything && make install -s -j2 && ls -l /usr/local/lib/*Poco* + - ./configure --everything && make -s -j2 + - sudo make install - ./travis/runtests.sh - env: TEST_NAME="Linux gcc (make) unbundled" compiler: gcc script: - sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev - - ./configure --everything --unbundled && make install -s -j2 && ls -l /usr/local/lib/*Poco* + - ./configure --everything --unbundled && make -s -j2 + - sudo make install - ./travis/runtests.sh - env: TEST_NAME="Linux clang (make)" compiler: clang script: - - ./configure --everything --config=Linux-clang && make install -s -j2 && ls -l /usr/local/lib/*Poco* + - ./configure --everything --config=Linux-clang && make -s -j2 + - sudo make install - ./travis/runtests.sh - env: TEST_NAME="Linux arm-linux-gnueabi- (make)" @@ -78,7 +82,7 @@ matrix: compiler: gcc script: # disable tests, gcc-4.6 gets an internal compiler error - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make install -j2 && cd .. && ls -l /usr/local/lib/*Poco* + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make -j2 && cd .. - env: TEST_NAME="gcc-4.8 (CMake)" compiler: gcc @@ -88,24 +92,24 @@ matrix: - sudo apt-get install -qq -y g++-4.8 - export CC="gcc-4.8" - export CXX="g++-4.8" - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make install -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd .. - env: TEST_NAME="Linux clang (CMake)" compiler: clang script: - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make install -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd .. - env: TEST_NAME="Linux arm-linux-gnueabi-g++ (CMake)" script: - export CC="arm-linux-gnueabi-gcc" - export CXX="arm-linux-gnueabi-g++" - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make install -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd .. - env: TEST_NAME="Linux arm-linux-gnueabihf-g++ (CMake)" script: - export CC="arm-linux-gnueabihf-gcc" - export CXX="arm-linux-gnueabihf-g++" - - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make install -j2 && cd .. + - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd .. # TODO osx build # TODO run test suite From abbbe614b8c61f744cf4e69e9b5c36c16b01fde7 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 21 Dec 2015 23:58:56 +0100 Subject: [PATCH 57/69] Small correction Signed-off-by: FrancisANDRE --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38d955994..203937825 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,7 @@ endif(POCO_STATIC) if (ENABLE_TESTS) include(CTest) enable_testing() - message(STATUS "Building with unittests") + message(STATUS "Building with tests") else () message(STATUS "Building without tests") endif () From 81c81778a0b2d1a09533a33e7aed8ff3d622b486 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Tue, 22 Dec 2015 08:27:47 +0100 Subject: [PATCH 58/69] Remove debug from configuration. Add config info for mysql/mongodb Signed-off-by: FrancisANDRE --- appveyor.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6b7ed4d61..44047b1f4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,43 +9,48 @@ hosts: db.server.com: 127.0.0.2 services: +# mysql : server: localhost, port: 3306 +# mysql : user : root, password: Password12! # - mysql + +# mongodb config : C:\mongodb\mongod.cfg +# mongodb database: C:\mongodb\data\db - mongodb platform: - Win32 - x64 +# tests are run only in release & shared. +# building debug configuration doubles the round time and isn't so useful. configuration: - release - - debug +# - debug environment: bundling: bundled - matrix: - - builder: msbuild vsver: 120 linkmode: shared + - builder: msbuild + vsver: 140 + linkmode: shared + - builder: msbuild vsver: 120 linkmode: static_md - - builder: msbuild - vsver: 120 - linkmode: static_mt - - - builder: msbuild - vsver: 140 - linkmode: shared - # - builder: msbuild # vsver: 140 # linkmode: static_md + - builder: msbuild + vsver: 120 + linkmode: static_mt + # - builder: msbuild # vsver: 140 # linkmode: static_mt @@ -149,7 +154,8 @@ before_build: } } popd - write-host "`nVisual Studio $yyyy Command Prompt variables set." -ForegroundColor Yellow + write-host "`nVisual Studio $yyyy CLI variables set." -ForegroundColor Yellow + # MySQL - ps: | @@ -239,8 +245,6 @@ before_test: foreach($t in $CPPUNIT_IGNORE.split(",")) { Write-Host -ForegroundColor Yellow $t.trim() } Write-Host -ForegroundColor Yellow $line; -# N7CppUnit10TestCallerI19MulticastSocketTestEE.testMulticast, \ - after_test: test_script: From 26c1c8c95d040d4efa474c7a28e581bcbd9282ef Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Tue, 22 Dec 2015 10:58:32 +0100 Subject: [PATCH 59/69] Put vs140 jobs last since it may exceed 1 hour Signed-off-by: FrancisANDRE --- appveyor.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 44047b1f4..f9d93cc43 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,26 +35,14 @@ environment: vsver: 120 linkmode: shared - - builder: msbuild - vsver: 140 - linkmode: shared - - builder: msbuild vsver: 120 linkmode: static_md -# - builder: msbuild -# vsver: 140 -# linkmode: static_md - - builder: msbuild vsver: 120 linkmode: static_mt -# - builder: msbuild -# vsver: 140 -# linkmode: static_mt - # ------------------------------------------------------------------------------------------- # When builder is cmake, it remains one exception reported below # Once this problem fixed, the try/catch around the cmake builder can be removed @@ -72,6 +60,18 @@ environment: - builder: cmake vsver: 120 # ------------------------------------------------------------------------------------------- + - builder: msbuild + vsver: 140 + linkmode: shared + +# - builder: msbuild +# vsver: 140 +# linkmode: static_md + +# - builder: msbuild +# vsver: 140 +# linkmode: static_mt + matrix: fast_finish: true @@ -155,8 +155,7 @@ before_build: } popd write-host "`nVisual Studio $yyyy CLI variables set." -ForegroundColor Yellow - - + # MySQL - ps: | if ($env:platform -eq "Win32") From 622797a7fa8da3878c37fd590c38369f6f62eb6d Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Tue, 22 Dec 2015 16:59:13 +0100 Subject: [PATCH 60/69] Download & use OpenSSL until issue #1093 be fixed Signed-off-by: FrancisANDRE --- appveyor.yml | 83 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 20 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f9d93cc43..28e657107 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,9 @@ version: poco-1.7.0 {branch}-{build} cache: - c:\mysql-5.7.9-win32 - C:\ProgramData\chocolatey - + - C:\OpenSSL-Win32 + - C:\OpenSSL-Win64 + hosts: localhost: 127.0.0.1 db.server.com: 127.0.0.2 @@ -18,33 +20,25 @@ services: - mongodb platform: - - Win32 - x64 + - Win32 +# ------------------------------------------------------------------------------------------- # tests are run only in release & shared. # building debug configuration doubles the round time and isn't so useful. +# ------------------------------------------------------------------------------------------- configuration: - release # - debug +# ------------------------------------------------------------------------------------------- environment: bundling: bundled matrix: - - builder: msbuild - vsver: 120 - linkmode: shared - - - builder: msbuild - vsver: 120 - linkmode: static_md - - - builder: msbuild - vsver: 120 - linkmode: static_mt # ------------------------------------------------------------------------------------------- -# When builder is cmake, it remains one exception reported below +# When building with cmake, it remains one exception reported below # Once this problem fixed, the try/catch around the cmake builder can be removed # # [ 1%] Generating pocomsg.h @@ -59,7 +53,19 @@ environment: # ------------------------------------------------------------------------------------------- - builder: cmake vsver: 120 -# ------------------------------------------------------------------------------------------- + + - builder: msbuild + vsver: 120 + linkmode: shared + + - builder: msbuild + vsver: 120 + linkmode: static_md + + - builder: msbuild + vsver: 120 + linkmode: static_mt + - builder: msbuild vsver: 140 linkmode: shared @@ -98,16 +104,52 @@ install: } - set +# ------------------------------------------------------------------------------------------- # chocolatey brokes jom, here's workaround # see https://github.com/jcfr/qt-easy-build/commit/6366f4275562bdaf4f686838600f46894579c41e) +# ------------------------------------------------------------------------------------------- - ps: | - if ($env:builder -eq "cmake") - { - $env:PATH = $env:ChocolateyInstall + "\bin" + ";" + $env:PATH - $env:PATH = $env:ChocolateyInstall + "\lib\jom\content" + ";" + $env:PATH - } + if ($env:builder -eq "cmake") + { + $env:PATH = $env:ChocolateyInstall + "\bin" + ";" + $env:PATH + $env:PATH = $env:ChocolateyInstall + "\lib\jom\content" + ";" + $env:PATH + } +# ------------------------------------------------------------------------------------------- + +# ------------------------------------------------------------------------------------------- +# OpenSSL-Win32 & OpenSSL-Win64 +# Download & use OpenSSL from Shining Light Productions for CMake +# until CMake use implicitly the embedded openssl from the Poco repo. See issue #1093 +# ------------------------------------------------------------------------------------------- + - ps: | + if ($env:builder -eq "cmake") + { + if ($env:platform -eq "Win32") + { + if (Test-Path "C:\OpenSSL-Win32") { + echo "using C:\OpenSSL-Win32 from cache" + } else { + echo "downloading OpenSSL-Win32" + Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2e.exe' + Start-Process "Win32OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait + } + } + if ($env:platform -eq "x64") + { + if (Test-Path "C:\OpenSSL-Win64") { + echo "using C:\OpenSSL-Win64 from cache" + } else { + echo "downloading OpenSSL-Win64" + Start-FileDownload 'http://slproweb.com/download/Win64OpenSSL-1_0_2e.exe' + Start-Process "Win64OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait + } + } + } +# ------------------------------------------------------------------------------------------- + # MySQL 32 bit is not available by default on AppVeyor +# ------------------------------------------------------------------------------------------- - ps: | if ($env:platform -eq "Win32") { @@ -122,6 +164,7 @@ install: 7z x -y mysql-5.7.9-win32.zip -oc:\ } } + # ------------------------------------------------------------------------------------------- before_build: - set POCO_BASE=%CD% From 273001a68e245cbe414a2872e3777ab524bd7eec Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Tue, 22 Dec 2015 18:12:30 +0100 Subject: [PATCH 61/69] Addjust displayed information. Refactor defined setup for cmake. Remove Kampbell notification. Signed-off-by: FrancisANDRE --- appveyor.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 28e657107..0884783fa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,8 +24,8 @@ platform: - Win32 # ------------------------------------------------------------------------------------------- -# tests are run only in release & shared. # building debug configuration doubles the round time and isn't so useful. +# tests are run only in release & shared. # ------------------------------------------------------------------------------------------- configuration: - release @@ -132,6 +132,7 @@ install: } else { echo "downloading OpenSSL-Win32" Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2e.exe' + echo "installing C:\OpenSSL-Win32" Start-Process "Win32OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait } } @@ -142,6 +143,7 @@ install: } else { echo "downloading OpenSSL-Win64" Start-FileDownload 'http://slproweb.com/download/Win64OpenSSL-1_0_2e.exe' + echo "installing C:\OpenSSL-Win64" Start-Process "Win64OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait } } @@ -154,13 +156,13 @@ install: if ($env:platform -eq "Win32") { if (Test-Path "c:\mysql-5.7.9-win32") { - echo "using mysql-5.7.9-win32 from cache" + echo "using c:\mysql-5.7.9-win32 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 mysql-5.7.9-win32" + echo "installing c:\mysql-5.7.9-win32" 7z x -y mysql-5.7.9-win32.zip -oc:\ } } @@ -259,7 +261,14 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;pushd cmake-build; - cmake ../. -G"NMake Makefiles" -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF + $defs =" -DCMAKE_BUILD_TYPE=$env:configuration"; + $defs+=" -DENABLE_NETSSL=OFF"; + $defs+=" -DENABLE_NETSSL_WIN=ON"; + $defs+=" -DENABLE_DATA_MYSQL=OFF"; + $defs+=" -DENABLE_REDIS=OFF"; + $defs+=" -DENABLE_SAMPLES=ON"; + $defs+=" -DENABLE_TESTS=ON"; + cmake ../. -G"NMake Makefiles" $defs try { $ErrorActionPreference = 'Continue'; cmake --build . --config $env:configuration @@ -391,15 +400,7 @@ notifications: on_build_success: false on_build_failure: false on_build_status_changed: false - - - - provider: Slack - auth_token: - secure: xoOlP1UHshqjvh/INwMcNhZ5UHsTVKLGY5maTSjaxDc0fvRwoWIdYvY/CofQEuy2wOIBQK4eLD+tA0xG78ZgqQ== - channel: poco - on_build_success: false - on_build_status_changed: true - + - provider: Slack incoming_webhook: https://hooks.slack.com/services/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 auth_token: From 14f4e00a5a2176a26cab78d32a58770c774b8081 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 05:31:36 +0100 Subject: [PATCH 62/69] Remove VS2015 builds. See embedded comments. Signed-off-by: FrancisANDRE --- appveyor.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0884783fa..76c717c69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -66,9 +66,19 @@ environment: vsver: 120 linkmode: static_mt - - builder: msbuild - vsver: 140 - linkmode: shared +# ------------------------------------------------------------------------------------------- +# VS2013 run a x64 build & tests in around 32 mn +# Environment: builder=msbuild, vsver=120, linkmode=shared; Platform: x64 33 min 32 sec +# +# In VS2015 runring a x64 build & tests takes twice time and thus makes the build failed since +# it overpasses 1 hour and free Appveyor account job are limited to 1 hour. Thus VS2015 builds +{ are removed until one finds out the reason why time is doubled. See jobs poco-1.7.0 AppVeyorWithCMake-21 +# +# Environment: builder=msbuild, vsver=140, linkmode=shared; Platform: x64 1 hr +# ------------------------------------------------------------------------------------------- +# - builder: msbuild +# vsver: 140 +# linkmode: shared # - builder: msbuild # vsver: 140 From 5d8c378e7e763b9c017cbbb7d784f79a5f3edfe1 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 05:33:05 +0100 Subject: [PATCH 63/69] Fix typo Signed-off-by: FrancisANDRE --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 76c717c69..5c82f0839 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -72,7 +72,7 @@ environment: # # In VS2015 runring a x64 build & tests takes twice time and thus makes the build failed since # it overpasses 1 hour and free Appveyor account job are limited to 1 hour. Thus VS2015 builds -{ are removed until one finds out the reason why time is doubled. See jobs poco-1.7.0 AppVeyorWithCMake-21 +# are removed until one finds out the reason why time is doubled. See jobs poco-1.7.0 AppVeyorWithCMake-21 # # Environment: builder=msbuild, vsver=140, linkmode=shared; Platform: x64 1 hr # ------------------------------------------------------------------------------------------- From d0c6bb52c69172c572453acaf82b72b2cda365a7 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 05:58:45 +0100 Subject: [PATCH 64/69] Remove cmake ../. -G"NMake Makefiles" $defs since it fails at AppVeyor Signed-off-by: FrancisANDRE --- appveyor.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5c82f0839..6cd817625 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,8 +20,8 @@ services: - mongodb platform: - - x64 - Win32 + - x64 # ------------------------------------------------------------------------------------------- # building debug configuration doubles the round time and isn't so useful. @@ -67,13 +67,15 @@ environment: linkmode: static_mt # ------------------------------------------------------------------------------------------- -# VS2013 run a x64 build & tests in around 32 mn +# VS2013 runs a x64 or Win32 build & tests in around 32 mn +# Environment: builder=msbuild, vsver=120, linkmode=shared; Platform: Win32 31 min 33 sec # Environment: builder=msbuild, vsver=120, linkmode=shared; Platform: x64 33 min 32 sec # -# In VS2015 runring a x64 build & tests takes twice time and thus makes the build failed since +# In VS2015 running either a x64 or Win32 build & tests takes twice time and thus makes the build failed since # it overpasses 1 hour and free Appveyor account job are limited to 1 hour. Thus VS2015 builds -# are removed until one finds out the reason why time is doubled. See jobs poco-1.7.0 AppVeyorWithCMake-21 +# are removed until one finds out the reason why build time is doubled. # +# Environment: builder=msbuild, vsver=140, linkmode=shared; Platform: Win32 1 hr # Environment: builder=msbuild, vsver=140, linkmode=shared; Platform: x64 1 hr # ------------------------------------------------------------------------------------------- # - builder: msbuild @@ -271,14 +273,7 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;pushd cmake-build; - $defs =" -DCMAKE_BUILD_TYPE=$env:configuration"; - $defs+=" -DENABLE_NETSSL=OFF"; - $defs+=" -DENABLE_NETSSL_WIN=ON"; - $defs+=" -DENABLE_DATA_MYSQL=OFF"; - $defs+=" -DENABLE_REDIS=OFF"; - $defs+=" -DENABLE_SAMPLES=ON"; - $defs+=" -DENABLE_TESTS=ON"; - cmake ../. -G"NMake Makefiles" $defs + cmake ../. -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=$env:configuration -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; try { $ErrorActionPreference = 'Continue'; cmake --build . --config $env:configuration From 4d86a75493a9b23148d9365bf1ad818d93ec824d Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 06:16:06 +0100 Subject: [PATCH 65/69] Hardcode -DCMAKE_BUILD_TYPE=release Signed-off-by: FrancisANDRE --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6cd817625..35549f647 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -273,10 +273,10 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;pushd cmake-build; - cmake ../. -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=$env:configuration -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; + cmake ../. -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=release -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; try { $ErrorActionPreference = 'Continue'; - cmake --build . --config $env:configuration + cmake --build . --config release } catch { Write-Warning "Oops: $_" } From 70865f3b7d7d7b83091e7b0018011afd7e1a2f3a Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 07:58:39 +0100 Subject: [PATCH 66/69] Use OPENSSL_ROOT_DIR Signed-off-by: FrancisANDRE --- appveyor.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 35549f647..e4ef39e94 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -273,10 +273,27 @@ build_script: if ($env:builder -eq "cmake") { mkdir cmake-build | out-null;pushd cmake-build; - cmake ../. -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=release -DENABLE_SAMPLES=ON -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF; + if ($env:platform -eq "Win32") + { + $opensslrootdir = 'C:\OpenSSL-Win32' + } + if ($env:platform -eq "x64") + { + $opensslrootdir = 'C:\OpenSSL-Win64' + } + + $defs =" `-DCMAKE_BUILD_TYPE=$env:configuration"; + $defs+=" `-DOPENSSL_ROOT_DIR=$opensslrootdir"; + $defs+=" `-DENABLE_NETSSL=OFF"; + $defs+=" `-DENABLE_NETSSL_WIN=ON"; + $defs+=" `-DENABLE_DATA_MYSQL=OFF"; + $defs+=" `-DENABLE_REDIS=OFF"; + $defs+=" `-DENABLE_SAMPLES=ON"; + $defs+=" `-DENABLE_TESTS=ON"; + cmake `-G"NMake Makefiles" $defs .. try { $ErrorActionPreference = 'Continue'; - cmake --build . --config release + cmake `-`-build . `-`-config $env:configuration } catch { Write-Warning "Oops: $_" } From a0f5dc05de192973e95c59b7ab9582be9775acb7 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 12:12:21 +0100 Subject: [PATCH 67/69] Add logging message Signed-off-by: FrancisANDRE --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e4ef39e94..6af1465fc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -290,10 +290,12 @@ build_script: $defs+=" `-DENABLE_REDIS=OFF"; $defs+=" `-DENABLE_SAMPLES=ON"; $defs+=" `-DENABLE_TESTS=ON"; - cmake `-G"NMake Makefiles" $defs .. + Write-Host -ForegroundColor Yellow cmake `-G'"NMake Makefiles"' $defs .. + cmake `-G'"NMake Makefiles"' $defs .. try { $ErrorActionPreference = 'Continue'; - cmake `-`-build . `-`-config $env:configuration + Write-Host -ForegroundColor Yellow cmake `-`-build . + cmake `-`-build . } catch { Write-Warning "Oops: $_" } From 81498c6e320e117c0c3fcccae6705872b33f48b6 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 12:28:53 +0100 Subject: [PATCH 68/69] Use Start-Process Signed-off-by: FrancisANDRE --- appveyor.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6af1465fc..a37cbae06 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -236,7 +236,7 @@ after_build: $word='FIXME' Write-Host -ForegroundColor Yellow $word; Write-Host -ForegroundColor Yellow $line; - Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; + Start-Process -nnw -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host -ForegroundColor Yellow $line; Write-Host;Write-Host; @@ -244,7 +244,7 @@ after_build: $word='TODO' Write-Host -ForegroundColor Yellow $word; Write-Host -ForegroundColor Yellow $line; - Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; + Start-Process -nnw -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host -ForegroundColor Yellow $line; Write-Host;Write-Host; @@ -252,7 +252,7 @@ after_build: $word='HACK' Write-Host -ForegroundColor Yellow $word; Write-Host -ForegroundColor Yellow $line; - Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; + Start-Process -nnw -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr; gc cout; gc cerr; Write-Host -ForegroundColor Yellow $line; Write-Host;Write-Host; @@ -265,7 +265,7 @@ build_script: $logger='"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'; $verbosity='minimal'; - $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` + $process = Start-Process -PassThru -nnw -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr ` -Args "$env:vsver build $env:linkmode $env:configuration $env:platform samples tests msbuild $verbosity $logger"; gc cout; gc cerr; Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path; @@ -281,17 +281,19 @@ build_script: { $opensslrootdir = 'C:\OpenSSL-Win64' } - - $defs =" `-DCMAKE_BUILD_TYPE=$env:configuration"; - $defs+=" `-DOPENSSL_ROOT_DIR=$opensslrootdir"; - $defs+=" `-DENABLE_NETSSL=OFF"; - $defs+=" `-DENABLE_NETSSL_WIN=ON"; - $defs+=" `-DENABLE_DATA_MYSQL=OFF"; - $defs+=" `-DENABLE_REDIS=OFF"; - $defs+=" `-DENABLE_SAMPLES=ON"; - $defs+=" `-DENABLE_TESTS=ON"; - Write-Host -ForegroundColor Yellow cmake `-G'"NMake Makefiles"' $defs .. - cmake `-G'"NMake Makefiles"' $defs .. + $defs =' -G"NMake Makefiles"'; + $defs+=" -DCMAKE_BUILD_TYPE=$env:configuration"; + $defs+=" -DOPENSSL_ROOT_DIR=$opensslrootdir"; + $defs+=" -DENABLE_NETSSL=OFF"; + $defs+=" -DENABLE_NETSSL_WIN=ON"; + $defs+=" -DENABLE_DATA_MYSQL=OFF"; + $defs+=" -DENABLE_REDIS=OFF"; + $defs+=" -DENABLE_SAMPLES=ON"; + $defs+=" -DENABLE_TESTS=ON"; + $defs+=" .."; + Write-Host -ForegroundColor Yellow cmake $defs + $process = Start-Process -PassThru -nnw -Wait -FilePath "cmake" -RSO cout -RSE cerr -Args $defs; + gc cout; gc cerr; try { $ErrorActionPreference = 'Continue'; Write-Host -ForegroundColor Yellow cmake `-`-build . @@ -368,7 +370,7 @@ test_script: Write-Host -ForegroundColor Yellow $line; $started = Get-Date - $process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO cout -RSE cerr; + $process = Start-Process -PassThru -nnw -Wait -FilePath "$path" -Args "-all" -RSO cout -RSE cerr; $ended = Get-Date $millisec = ($ended - $started).totalmilliseconds From e417c062c63b132fccb98bb8d68b3119b1d3bc4e Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Wed, 23 Dec 2015 14:20:52 +0100 Subject: [PATCH 69/69] Avoid testing cmake/vs120/x64 since it takes more than 1 hour Signed-off-by: FrancisANDRE --- appveyor.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a37cbae06..8e4f4ee49 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,20 +37,6 @@ environment: matrix: -# ------------------------------------------------------------------------------------------- -# When building with cmake, it remains one exception reported below -# Once this problem fixed, the try/catch around the cmake builder can be removed -# -# [ 1%] Generating pocomsg.h -# cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc -# At line:16 char:3 -# + cmake --build . --config $env:configuration -# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# + CategoryInfo : NotSpecified: (MC: Compiling C.../src/pocomsg.mc:String) [], RemoteException -# + FullyQualifiedErrorId : NativeCommandError -# -# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc -# ------------------------------------------------------------------------------------------- - builder: cmake vsver: 120 @@ -259,6 +245,22 @@ after_build: build_script: +# ------------------------------------------------------------------------------------------- +# When building with cmake, it remains one exception reported below +# Once this problem be fixed, a fix from Microsoft about mc.exe outputing informative +# message on stderr: https://connect.microsoft.com/VisualStudio/Feedback/Details/2161572 +# the try/catch around the cmake builder can be removed +# +# [ 1%] Generating pocomsg.h +# cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc +# At line:16 char:3 +# + cmake --build . --config $env:configuration +# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# + CategoryInfo : NotSpecified: (MC: Compiling C.../src/pocomsg.mc:String) [], RemoteException +# + FullyQualifiedErrorId : NativeCommandError +# +# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc +# ------------------------------------------------------------------------------------------- - ps: | if ($env:builder -eq "msbuild") { @@ -390,7 +392,7 @@ test_script: } } } - if ($env:builder -eq "cmake") + if ($env:builder -eq "cmake" -and $env:platform -eq "Win32") { pushd cmake-build; Write-Host -ForegroundColor Yellow $line;