From 29e471cc0a2dad53e9612dcfe0f8d167081373de Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 15 May 2022 11:06:46 -0500 Subject: [PATCH] Update: Add cmocka specific environment variables to the testfiles. These environment variables are commented out by default. The "define" "settings" Object defines the environment variable. The "environment" "settings" Object exposes that environment variable to any called programs. --- level_0/f_account/data/build/testfile | 10 ++++++++++ level_0/f_capability/data/build/testfile | 10 ++++++++++ level_0/f_color/data/build/testfile | 10 ++++++++++ level_0/f_console/data/build/testfile | 10 ++++++++++ level_0/f_control_group/data/build/testfile | 10 ++++++++++ level_0/f_conversion/data/build/testfile | 10 ++++++++++ level_0/f_directory/data/build/testfile | 10 ++++++++++ level_0/f_environment/data/build/testfile | 10 ++++++++++ level_0/f_execute/data/build/testfile | 10 ++++++++++ level_0/f_file/data/build/testfile | 10 ++++++++++ level_0/f_iki/data/build/testfile | 10 ++++++++++ level_0/f_limit/data/build/testfile | 10 ++++++++++ level_0/f_memory/data/build/testfile | 10 ++++++++++ level_0/f_path/data/build/testfile | 10 ++++++++++ level_0/f_pipe/data/build/testfile | 10 ++++++++++ level_0/f_status_string/data/build/testfile | 10 ++++++++++ level_0/f_string/data/build/testfile | 10 ++++++++++ level_0/f_type_array/data/build/testfile | 10 ++++++++++ level_0/f_utf/data/build/testfile | 10 ++++++++++ level_2/fll_status_string/data/build/testfile | 10 ++++++++++ 20 files changed, 200 insertions(+) diff --git a/level_0/f_account/data/build/testfile b/level_0/f_account/data/build/testfile index aa214a7..ac5bfa0 100644 --- a/level_0/f_account/data/build/testfile +++ b/level_0/f_account/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_capability/data/build/testfile b/level_0/f_capability/data/build/testfile index 25e57dd..9b1a2b7 100644 --- a/level_0/f_capability/data/build/testfile +++ b/level_0/f_capability/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_color/data/build/testfile b/level_0/f_color/data/build/testfile index 4e9d3f8..502ccee 100644 --- a/level_0/f_color/data/build/testfile +++ b/level_0/f_color/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_console/data/build/testfile b/level_0/f_console/data/build/testfile index 311e81a..8b9d33e 100644 --- a/level_0/f_console/data/build/testfile +++ b/level_0/f_console/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_control_group/data/build/testfile b/level_0/f_control_group/data/build/testfile index 40f0679..f19c98c 100644 --- a/level_0/f_control_group/data/build/testfile +++ b/level_0/f_control_group/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_conversion/data/build/testfile b/level_0/f_conversion/data/build/testfile index 53cf788..cee60f3 100644 --- a/level_0/f_conversion/data/build/testfile +++ b/level_0/f_conversion/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: # Disable mocks until mocking can be fixed for this project. diff --git a/level_0/f_directory/data/build/testfile b/level_0/f_directory/data/build/testfile index 6b96d79..9a1026b 100644 --- a/level_0/f_directory/data/build/testfile +++ b/level_0/f_directory/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_environment/data/build/testfile b/level_0/f_environment/data/build/testfile index f1f064b..6dbe64c 100644 --- a/level_0/f_environment/data/build/testfile +++ b/level_0/f_environment/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_execute/data/build/testfile b/level_0/f_execute/data/build/testfile index 74dc4ad..44573ba 100644 --- a/level_0/f_execute/data/build/testfile +++ b/level_0/f_execute/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_file/data/build/testfile b/level_0/f_file/data/build/testfile index 143bd61..d675276 100644 --- a/level_0/f_file/data/build/testfile +++ b/level_0/f_file/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_iki/data/build/testfile b/level_0/f_iki/data/build/testfile index 6e93dcd..d315091 100644 --- a/level_0/f_iki/data/build/testfile +++ b/level_0/f_iki/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_limit/data/build/testfile b/level_0/f_limit/data/build/testfile index b119737..ffd5c81 100644 --- a/level_0/f_limit/data/build/testfile +++ b/level_0/f_limit/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_memory/data/build/testfile b/level_0/f_memory/data/build/testfile index ebd9fb3..c39af04 100644 --- a/level_0/f_memory/data/build/testfile +++ b/level_0/f_memory/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_path/data/build/testfile b/level_0/f_path/data/build/testfile index c0f71b4..d0a6cc2 100644 --- a/level_0/f_path/data/build/testfile +++ b/level_0/f_path/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_pipe/data/build/testfile b/level_0/f_pipe/data/build/testfile index 8737eb9..8335886 100644 --- a/level_0/f_pipe/data/build/testfile +++ b/level_0/f_pipe/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings-mocks diff --git a/level_0/f_status_string/data/build/testfile b/level_0/f_status_string/data/build/testfile index 608c658..1b5c0fb 100644 --- a/level_0/f_status_string/data/build/testfile +++ b/level_0/f_status_string/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_string/data/build/testfile b/level_0/f_string/data/build/testfile index 263cfb4..58d9c42 100644 --- a/level_0/f_string/data/build/testfile +++ b/level_0/f_string/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_type_array/data/build/testfile b/level_0/f_type_array/data/build/testfile index c7e9fe7..7db8a72 100644 --- a/level_0/f_type_array/data/build/testfile +++ b/level_0/f_type_array/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_0/f_utf/data/build/testfile b/level_0/f_utf/data/build/testfile index e310b54..d460c2e 100644 --- a/level_0/f_utf/data/build/testfile +++ b/level_0/f_utf/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings diff --git a/level_2/fll_status_string/data/build/testfile b/level_2/fll_status_string/data/build/testfile index 11a3628..1aa75f4 100644 --- a/level_2/fll_status_string/data/build/testfile +++ b/level_2/fll_status_string/data/build/testfile @@ -5,6 +5,16 @@ settings: fail exit environment LD_LIBRARY_PATH + environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT + + # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure. + #CMOCKA_TEST_ABORT 1 + + # One of: STDOUT, SUBUNIT, TAP, or XML. + #define CMOCKA_MESSAGE_OUTPUT STDOUT + + # When in "XML" output mode, output to this file rather than stdout. + #define CMOCKA_XML_FILE ./out.xml main: build settings -- 1.8.3.1