summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsDEB
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2019-07-05 09:50:38 (GMT)
committerRolf Eike Beer <eb@emlix.com>2019-07-05 14:24:58 (GMT)
commit3d11c63c9c338c4ed6e5d171f86af9cf6a7fca0f (patch)
tree6e389939fce105242a08cf1dfc5ae215c357e506 /Tests/CPackComponentsDEB
parent09cf0520794d3716c0931584f908a575cd8b59d0 (diff)
downloadCMake-3d11c63c9c338c4ed6e5d171f86af9cf6a7fca0f.zip
CMake-3d11c63c9c338c4ed6e5d171f86af9cf6a7fca0f.tar.gz
CMake-3d11c63c9c338c4ed6e5d171f86af9cf6a7fca0f.tar.bz2
CPackComponentsDEB test: simplify if() arguments
Diffstat (limited to 'Tests/CPackComponentsDEB')
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend1.cmake14
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend2.cmake12
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake12
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake14
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake6
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-shlibdeps1.cmake10
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-source.cmake8
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-compression.cmake4
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake6
9 files changed, 43 insertions, 43 deletions
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend1.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend1.cmake
index dc25516..fa8b5a4 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend1.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend1.cmake
@@ -54,18 +54,18 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${dpkg_package_name}', dependencies='${dpkg_depends}'")
- if("${dpkg_package_name}" STREQUAL "mylib-applications")
- if(NOT "${dpkg_depends}" STREQUAL "depend-application")
+ if(dpkg_package_name STREQUAL "mylib-applications")
+ if(NOT dpkg_depends STREQUAL "depend-application")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect dependencies for package ${dpkg_package_name}: '${dpkg_depends}' != 'depend-application'\n")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
- if(NOT "${dpkg_depends}" STREQUAL "mylib-libraries (= 1.0.3), depend-headers")
+ elseif(dpkg_package_name STREQUAL "mylib-headers")
+ if(NOT dpkg_depends STREQUAL "mylib-libraries (= 1.0.3), depend-headers")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect dependencies for package ${dpkg_package_name}: '${dpkg_depends}' != 'mylib-libraries (= 1.0.3), depend-headers'\n")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-libraries")
- if(NOT "${dpkg_depends}" STREQUAL "depend-default")
+ elseif(dpkg_package_name STREQUAL "mylib-libraries")
+ if(NOT dpkg_depends STREQUAL "depend-default")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect dependencies for package ${dpkg_package_name}: '${dpkg_depends}' != 'depend-default'\n")
endif()
@@ -77,7 +77,7 @@ if(DPKGDEB_EXECUTABLE)
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend2.cmake
index 1f2f408..1d45b78 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend2.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-depend2.cmake
@@ -54,7 +54,7 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${dpkg_package_name}', dependencies='${dpkg_depends}'")
- if("${dpkg_package_name}" STREQUAL "mylib-applications")
+ if(dpkg_package_name STREQUAL "mylib-applications")
find_program(DPKG_SHLIBDEP_EXECUTABLE dpkg-shlibdeps)
if(DPKG_SHLIBDEP_EXECUTABLE)
string(FIND "${dpkg_depends}" "lib" index_libwhatever)
@@ -72,13 +72,13 @@ if(DPKGDEB_EXECUTABLE)
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: Incorrect dependencies for package ${dpkg_package_name}: '${dpkg_depends}' does contains 'depend-default'\n")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
- if(NOT "${dpkg_depends}" STREQUAL "mylib-libraries (= 1.0.3), depend-headers")
+ elseif(dpkg_package_name STREQUAL "mylib-headers")
+ if(NOT dpkg_depends STREQUAL "mylib-libraries (= 1.0.3), depend-headers")
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: Incorrect dependencies for package ${dpkg_package_name}: '${dpkg_depends}' != 'mylib-libraries (= 1.0.3), depend-headers'\n")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-libraries")
- if(NOT "${dpkg_depends}" STREQUAL "depend-default")
+ elseif(dpkg_package_name STREQUAL "mylib-libraries")
+ if(NOT dpkg_depends STREQUAL "depend-default")
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: Incorrect dependencies for package ${dpkg_package_name}: '${dpkg_depends}' != 'depend-default'\n")
endif()
@@ -89,7 +89,7 @@ if(DPKGDEB_EXECUTABLE)
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake
index ba94127..f74137c 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description1.cmake
@@ -54,18 +54,18 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'")
- if("${dpkg_package_name}" STREQUAL "mylib-applications")
+ if(dpkg_package_name STREQUAL "mylib-applications")
if(NOT "${dpkg_description}" STREQUAL "applications_description")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
- if(NOT "${dpkg_description}" STREQUAL "headers_description")
+ elseif(dpkg_package_name STREQUAL "mylib-headers")
+ if(NOT dpkg_description STREQUAL "headers_description")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-libraries")
- if(NOT "${dpkg_description}" STREQUAL "main description")
+ elseif(dpkg_package_name STREQUAL "mylib-libraries")
+ if(NOT dpkg_description STREQUAL "main description")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != 'main description'")
endif()
@@ -77,7 +77,7 @@ if(DPKGDEB_EXECUTABLE)
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
index 1cc5a18..241dda5 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-description2.cmake
@@ -54,18 +54,18 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'")
- if("${dpkg_package_name}" STREQUAL "mylib-applications")
- if(NOT "${dpkg_description}" STREQUAL "main description 2")
+ if(dpkg_package_name STREQUAL "mylib-applications")
+ if(NOT dpkg_description STREQUAL "main description 2")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
- if(NOT "${dpkg_description}" STREQUAL "main description 2")
+ elseif(dpkg_package_name STREQUAL "mylib-headers")
+ if(NOT dpkg_description STREQUAL "main description 2")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description")
endif()
- elseif("${dpkg_package_name}" STREQUAL "mylib-libraries")
- if(NOT "${dpkg_description}" STREQUAL "library description")
+ elseif(dpkg_package_name STREQUAL "mylib-libraries")
+ if(NOT dpkg_description STREQUAL "library description")
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
"dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != 'main description'")
endif()
@@ -77,7 +77,7 @@ if(DPKGDEB_EXECUTABLE)
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake
index 9f927ee..7cfbb16 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake
@@ -44,7 +44,7 @@ if(LINTIAN_EXECUTABLE)
string(APPEND lintian_output_errors_all "${lintian_output_errors}")
endforeach()
- if(NOT "${lintian_output_errors_all}" STREQUAL "")
+ if(NOT lintian_output_errors_all STREQUAL "")
message(FATAL_ERROR "Lintian checks failed:\n${lintian_output_errors_all}")
endif()
else()
@@ -64,13 +64,13 @@ if(DPKGDEB_EXECUTABLE)
DPKGDEB_OUTPUT "${dpkg_output}"
METAENTRY "Maintainer:")
- if(NOT "${dpkgentry}" STREQUAL "None")
+ if(NOT dpkgentry STREQUAL "None")
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: Incorrect value for Maintainer: ${dpkgentry} != None\n")
endif()
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-shlibdeps1.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-shlibdeps1.cmake
index 03d003e..6eff3db 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-shlibdeps1.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-shlibdeps1.cmake
@@ -39,7 +39,7 @@ endif()
# dpkg-deb checks for the summary of the packages
find_program(DPKGDEB_EXECUTABLE dpkg-deb)
if(DPKGDEB_EXECUTABLE)
- set(dpkgdeb_output_errors_all)
+ set(dpkgdeb_output_errors_all "")
foreach(_f IN LISTS actual_output)
# extracts the metadata from the package
@@ -53,11 +53,11 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${dpkg_package_name}'")
- if("${dpkg_package_name}" STREQUAL "mylib-applications")
+ if(dpkg_package_name STREQUAL "mylib-applications")
# pass
- elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
+ elseif(dpkg_package_name STREQUAL "mylib-headers")
# pass
- elseif("${dpkg_package_name}" STREQUAL "mylib-libraries")
+ elseif(dpkg_package_name STREQUAL "mylib-libraries")
# pass
else()
set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
@@ -67,7 +67,7 @@ if(DPKGDEB_EXECUTABLE)
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-source.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-source.cmake
index 47956c6..3830ca5 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-source.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-source.cmake
@@ -54,20 +54,20 @@ if(DPKGDEB_EXECUTABLE)
message(STATUS "package='${_f}', source='${dpkg_package_source}'")
- if(NOT ("${dpkg_package_name}" STREQUAL "mylib-applications"))
- if(NOT ("${dpkg_package_source}" STREQUAL "test-source"))
+ if(NOT dpkg_package_name STREQUAL "mylib-applications")
+ if(NOT dpkg_package_source STREQUAL "test-source")
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: Incorrect source for package '${dpkg_package_name}': '${dpkg_package_source}' instead of 'test-source'\n")
endif()
else()
- if(NOT ("${dpkg_package_source}" STREQUAL "test-other-source"))
+ if(NOT dpkg_package_source STREQUAL "test-other-source")
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: Incorrect source for package '${dpkg_package_name}': '${dpkg_package_source}' instead of 'test-other-source'\n")
endif()
endif()
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-compression.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-compression.cmake
index d2fbc91..06d24c4 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-compression.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-compression.cmake
@@ -40,13 +40,13 @@ if(DPKGDEB_EXECUTABLE)
)
# message(FATAL_ERROR "output = '${dpkg_output}'")
- if("${dpkg_output}" STREQUAL "")
+ if(dpkg_output STREQUAL "")
set(dpkgdeb_output_errors_all "${dpkgdeb_output_errors_all}"
"dpkg-deb: ${_f}: empty content returned by dpkg-deb")
endif()
endforeach()
- if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
+ if(NOT dpkgdeb_output_errors_all STREQUAL "")
message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
endif()
else()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake
index 2f9e2fc..2093e7e 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake
@@ -119,13 +119,13 @@ function(lintian_check_specific_errors output_errors)
# regex to avoid
foreach(_s IN LISTS lintian_check_specific_errors_deb_ERROR_REGEX_STRINGS)
- if("${_s}" STREQUAL "")
+ if(_s STREQUAL "")
continue()
endif()
string(REGEX MATCHALL "${_s}" "_TMP_CHECK_ERROR" "${lintian_output}")
- if(NOT "${_TMP_CHECK_ERROR}" STREQUAL "")
+ if(NOT _TMP_CHECK_ERROR STREQUAL "")
string(APPEND ERROR_ACC "\nlintian: ${_f}: output contains an undesirable regex:\n\t${_TMP_CHECK_ERROR}")
endif()
endforeach()
@@ -167,7 +167,7 @@ function(run_dpkgdeb dpkg_deb_output)
ERROR_VARIABLE DPKGDEB_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE )
- if(NOT ("${DPKGDEB_RESULT}" EQUAL "0"))
+ if(NOT DPKGDEB_RESULT EQUAL "0")
message(FATAL_ERROR "Error '${DPKGDEB_RESULT}' returned by dpkg-deb: '${DPKGDEB_ERROR}'")
endif()