You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2021/07/19 14:31:53 UTC
[nifi-minifi-cpp] 04/04: MINIFICPP-1587 Fix CWEL test compilation
if path contains whitespace
This is an automated email from the ASF dual-hosted git repository.
szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit c683cbef65c39c75d52e1818fa89369a348daca5
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Mon Jul 19 15:57:42 2021 +0200
MINIFICPP-1587 Fix CWEL test compilation if path contains whitespace
Closes #1119
Signed-off-by: Marton Szasz <sz...@apache.org>
---
.gitignore | 9 +++++++++
.../tests/custom-provider/generate-and-register.bat | 13 ++++++++++---
win_build_vs.bat | 2 +-
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8754b95..bcc7486 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,3 +77,12 @@ __pycache__/
.vs/slnx.sqlite
/.ccls-cache
/.vscode
+
+# generated files from WEL test
+extensions/windows-event-log/tests/custom-provider/unit-test-provider.cs
+extensions/windows-event-log/tests/custom-provider/unit-test-provider.dll
+extensions/windows-event-log/tests/custom-provider/unit-test-provider.h
+extensions/windows-event-log/tests/custom-provider/unit-test-provider.man
+extensions/windows-event-log/tests/custom-provider/unit-test-provider.rc
+extensions/windows-event-log/tests/custom-provider/unit-test-provider.res
+extensions/windows-event-log/tests/custom-provider/unit-test-providerTEMP.BIN
diff --git a/extensions/windows-event-log/tests/custom-provider/generate-and-register.bat b/extensions/windows-event-log/tests/custom-provider/generate-and-register.bat
index c74090b..177768a 100644
--- a/extensions/windows-event-log/tests/custom-provider/generate-and-register.bat
+++ b/extensions/windows-event-log/tests/custom-provider/generate-and-register.bat
@@ -16,6 +16,13 @@ rem limitations under the License.
cd %1
+rem Define full path to file and remove quotation marks
+set man_path=%1"\unit-test-provider.man"
+set man_path=%man_path:"=%
+
+set dll_path=%1"\unit-test-provider.dll"
+set dll_path=%dll_path:"=%
+
(
echo ^<?xml version="1.0" encoding="UTF-8"?^>
echo ^<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd"
@@ -29,8 +36,8 @@ cd %1
echo ^<provider name="minifi_unit_test_provider"
echo symbol="minifi_unit_test_provider"
echo guid="{ABCDEF01-8174-F1CA-87BE-DA129FF6001B}"
- echo resourceFileName="%1\unit-test-provider.dll"
- echo messageFileName="%1\unit-test-provider.dll"^>
+ echo resourceFileName="%dll_path%"
+ echo messageFileName="%dll_path%"^>
echo ^<events^>
echo ^<event symbol="CustomEvent" value="10000" version="1" channel="minifi_unit_test_provider/Log" template="CustomTemplate" /^>
echo ^</events^>
@@ -53,7 +60,7 @@ cd %1
echo ^</instrumentation^>
echo ^<localization/^>
echo ^</instrumentationManifest^>
-) > "%1/unit-test-provider.man"
+) > "%man_path%"
mc -css Namespace unit-test-provider.man
mc -um unit-test-provider.man
diff --git a/win_build_vs.bat b/win_build_vs.bat
index e2e33de..5d90db3 100755
--- a/win_build_vs.bat
+++ b/win_build_vs.bat
@@ -68,7 +68,7 @@ for %%x in (%*) do (
mkdir %builddir%
pushd %builddir%\
-cmake -G %generator% -A %build_platform% -DINSTALLER_MERGE_MODULES=%installer_merge_modules% -DTEST_CUSTOM_WEL_PROVIDER=%test_custom_wel_provider% -DENABLE_SQL=%build_SQL% -DCMAKE_BUILD_TYPE_INIT=%cmake_build_type% -DCMAKE_BUILD_TYPE=%cmake_build_type% -DWIN32=WIN32 -DENABLE_LIBRDKAFKA=%build_kafka% -DENABLE_JNI=%build_jni% -DOPENSSL_OFF=OFF -DENABLE_COAP=%build_coap% -DENABLE_AWS=%build_AWS% -DENABLE_PDH=%build_PDH% -DENABLE_AZURE=%build_azure% -DENABLE_SFTP=%build_SFTP% -DENABLE_NANOFI [...]
+cmake -G %generator% -A %build_platform% -DINSTALLER_MERGE_MODULES=%installer_merge_modules% -DTEST_CUSTOM_WEL_PROVIDER=%test_custom_wel_provider% -DENABLE_SQL=%build_SQL% -DCMAKE_BUILD_TYPE_INIT=%cmake_build_type% -DCMAKE_BUILD_TYPE=%cmake_build_type% -DWIN32=WIN32 -DENABLE_LIBRDKAFKA=%build_kafka% -DENABLE_JNI=%build_jni% -DOPENSSL_OFF=OFF -DENABLE_COAP=%build_coap% -DENABLE_AWS=%build_AWS% -DENABLE_PDH=%build_PDH% -DENABLE_AZURE=%build_azure% -DENABLE_SFTP=%build_SFTP% -DENABLE_NANOFI [...]
IF %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
if [%cpack%] EQU [ON] (
cpack -C %cmake_build_type%