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 aa214a7d6..ac5bfa0dc 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 25e57dd5e..9b1a2b7c0 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 4e9d3f849..502ccee21 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 311e81abf..8b9d33e1e 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 40f06794a..f19c98cec 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 53cf788cd..cee60f377 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 6b96d79b6..9a1026ba2 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 f1f064b12..6dbe64c66 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 74dc4ad3d..44573bab6 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 143bd6161..d67527609 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 6e93dcdfa..d31509100 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 b11973756..ffd5c81de 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 ebd9fb335..c39af0449 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 c0f71b49f..d0a6cc2db 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 8737eb9b5..833588683 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 608c658ff..1b5c0fba7 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 263cfb4cd..58d9c42af 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 c7e9fe7e0..7db8a72c9 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 e310b54c0..d460c2e1e 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 11a36289a..1aa75f41d 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 -- 2.47.3