mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 11:10:28 +09:00
Compare commits
5 Commits
47305a2f72
...
f333d95013
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f333d95013 | ||
|
|
92d0f8aba6 | ||
|
|
66460578b1 | ||
|
|
b93db6c3d1 | ||
|
|
1c3143ff00 |
160
.gitlab-ci.yml
160
.gitlab-ci.yml
@@ -17,7 +17,7 @@ stages:
|
|||||||
- analysis
|
- analysis
|
||||||
|
|
||||||
# This is some black magic to select between branch pipelines and
|
# This is some black magic to select between branch pipelines and
|
||||||
# merge request pipelines to avoid running same pipelines in twice
|
# merge request pipelines to avoid running same pipelines twice
|
||||||
workflow:
|
workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
|
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"'
|
||||||
@@ -84,6 +84,36 @@ workflow:
|
|||||||
extends: .tests
|
extends: .tests
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
||||||
|
|
||||||
|
.centos:
|
||||||
|
extends: .tests
|
||||||
|
variables:
|
||||||
|
OPENSSL_ENABLE_SHA1_SIGNATURES: 1
|
||||||
|
|
||||||
|
.centos10:
|
||||||
|
extends: .centos
|
||||||
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS10_BUILD
|
||||||
|
|
||||||
|
.centos9:
|
||||||
|
extends: .centos
|
||||||
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
|
||||||
|
|
||||||
|
# Unit testing only, no client and pkd testing, because cwrap is not available
|
||||||
|
# for MinGW
|
||||||
|
.mingw:
|
||||||
|
extends: .tests
|
||||||
|
variables:
|
||||||
|
WINEDEBUG: -all
|
||||||
|
script:
|
||||||
|
- $WINEBIN $CMAKE_DEFAULT_OPTIONS
|
||||||
|
-DWITH_SFTP=ON
|
||||||
|
-DWITH_SERVER=ON
|
||||||
|
-DWITH_ZLIB=ON
|
||||||
|
-DWITH_PCAP=ON
|
||||||
|
-DWITH_FIDO2=ON
|
||||||
|
-DUNIT_TESTING=ON .. &&
|
||||||
|
make -j$(nproc) &&
|
||||||
|
ctest --output-on-failure -E torture_rand
|
||||||
|
|
||||||
.fips:
|
.fips:
|
||||||
extends: .tests
|
extends: .tests
|
||||||
variables:
|
variables:
|
||||||
@@ -126,12 +156,10 @@ review:
|
|||||||
# CentOS builds #
|
# CentOS builds #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
centos10s/openssl_3.5.x/x86_64:
|
centos10s/openssl_3.5.x/x86_64:
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS10_BUILD
|
extends: .centos10
|
||||||
extends: .tests
|
|
||||||
variables:
|
variables:
|
||||||
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON -DWITH_PKCS11_PROVIDER=ON
|
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON -DWITH_PKCS11_PROVIDER=ON
|
||||||
script:
|
script:
|
||||||
- export OPENSSL_ENABLE_SHA1_SIGNATURES=1
|
|
||||||
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
||||||
make -j$(nproc) &&
|
make -j$(nproc) &&
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
@@ -141,19 +169,17 @@ centos10s/openssl_3.5.x/x86_64/fips:
|
|||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS10_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS10_BUILD
|
||||||
variables:
|
variables:
|
||||||
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON -DWITH_PKCS11_PROVIDER=ON
|
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON -DWITH_PKCS11_PROVIDER=ON
|
||||||
|
OPENSSL_ENABLE_SHA1_SIGNATURES: 1
|
||||||
script:
|
script:
|
||||||
- export OPENSSL_ENABLE_SHA1_SIGNATURES=1
|
|
||||||
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
||||||
make -j$(nproc) &&
|
make -j$(nproc) &&
|
||||||
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
|
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
|
||||||
|
|
||||||
centos9s/openssl_3.5.x/x86_64:
|
centos9s/openssl_3.5.x/x86_64:
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
|
extends: .centos9
|
||||||
extends: .tests
|
|
||||||
variables:
|
variables:
|
||||||
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON
|
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON
|
||||||
script:
|
script:
|
||||||
- export OPENSSL_ENABLE_SHA1_SIGNATURES=1
|
|
||||||
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
||||||
make -j$(nproc) &&
|
make -j$(nproc) &&
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
@@ -167,8 +193,9 @@ centos9s/mbedtls_2.x/x86_64:
|
|||||||
centos9s/openssl_3.5.x/x86_64/fips:
|
centos9s/openssl_3.5.x/x86_64/fips:
|
||||||
extends: .fips
|
extends: .fips
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS9_BUILD
|
||||||
|
variables:
|
||||||
|
OPENSSL_ENABLE_SHA1_SIGNATURES: 1
|
||||||
script:
|
script:
|
||||||
- export OPENSSL_ENABLE_SHA1_SIGNATURES=1
|
|
||||||
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
- cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS .. &&
|
||||||
make -j$(nproc) &&
|
make -j$(nproc) &&
|
||||||
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
|
OPENSSL_FORCE_FIPS_MODE=1 ctest --output-on-failure
|
||||||
@@ -208,8 +235,10 @@ fedora/docs:
|
|||||||
fedora/ninja:
|
fedora/ninja:
|
||||||
extends: .fedora
|
extends: .fedora
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
||||||
|
variables:
|
||||||
|
CTEST_OUTPUT_ON_FAILURE: 1
|
||||||
script:
|
script:
|
||||||
- cmake -G Ninja $CMAKE_OPTIONS ../ && ninja && CTEST_OUTPUT_ON_FAILURE=1 ninja test
|
- cmake -G Ninja $CMAKE_OPTIONS ../ && ninja && ninja test
|
||||||
|
|
||||||
fedora/coverage:
|
fedora/coverage:
|
||||||
extends: .fedora
|
extends: .fedora
|
||||||
@@ -247,9 +276,10 @@ fedora/openssl_3.x/x86_64/minimal:
|
|||||||
-DWITH_SERVER=OFF
|
-DWITH_SERVER=OFF
|
||||||
-DWITH_ZLIB=OFF
|
-DWITH_ZLIB=OFF
|
||||||
-DWITH_PCAP=OFF
|
-DWITH_PCAP=OFF
|
||||||
|
-DWITH_GSSAPI=OFF
|
||||||
|
-DWITH_GEX=OFF
|
||||||
-DUNIT_TESTING=ON
|
-DUNIT_TESTING=ON
|
||||||
-DCLIENT_TESTING=ON
|
-DCLIENT_TESTING=ON .. &&
|
||||||
-DWITH_GEX=OFF .. &&
|
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
.valgrind:
|
.valgrind:
|
||||||
@@ -331,49 +361,26 @@ fedora/undefined-sanitizer:
|
|||||||
fedora/libgcrypt/x86_64:
|
fedora/libgcrypt/x86_64:
|
||||||
extends: .fedora
|
extends: .fedora
|
||||||
variables:
|
variables:
|
||||||
CMAKE_ADDITIONAL_OPTIONS: "-DWITH_GCRYPT=ON -DWITH_DEBUG_CRYPTO=ON"
|
CMAKE_ADDITIONAL_OPTIONS: "-DWITH_GCRYPT=ON"
|
||||||
|
|
||||||
fedora/mbedtls_2.x/x86_64:
|
fedora/mbedtls_3.x/x86_64:
|
||||||
extends: .fedora
|
extends: .fedora
|
||||||
variables:
|
variables:
|
||||||
CMAKE_ADDITIONAL_OPTIONS: "-DWITH_MBEDTLS=ON -DWITH_DEBUG_CRYPTO=ON "
|
CMAKE_ADDITIONAL_OPTIONS: "-DWITH_MBEDTLS=ON"
|
||||||
|
|
||||||
# Unit testing only, no client and pkd testing, because cwrap is not available
|
|
||||||
# for MinGW
|
|
||||||
fedora/mingw64:
|
fedora/mingw64:
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
|
||||||
extends: .tests
|
extends: .mingw
|
||||||
script:
|
variables:
|
||||||
- export WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
|
WINEPATH: /usr/x86_64-w64-mingw32/sys-root/mingw/bin
|
||||||
- export WINEDEBUG=-all
|
WINEBIN: mingw64-cmake
|
||||||
- mingw64-cmake $CMAKE_DEFAULT_OPTIONS
|
|
||||||
-DWITH_SFTP=ON
|
|
||||||
-DWITH_SERVER=ON
|
|
||||||
-DWITH_ZLIB=ON
|
|
||||||
-DWITH_PCAP=ON
|
|
||||||
-DWITH_FIDO2=ON
|
|
||||||
-DUNIT_TESTING=ON .. &&
|
|
||||||
make -j$(nproc) &&
|
|
||||||
ctest --output-on-failure -E torture_rand
|
|
||||||
|
|
||||||
# Unit testing only, no client and pkd testing, because cwrap is not available
|
|
||||||
# for MinGW
|
|
||||||
fedora/mingw32:
|
fedora/mingw32:
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
|
||||||
extends: .tests
|
extends: .mingw
|
||||||
script:
|
variables:
|
||||||
- export WINEPATH=/usr/i686-w64-mingw32/sys-root/mingw/bin
|
WINEPATH: /usr/i686-w64-mingw32/sys-root/mingw/bin
|
||||||
- export WINEDEBUG=-all
|
WINEBIN: mingw32-cmake
|
||||||
- mingw32-cmake $CMAKE_DEFAULT_OPTIONS
|
|
||||||
-DWITH_SFTP=ON
|
|
||||||
-DWITH_SERVER=ON
|
|
||||||
-DWITH_ZLIB=ON
|
|
||||||
-DWITH_PCAP=ON
|
|
||||||
-DWITH_FIDO2=ON
|
|
||||||
-DUNIT_TESTING=ON .. &&
|
|
||||||
make -j$(nproc) &&
|
|
||||||
ctest --output-on-failure -E torture_rand
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Fedora csbuild #
|
# Fedora csbuild #
|
||||||
@@ -382,6 +389,8 @@ fedora/mingw32:
|
|||||||
stage: analysis
|
stage: analysis
|
||||||
variables:
|
variables:
|
||||||
GIT_DEPTH: "100"
|
GIT_DEPTH: "100"
|
||||||
|
CSCPPC_ADD_OPTS: "--library=./.gitlab-ci/cmocka.cfg"
|
||||||
|
CMAKE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON -DFUZZ_TESTING=ON"
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
||||||
before_script:
|
before_script:
|
||||||
- |
|
- |
|
||||||
@@ -399,6 +408,14 @@ fedora/mingw32:
|
|||||||
git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20")
|
git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20")
|
||||||
|
|
||||||
export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
|
export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
|
||||||
|
script:
|
||||||
|
- csbuild
|
||||||
|
--build-dir=obj-csbuild
|
||||||
|
--build-cmd "rm -rf CMakeFiles CMakeCache.txt && cmake $CMAKE_OPTIONS $CMAKE_ADDITIONAL_OPTIONS @SRCDIR@ && make clean && make -j$(nproc)"
|
||||||
|
--git-commit-range $CI_COMMIT_RANGE
|
||||||
|
--color
|
||||||
|
--print-current --print-fixed
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- saas-linux-small-amd64
|
- saas-linux-small-amd64
|
||||||
except:
|
except:
|
||||||
@@ -413,33 +430,16 @@ fedora/mingw32:
|
|||||||
|
|
||||||
fedora/csbuild/openssl_3.x:
|
fedora/csbuild/openssl_3.x:
|
||||||
extends: .csbuild
|
extends: .csbuild
|
||||||
script:
|
|
||||||
- csbuild
|
|
||||||
--build-dir=obj-csbuild
|
|
||||||
--build-cmd "rm -rf CMakeFiles CMakeCache.txt && cmake -DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON -DFUZZ_TESTING=ON @SRCDIR@ && make clean && make -j$(nproc)"
|
|
||||||
--git-commit-range $CI_COMMIT_RANGE
|
|
||||||
--color
|
|
||||||
--print-current --print-fixed
|
|
||||||
|
|
||||||
fedora/csbuild/libgcrypt:
|
fedora/csbuild/libgcrypt:
|
||||||
extends: .csbuild
|
extends: .csbuild
|
||||||
script:
|
variables:
|
||||||
- csbuild
|
CMAKE_ADDITIONAL_OPTIONS: -DWITH_GCRYPT=ON
|
||||||
--build-dir=obj-csbuild
|
|
||||||
--build-cmd "rm -rf CMakeFiles CMakeCache.txt && cmake -DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON -DFUZZ_TESTING=ON -DWITH_GCRYPT=ON @SRCDIR@ && make clean && make -j$(nproc)"
|
|
||||||
--git-commit-range $CI_COMMIT_RANGE
|
|
||||||
--color
|
|
||||||
--print-current --print-fixed
|
|
||||||
|
|
||||||
fedora/csbuild/mbedtls:
|
fedora/csbuild/mbedtls:
|
||||||
extends: .csbuild
|
extends: .csbuild
|
||||||
script:
|
variables:
|
||||||
- csbuild
|
CMAKE_ADDITIONAL_OPTIONS: -DWITH_MBEDTLS=ON
|
||||||
--build-dir=obj-csbuild
|
|
||||||
--build-cmd "rm -rf CMakeFiles CMakeCache.txt && cmake -DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON -DFUZZ_TESTING=ON -DWITH_MBEDTLS=ON @SRCDIR@ && make clean && make -j$(nproc)"
|
|
||||||
--git-commit-range $CI_COMMIT_RANGE
|
|
||||||
--color
|
|
||||||
--print-current --print-fixed
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Fedora abidiff #
|
# Fedora abidiff #
|
||||||
@@ -578,9 +578,10 @@ tumbleweed/static-analysis:
|
|||||||
extends: .tests
|
extends: .tests
|
||||||
stage: analysis
|
stage: analysis
|
||||||
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
||||||
|
variables:
|
||||||
|
CCC_CC: clang
|
||||||
|
CCC_CXX: clang++
|
||||||
script:
|
script:
|
||||||
- export CCC_CC=clang
|
|
||||||
- export CCC_CXX=clang++
|
|
||||||
- scan-build cmake
|
- scan-build cmake
|
||||||
-DCMAKE_BUILD_TYPE=Debug
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
-DCMAKE_C_COMPILER=clang
|
-DCMAKE_C_COMPILER=clang
|
||||||
@@ -604,19 +605,12 @@ tumbleweed/static-analysis:
|
|||||||
freebsd/openssl_1.1.1/x86_64:
|
freebsd/openssl_1.1.1/x86_64:
|
||||||
image:
|
image:
|
||||||
extends: .tests
|
extends: .tests
|
||||||
|
variables:
|
||||||
|
CMAKE_OPTIONS: $CMAKE_DEFAULT_OPTIONS -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DUNIT_TESTING=ON
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p obj && cd obj && cmake
|
- mkdir -p obj && cd obj && cmake $CMAKE_OPTIONS ..
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
||||||
-DPICKY_DEVELOPER=ON
|
|
||||||
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON
|
|
||||||
-DUNIT_TESTING=ON ..
|
|
||||||
script:
|
script:
|
||||||
- cmake $CMAKE_DEFAULT_OPTIONS
|
- cmake $CMAKE_OPTIONS .. &&
|
||||||
-DWITH_SFTP=ON
|
|
||||||
-DWITH_SERVER=ON
|
|
||||||
-DWITH_ZLIB=ON
|
|
||||||
-DWITH_PCAP=ON
|
|
||||||
-DUNIT_TESTING=ON .. &&
|
|
||||||
make &&
|
make &&
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
tags:
|
tags:
|
||||||
@@ -626,7 +620,6 @@ freebsd/openssl_1.1.1/x86_64:
|
|||||||
- branches@libssh/libssh-mirror
|
- branches@libssh/libssh-mirror
|
||||||
- branches@cryptomilk/libssh-mirror
|
- branches@cryptomilk/libssh-mirror
|
||||||
- branches@jjelen/libssh-mirror
|
- branches@jjelen/libssh-mirror
|
||||||
- branches@marco.fortina/libssh-mirror
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -733,6 +726,7 @@ coverity:
|
|||||||
# MacOS #
|
# MacOS #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
.macos:
|
.macos:
|
||||||
|
extends: .build_options
|
||||||
tags:
|
tags:
|
||||||
- saas-macos-medium-m1
|
- saas-macos-medium-m1
|
||||||
image: macos-14-xcode-15
|
image: macos-14-xcode-15
|
||||||
@@ -745,17 +739,13 @@ coverity:
|
|||||||
- branches@libssh/libssh-mirror
|
- branches@libssh/libssh-mirror
|
||||||
- branches@cryptomilk/libssh-mirror
|
- branches@cryptomilk/libssh-mirror
|
||||||
- branches@jjelen/libssh-mirror
|
- branches@jjelen/libssh-mirror
|
||||||
- branches@marco.fortina/libssh-mirror
|
|
||||||
|
|
||||||
# TODO add -DFUZZ_TESTING=ON clang cant find _LLVMFuzzerInitialize on arm64
|
# TODO add -DFUZZ_TESTING=ON clang cant find _LLVMFuzzerInitialize on arm64
|
||||||
macos-m1:
|
macos-m1:
|
||||||
extends: .macos
|
extends: .macos
|
||||||
variables:
|
variables:
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
CMAKE_DEFAULT_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DPICKY_DEVELOPER=ON"
|
|
||||||
CMAKE_BUILD_OPTIONS: "-DWITH_BLOWFISH_CIPHER=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DWITH_DEBUG_CRYPTO=ON -DWITH_DEBUG_PACKET=ON -DWITH_DEBUG_CALLTRACE=ON"
|
|
||||||
CMAKE_TEST_OPTIONS: "-DUNIT_TESTING=ON"
|
CMAKE_TEST_OPTIONS: "-DUNIT_TESTING=ON"
|
||||||
CMAKE_OPTIONS: $CMAKE_DEFAULT_OPTIONS $CMAKE_BUILD_OPTIONS $CMAKE_TEST_OPTIONS
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- cmake $CMAKE_OPTIONS .. &&
|
- cmake $CMAKE_OPTIONS .. &&
|
||||||
|
|||||||
475
.gitlab-ci/cmocka.cfg
Normal file
475
.gitlab-ci/cmocka.cfg
Normal file
@@ -0,0 +1,475 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
cppcheck library configuration for cmocka
|
||||||
|
|
||||||
|
This file provides cppcheck with information about cmocka's assertion functions
|
||||||
|
and their behavior, particularly that assertion failures do not return.
|
||||||
|
|
||||||
|
This helps cppcheck understand that after assert_non_null(ptr), the pointer
|
||||||
|
is guaranteed to be non-NULL, eliminating false positives like:
|
||||||
|
- nullPointerArithmeticOutOfMemory
|
||||||
|
- nullPointer
|
||||||
|
- etc.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
cppcheck --library=cmocka.cfg [other options] <source files>
|
||||||
|
|
||||||
|
For more information on cppcheck library format, see:
|
||||||
|
https://cppcheck.sourceforge.io/manual.html#library-configuration
|
||||||
|
-->
|
||||||
|
<def format="2">
|
||||||
|
<!-- Core functions -->
|
||||||
|
<function name="_fail">
|
||||||
|
<noreturn>true</noreturn>
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Boolean assertions -->
|
||||||
|
<function name="_assert_true">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 != 0</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_false">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 == 0</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Pointer assertions -->
|
||||||
|
<function name="_assert_ptr_equal_msg">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 == arg2</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_ptr_not_equal_msg">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 != arg2</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Integer assertions -->
|
||||||
|
<function name="_assert_int_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 == arg2</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_int_not_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 != arg2</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_uint_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 == arg2</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_uint_not_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 != arg2</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Float/double assertions -->
|
||||||
|
<function name="_assert_float_equal">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_float_not_equal">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_double_equal">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_double_not_equal">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- String assertions -->
|
||||||
|
<function name="_assert_string_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_string_not_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Memory assertions -->
|
||||||
|
<function name="_assert_memory_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_memory_not_equal">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Range assertions -->
|
||||||
|
<function name="_assert_int_in_range">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg2 <= arg1 && arg1 <= arg3</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_int_not_in_range">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 < arg2 || arg3 < arg1</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_uint_in_range">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg2 <= arg1 && arg1 <= arg3</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_uint_not_in_range">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>arg1 < arg2 || arg3 < arg1</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_float_in_range">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_float_not_in_range">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Set assertions -->
|
||||||
|
<function name="_assert_int_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_int_not_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_uint_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_uint_not_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_not_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_float_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="7" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="_assert_float_not_in_set">
|
||||||
|
<arg nr="1" direction="in"/>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="3" direction="in"/>
|
||||||
|
<arg nr="4" direction="in"/>
|
||||||
|
<arg nr="5" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="6" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="7" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Return code assertion -->
|
||||||
|
<function name="_assert_return_code">
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<valid>0 <= arg1</valid>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in"/>
|
||||||
|
<arg nr="3" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="4" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="5" direction="in"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<!-- Macro definitions -->
|
||||||
|
<!-- Boolean macros -->
|
||||||
|
<define name="assert_true(c)" value="_assert_true(cast_to_uintmax_type(c), #c, __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_false(c)" value="_assert_false(cast_to_uintmax_type(c), #c, __FILE__, __LINE__)"/>
|
||||||
|
|
||||||
|
<!-- Pointer macros -->
|
||||||
|
<define name="assert_non_null(c)" value="assert_ptr_not_equal((c), NULL)"/>
|
||||||
|
<define name="assert_non_null_msg(c, msg)" value="assert_ptr_not_equal_msg((c), NULL, (msg))"/>
|
||||||
|
<define name="assert_null(c)" value="assert_ptr_equal((c), NULL)"/>
|
||||||
|
<define name="assert_null_msg(c, msg)" value="assert_ptr_equal_msg((c), NULL, (msg))"/>
|
||||||
|
<define name="assert_ptr_equal(a, b)" value="assert_ptr_equal_msg((a), (b), NULL)"/>
|
||||||
|
<define name="assert_ptr_equal_msg(a, b, msg)" value="_assert_ptr_equal_msg((const void*)(a), (const void*)(b), __FILE__, __LINE__, (msg))"/>
|
||||||
|
<define name="assert_ptr_not_equal(a, b)" value="_assert_ptr_not_equal_msg((const void*)(a), (const void*)(b), __FILE__, __LINE__, NULL)"/>
|
||||||
|
<define name="assert_ptr_not_equal_msg(a, b, msg)" value="_assert_ptr_not_equal_msg((const void*)(a), (const void*)(b), __FILE__, __LINE__, (msg))"/>
|
||||||
|
|
||||||
|
<!-- Integer macros -->
|
||||||
|
<define name="assert_int_equal(a, b)" value="_assert_int_equal(cast_to_intmax_type(a), cast_to_intmax_type(b), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_int_not_equal(a, b)" value="_assert_int_not_equal(cast_to_intmax_type(a), cast_to_intmax_type(b), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_uint_equal(a, b)" value="_assert_uint_equal(cast_to_uintmax_type(a), cast_to_uintmax_type(b), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_uint_not_equal(a, b)" value="_assert_uint_not_equal(cast_to_uintmax_type(a), cast_to_uintmax_type(b), __FILE__, __LINE__)"/>
|
||||||
|
|
||||||
|
<!-- Float/double macros -->
|
||||||
|
<define name="assert_float_equal(a, b, epsilon)" value="_assert_float_equal((float)(a), (float)(b), (float)(epsilon), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_float_not_equal(a, b, epsilon)" value="_assert_float_not_equal((float)(a), (float)(b), (float)(epsilon), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_double_equal(a, b, epsilon)" value="_assert_double_equal((double)(a), (double)(b), (double)(epsilon), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_double_not_equal(a, b, epsilon)" value="_assert_double_not_equal((double)(a), (double)(b), (double)(epsilon), __FILE__, __LINE__)"/>
|
||||||
|
|
||||||
|
<!-- String macros -->
|
||||||
|
<define name="assert_string_equal(a, b)" value="_assert_string_equal((const char*)(a), (const char*)(b), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_string_not_equal(a, b)" value="_assert_string_not_equal((const char*)(a), (const char*)(b), __FILE__, __LINE__)"/>
|
||||||
|
|
||||||
|
<!-- Memory macros -->
|
||||||
|
<define name="assert_memory_equal(a, b, size)" value="_assert_memory_equal((const void*)(a), (const void*)(b), size, __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_memory_not_equal(a, b, size)" value="_assert_memory_not_equal((const void*)(a), (const void*)(b), size, __FILE__, __LINE__)"/>
|
||||||
|
|
||||||
|
<!-- Range macros -->
|
||||||
|
<define name="assert_int_in_range(value, minimum, maximum)" value="_assert_int_in_range(cast_to_intmax_type(value), cast_to_intmax_type(minimum), cast_to_intmax_type(maximum), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_int_not_in_range(value, minimum, maximum)" value="_assert_int_not_in_range(cast_to_intmax_type(value), cast_to_intmax_type(minimum), cast_to_intmax_type(maximum), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_uint_in_range(value, minimum, maximum)" value="_assert_uint_in_range(cast_to_uintmax_type(value), cast_to_uintmax_type(minimum), cast_to_uintmax_type(maximum), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_uint_not_in_range(value, minimum, maximum)" value="_assert_uint_not_in_range(cast_to_uintmax_type(value), cast_to_uintmax_type(minimum), cast_to_uintmax_type(maximum), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_in_range(value, minimum, maximum)" value="assert_uint_in_range(value, minimum, maximum)"/>
|
||||||
|
<define name="assert_not_in_range(value, minimum, maximum)" value="assert_uint_not_in_range(value, minimum, maximum)"/>
|
||||||
|
<define name="assert_float_in_range(value, minimum, maximum, epsilon)" value="_assert_float_in_range((double)(value), (double)(minimum), (double)(maximum), (double)(epsilon), __FILE__, __LINE__)"/>
|
||||||
|
<define name="assert_float_not_in_range(value, minimum, maximum, epsilon)" value="_assert_float_not_in_range((double)(value), (double)(minimum), (double)(maximum), (double)(epsilon), __FILE__, __LINE__)"/>
|
||||||
|
|
||||||
|
<!-- Set macros -->
|
||||||
|
<define name="assert_in_set(value, values, number_of_values)" value="_assert_not_in_set(cast_to_uintmax_type(value), (uintmax_t*)(values), number_of_values, __FILE__, __LINE__, 0)"/>
|
||||||
|
<define name="assert_not_in_set(value, values, number_of_values)" value="_assert_not_in_set(cast_to_uintmax_type(value), (uintmax_t*)(values), number_of_values, __FILE__, __LINE__, 1)"/>
|
||||||
|
<define name="assert_int_in_set(value, values, number_of_values)" value="_assert_int_in_set(cast_to_intmax_type(value), (intmax_t*)(values), number_of_values, __FILE__, __LINE__, 0)"/>
|
||||||
|
<define name="assert_int_not_in_set(value, values, number_of_values)" value="_assert_int_not_in_set(cast_to_intmax_type(value), (intmax_t*)(values), number_of_values, __FILE__, __LINE__, 1)"/>
|
||||||
|
<define name="assert_uint_in_set(value, values, number_of_values)" value="_assert_uint_in_set(cast_to_uintmax_type(value), (uintmax_t*)(values), number_of_values, __FILE__, __LINE__, 0)"/>
|
||||||
|
<define name="assert_uint_not_in_set(value, values, number_of_values)" value="_assert_uint_not_in_set(cast_to_uintmax_type(value), (uintmax_t*)(values), number_of_values, __FILE__, __LINE__, 1)"/>
|
||||||
|
<define name="assert_float_in_set(value, values, number_of_values, epsilon)" value="_assert_float_in_set((double)(value), (double*)(values), number_of_values, (double)(epsilon), __FILE__, __LINE__, 0)"/>
|
||||||
|
<define name="assert_float_not_in_set(value, values, number_of_values, epsilon)" value="_assert_float_not_in_set((double)(value), (double*)(values), number_of_values, (double)(epsilon), __FILE__, __LINE__, 1)"/>
|
||||||
|
|
||||||
|
<!-- Return code macro -->
|
||||||
|
<define name="assert_return_code(rc, error)" value="_assert_return_code(cast_to_intmax_type(rc), (int32_t)(error), #rc, __FILE__, __LINE__)"/>
|
||||||
|
</def>
|
||||||
Reference in New Issue
Block a user