From 49ef627b7fe19488d0dad8b944807354c3f5c448 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 8 Apr 2022 22:46:24 -0500 Subject: [PATCH] Update: Settings, mock settings, and test settings. Add standard comments to the settings-mocks and settings-tests files. Remove the level and monolithic from the settings-mocks and settings-tests files given that I have now determined to rrun the tests exclusively in individual build mode. Minor clean ups in these files. --- level_0/f_account/data/build/settings-mocks | 9 ++++++++- level_0/f_account/data/build/settings-tests | 9 ++++++--- level_0/f_capability/data/build/settings-mocks | 6 ++++-- level_0/f_capability/data/build/settings-tests | 12 +++++++++--- level_0/f_color/data/build/settings-mocks | 9 ++++++++- level_0/f_color/data/build/settings-tests | 9 ++++++--- level_0/f_console/data/build/settings-tests | 9 ++++++--- level_0/f_control_group/data/build/settings-tests | 9 ++++++--- level_0/f_conversion/data/build/settings | 1 + level_0/f_conversion/data/build/settings-mocks | 9 ++++++++- level_0/f_conversion/data/build/settings-tests | 9 ++++++--- level_0/f_directory/data/build/settings-mocks | 9 ++++++++- level_0/f_directory/data/build/settings-tests | 9 ++++++--- level_0/f_iki/data/build/settings-tests | 10 +++++++--- level_0/f_memory/data/build/settings-tests | 9 ++++++--- level_0/f_string/data/build/settings-tests | 9 ++++++--- level_0/f_type_array/data/build/settings-tests | 9 ++++++--- level_0/f_utf/data/build/settings-tests | 9 ++++++--- 18 files changed, 113 insertions(+), 42 deletions(-) diff --git a/level_0/f_account/data/build/settings-mocks b/level_0/f_account/data/build/settings-mocks index eed5270..abd5dd9 100644 --- a/level_0/f_account/data/build/settings-mocks +++ b/level_0/f_account/data/build/settings-mocks @@ -1,4 +1,11 @@ # fss-0001 +# +# Build the project with appropriate mocks linked in via the dynamic linker's "--wrap" functionality. +# +# The -Wl,--wrap does not work across shared files. +# Therefore, this file is a work-around to inject the mocks into the library for testing purposes. +# This should exactly match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file. +# build_name f_account @@ -8,7 +15,7 @@ version_micro 9 version_file micro version_target minor -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc diff --git a/level_0/f_account/data/build/settings-tests b/level_0/f_account/data/build/settings-tests index 66dba8a..9796b67 100644 --- a/level_0/f_account/data/build/settings-tests +++ b/level_0/f_account/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_account @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_account -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-account-by_id.c test-account-by_name.c test-account-group_name_by_id.c test-account-group_id_by_name.c test-account-id_by_name.c test-account-name_by_id.c test-account.c diff --git a/level_0/f_capability/data/build/settings-mocks b/level_0/f_capability/data/build/settings-mocks index 08544ae..e25492a 100644 --- a/level_0/f_capability/data/build/settings-mocks +++ b/level_0/f_capability/data/build/settings-mocks @@ -1,8 +1,10 @@ # fss-0001 # +# Build the project with appropriate mocks linked in via the dynamic linker's "--wrap" functionality. +# # The -Wl,--wrap does not work across shared files. # Therefore, this file is a work-around to inject the mocks into the library for testing purposes. -# This should exaclty match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file. +# This should exactly match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file. # build_name f_capability @@ -13,7 +15,7 @@ version_micro 9 version_file micro version_target minor -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc diff --git a/level_0/f_capability/data/build/settings-tests b/level_0/f_capability/data/build/settings-tests index c1ba446..9b7cd03 100644 --- a/level_0/f_capability/data/build/settings-tests +++ b/level_0/f_capability/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_capability @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -16,11 +21,12 @@ build_compiler-clang clang build_indexer ar build_indexer_arguments rcs build_language c + build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_capability -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll + build_sources_program test-capability-ambient_get.c test-capability-ambient_reset.c test-capability-ambient_set.c test-capability-clear.c test-capability-clear_flag.c test-capability-compare.c test-capability-copy.c test-capability-copy_external.c test-capability-copy_internal.c test-capability-delete.c test-capability-file_descriptor_get.c test-capability-file_descriptor_set.c test-capability-file_get.c test-capability-file_set.c test-capability-flag_get.c test-capability-flag_set.c test-capability-from_name.c test-capability-from_text.c test-capability-groups_set.c test-capability-initialize.c test-capability-mode_get.c test-capability-mode_get_name.c test-capability-mode_set.c test-capability-owner_get.c test-capability-owner_set.c test-capability-process_bound_drop.c test-capability-process_bound_get.c test-capability-process_get_by_id.c test-capability-process_get.c test-capability-process_set.c test-capability-security_bits_get.c test-capability-security_bits_set.c test-capability-size.c test-capability-supported_ambient.c test-capability-supported.c test-capability-supported_code.c test-capability-to_name.c test-capability-to_text.c test-capability-user_set.c test-capability.c + build_script no build_shared yes build_static no diff --git a/level_0/f_color/data/build/settings-mocks b/level_0/f_color/data/build/settings-mocks index bdf8be4..c4bc248 100644 --- a/level_0/f_color/data/build/settings-mocks +++ b/level_0/f_color/data/build/settings-mocks @@ -1,4 +1,11 @@ # fss-0001 +# +# Build the project with appropriate mocks linked in via the dynamic linker's "--wrap" functionality. +# +# The -Wl,--wrap does not work across shared files. +# Therefore, this file is a work-around to inject the mocks into the library for testing purposes. +# This should exactly match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file. +# build_name f_color @@ -8,7 +15,7 @@ version_micro 9 version_file micro version_target minor -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc diff --git a/level_0/f_color/data/build/settings-tests b/level_0/f_color/data/build/settings-tests index 4ccc8f5..16dff84 100644 --- a/level_0/f_color/data/build/settings-tests +++ b/level_0/f_color/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_color @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_color -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-color-context_delete.c test-color-context_destroy.c test-color-load_context.c test-color-save_1.c test-color-save_2.c test-color-save_3.c test-color-save_4.c test-color-save_5.c test-color.c diff --git a/level_0/f_console/data/build/settings-tests b/level_0/f_console/data/build/settings-tests index 2161f7a..80f5ef4 100644 --- a/level_0/f_console/data/build/settings-tests +++ b/level_0/f_console/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_console @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_console -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-console-environment_process.c test-console-identify.c test-console-parameter_prioritize_left.c test-console-parameter_prioritize_right.c test-console-parameter_process.c test-console-parameters_delete.c test-console-parameters_destroy.c test-console.c diff --git a/level_0/f_control_group/data/build/settings-tests b/level_0/f_control_group/data/build/settings-tests index 347332f..834be39 100644 --- a/level_0/f_control_group/data/build/settings-tests +++ b/level_0/f_control_group/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_control_group @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_control_group -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-control_group-copy.c test-control_group.c diff --git a/level_0/f_conversion/data/build/settings b/level_0/f_conversion/data/build/settings index d4108cb..8fdb35f 100644 --- a/level_0/f_conversion/data/build/settings +++ b/level_0/f_conversion/data/build/settings @@ -16,6 +16,7 @@ build_compiler-clang clang build_indexer ar build_indexer_arguments rcs build_language c + build_libraries -lc build_libraries-individual -lf_memory -lf_string -lf_utf diff --git a/level_0/f_conversion/data/build/settings-mocks b/level_0/f_conversion/data/build/settings-mocks index bd40500..ed7160e 100644 --- a/level_0/f_conversion/data/build/settings-mocks +++ b/level_0/f_conversion/data/build/settings-mocks @@ -1,4 +1,11 @@ # fss-0001 +# +# Build the project with appropriate mocks linked in via the dynamic linker's "--wrap" functionality. +# +# The -Wl,--wrap does not work across shared files. +# Therefore, this file is a work-around to inject the mocks into the library for testing purposes. +# This should exactly match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file. +# build_name f_conversion @@ -8,7 +15,7 @@ version_micro 9 version_file micro version_target minor -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc diff --git a/level_0/f_conversion/data/build/settings-tests b/level_0/f_conversion/data/build/settings-tests index 6ba325d..34df4cb 100644 --- a/level_0/f_conversion/data/build/settings-tests +++ b/level_0/f_conversion/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_conversion @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_utf -lf_conversion -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-conversion-character_is_binary.c test-conversion-character_is_decimal.c test-conversion-character_is_duodecimal.c test-conversion-character_is_hexidecimal.c test-conversion-character_is_octal.c test-conversion-character_to_binary.c test-conversion-character_to_decimal.c test-conversion-character_to_duodecimal.c test-conversion-character_to_hexidecimal.c test-conversion-character_to_octal.c test-conversion-number_signed_print.c test-conversion-number_signed_to_string.c test-conversion-number_unsigned_print.c test-conversion-number_unsigned_to_string.c test-conversion.c diff --git a/level_0/f_directory/data/build/settings-mocks b/level_0/f_directory/data/build/settings-mocks index 5785613..3eb294f 100644 --- a/level_0/f_directory/data/build/settings-mocks +++ b/level_0/f_directory/data/build/settings-mocks @@ -1,4 +1,11 @@ # fss-0001 +# +# Build the project with appropriate mocks linked in via the dynamic linker's "--wrap" functionality. +# +# The -Wl,--wrap does not work across shared files. +# Therefore, this file is a work-around to inject the mocks into the library for testing purposes. +# This should exactly match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file. +# build_name f_directory @@ -8,7 +15,7 @@ version_micro 9 version_file micro version_target minor -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc diff --git a/level_0/f_directory/data/build/settings-tests b/level_0/f_directory/data/build/settings-tests index af6c75d..dd21d11 100644 --- a/level_0/f_directory/data/build/settings-tests +++ b/level_0/f_directory/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_directory @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_directory -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-directory-create.c test-directory-create_at.c test-directory-exists.c test-directory-exists_at.c test-directory-is.c test-directory-is_at.c test-directory-list.c test-directory-open.c test-directory-open_at.c test-directory-remove.c test-directory-remove_custom.c test-directory-touch.c test-directory-touch_at.c test-directory.c diff --git a/level_0/f_iki/data/build/settings-tests b/level_0/f_iki/data/build/settings-tests index ed2de7c..43db873 100644 --- a/level_0/f_iki/data/build/settings-tests +++ b/level_0/f_iki/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_iki @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_iki -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c build_sources_program test-iki-datas_adjust.c test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datas_decimate_by.c test-iki-datas_decrease_by.c test-iki-datas_increase.c test-iki-datas_increase_by.c test-iki-datas_resize.c test-iki-datass_adjust.c test-iki-datass_append.c test-iki-datass_append_all.c test-iki-datass_decimate_by.c test-iki-datass_decrease_by.c test-iki-datass_increase.c test-iki-datass_increase_by.c test-iki-datass_resize.c @@ -47,4 +50,5 @@ defines_shared -Lbuild/libraries/shared flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses flags-test -fstack-protector + flags_program -fPIE diff --git a/level_0/f_memory/data/build/settings-tests b/level_0/f_memory/data/build/settings-tests index db1e89a..68024e9 100644 --- a/level_0/f_memory/data/build/settings-tests +++ b/level_0/f_memory/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_memory @@ -6,7 +11,7 @@ version_major 0 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -17,8 +22,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-memory-adjust.c test-memory-delete.c test-memory-destroy.c test-memory-new_aligned.c test-memory-new.c test-memory-resize.c test-memory.c diff --git a/level_0/f_string/data/build/settings-tests b/level_0/f_string/data/build/settings-tests index 970ee8b..c9d200c 100644 --- a/level_0/f_string/data/build/settings-tests +++ b/level_0/f_string/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_string @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-string-append.c test-string-append_assure.c test-string-append_assure_nulless.c test-string-append_nulless.c build_sources_program test-string-dynamic_adjust.c test-string-dynamic_append.c test-string-dynamic_append_assure.c test-string-dynamic_append_assure_nulless.c test-string-dynamic_append_nulless.c diff --git a/level_0/f_type_array/data/build/settings-tests b/level_0/f_type_array/data/build/settings-tests index 1377599..2ef63b2 100644 --- a/level_0/f_type_array/data/build/settings-tests +++ b/level_0/f_type_array/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_type_array @@ -6,7 +11,7 @@ version_major 0 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -17,8 +22,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_type_array -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-type_array-array_lengths_adjust.c test-type_array-array_lengths_append.c test-type_array-array_lengths_append_all.c test-type_array-array_lengths_decimate_by.c test-type_array-array_lengths_decrease_by.c test-type_array-array_lengths_increase.c test-type_array-array_lengths_increase_by.c test-type_array-array_lengths_resize.c build_sources_program test-type_array-array_lengthss_adjust.c test-type_array-array_lengthss_append.c test-type_array-array_lengthss_append_all.c test-type_array-array_lengthss_decimate_by.c test-type_array-array_lengthss_decrease_by.c test-type_array-array_lengthss_increase.c test-type_array-array_lengthss_increase_by.c test-type_array-array_lengthss_resize.c diff --git a/level_0/f_utf/data/build/settings-tests b/level_0/f_utf/data/build/settings-tests index 6e99b0d..0911466 100644 --- a/level_0/f_utf/data/build/settings-tests +++ b/level_0/f_utf/data/build/settings-tests @@ -1,4 +1,9 @@ # fss-0001 +# +# Builds a program that is links to the generated library and is executed to perform tests. +# +# Memory leaks in the test program can be checked for by running valgrind with this executable. +# build_name test-f_utf @@ -8,7 +13,7 @@ version_micro 9 version_file major version_target major -modes individual level monolithic clang test +modes individual clang test modes_default individual build_compiler gcc @@ -19,8 +24,6 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_utf -build_libraries-level -lfll_0 -build_libraries-monolithic -lfll build_sources_program test-utf-append.c test-utf-append_assure.c test-utf-append_assure_nulless.c test-utf-append_nulless.c build_sources_program test-utf-dynamic_adjust.c test-utf-dynamic_append.c test-utf-dynamic_append_assure.c test-utf-dynamic_append_assure_nulless.c test-utf-dynamic_append_nulless.c -- 1.8.3.1