ceedling 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. checksums.yaml +4 -4
  2. data/GIT_COMMIT_SHA +1 -1
  3. data/README.md +1 -1
  4. data/assets/fixtures/tests_with_partials_coverage/src/private_macro.c +7 -0
  5. data/assets/fixtures/tests_with_partials_coverage/src/private_macro.h +5 -0
  6. data/assets/fixtures/tests_with_partials_coverage/src/tally.c +13 -0
  7. data/assets/fixtures/tests_with_partials_coverage/src/tally.h +4 -0
  8. data/assets/fixtures/tests_with_partials_coverage/test/test_private_macro.c +10 -0
  9. data/assets/fixtures/tests_with_partials_coverage/test/test_tally.c +9 -0
  10. data/docs/BreakingChanges.md +16 -0
  11. data/docs/Changelog.md +71 -0
  12. data/docs/KnownIssues.md +91 -4
  13. data/examples/wondrous_forest/README.md +29 -1
  14. data/examples/wondrous_forest/src/ForestUnits.h +23 -0
  15. data/examples/wondrous_forest/src/RainGauge.c +59 -0
  16. data/examples/wondrous_forest/src/RainGauge.h +39 -0
  17. data/examples/wondrous_forest/src/RainTipIsr.c +17 -0
  18. data/examples/wondrous_forest/src/RainTipIsr.h +14 -0
  19. data/examples/wondrous_forest/test/TestRainGauge.c +126 -0
  20. data/lib/ceedling/c_extractor/README.md +15 -7
  21. data/lib/ceedling/c_extractor/c_extractor.rb +25 -14
  22. data/lib/ceedling/c_extractor/c_extractor_code_text.rb +84 -54
  23. data/lib/ceedling/c_extractor/c_extractor_constants.rb +18 -7
  24. data/lib/ceedling/c_extractor/c_extractor_declarations.rb +319 -283
  25. data/lib/ceedling/c_extractor/c_extractor_declarator.rb +285 -0
  26. data/lib/ceedling/c_extractor/c_extractor_defined_type.rb +111 -0
  27. data/lib/ceedling/c_extractor/c_extractor_definitions.rb +174 -121
  28. data/lib/ceedling/c_extractor/c_extractor_functions.rb +191 -162
  29. data/lib/ceedling/c_extractor/c_extractor_preprocessing.rb +46 -55
  30. data/lib/ceedling/c_extractor/c_extractor_statement.rb +30 -0
  31. data/lib/ceedling/c_extractor/c_extractor_types.rb +63 -41
  32. data/lib/ceedling/c_extractor/c_module_edits.rb +48 -0
  33. data/lib/ceedling/c_identifier.rb +21 -0
  34. data/lib/ceedling/ceedling.h +8 -0
  35. data/lib/ceedling/config/configurator.rb +4 -3
  36. data/lib/ceedling/config/configurator_builder.rb +17 -0
  37. data/lib/ceedling/config/configurator_setup.rb +29 -5
  38. data/lib/ceedling/constants.rb +5 -1
  39. data/lib/ceedling/defaults.rb +31 -1
  40. data/lib/ceedling/dependencies/CACHE_SCHEMA.md +118 -0
  41. data/lib/ceedling/dependencies/README.md +1 -1
  42. data/lib/ceedling/dependencies/dependency_cache_store.rb +30 -25
  43. data/lib/ceedling/dependencies/dependency_tracker.rb +9 -3
  44. data/lib/ceedling/dependencies/dependinator.rb +13 -1
  45. data/lib/ceedling/diagnostics/DOCTOR.md +142 -0
  46. data/lib/ceedling/diagnostics/README.md +5 -0
  47. data/lib/ceedling/diagnostics/build_step_doctor.rb +110 -0
  48. data/lib/ceedling/diagnostics/duplicate_symbol_specialist.rb +108 -0
  49. data/lib/ceedling/diagnostics/guidance_phrases.rb +30 -0
  50. data/lib/ceedling/diagnostics/header_collision_guidance.rb +56 -0
  51. data/lib/ceedling/diagnostics/header_collision_specialist.rb +152 -0
  52. data/lib/ceedling/diagnostics/include_depth_specialist.rb +132 -0
  53. data/lib/ceedling/diagnostics/missing_symbol_specialist.rb +111 -0
  54. data/lib/ceedling/diagnostics/partial_name_specialist.rb +134 -0
  55. data/lib/ceedling/diagnostics/toolchain_output.rb +44 -0
  56. data/lib/ceedling/filesystem/PATH_HANDLING.md +83 -27
  57. data/lib/ceedling/filesystem/README.md +6 -1
  58. data/lib/ceedling/filesystem/build_roots.rb +105 -0
  59. data/lib/ceedling/filesystem/build_subpath.rb +110 -25
  60. data/lib/ceedling/filesystem/file_finder.rb +76 -110
  61. data/lib/ceedling/filesystem/file_finder_helper.rb +33 -11
  62. data/lib/ceedling/filesystem/file_path_utils.rb +113 -91
  63. data/lib/ceedling/filesystem/file_wrapper.rb +105 -28
  64. data/lib/ceedling/filesystem/path_matcher.rb +21 -0
  65. data/lib/ceedling/filesystem/test_build_layout.rb +114 -0
  66. data/lib/ceedling/filesystem/win_long_paths.rb +153 -0
  67. data/lib/ceedling/filesystem/win_path_limit.rb +83 -0
  68. data/lib/ceedling/filesystem/win_path_prober.rb +52 -0
  69. data/lib/ceedling/generators/generator.rb +27 -64
  70. data/lib/ceedling/generators/generator_helper.rb +0 -44
  71. data/lib/ceedling/generators/generator_mocks.rb +5 -0
  72. data/lib/ceedling/generators/generator_partials.rb +305 -243
  73. data/lib/ceedling/generators/generator_test_runner.rb +5 -8
  74. data/lib/ceedling/generators/partial_header_writer.rb +95 -0
  75. data/lib/ceedling/generators/partial_source_writer.rb +137 -0
  76. data/lib/ceedling/includes/header_search.rb +225 -0
  77. data/lib/ceedling/includes/include_factory.rb +9 -12
  78. data/lib/ceedling/includes/include_pathinator.rb +53 -31
  79. data/lib/ceedling/includes/includes.rb +149 -37
  80. data/lib/ceedling/objects.yml +89 -4
  81. data/lib/ceedling/partials/README.md +110 -16
  82. data/lib/ceedling/partials/carry_plan.rb +71 -0
  83. data/lib/ceedling/partials/definition_head.rb +74 -0
  84. data/lib/ceedling/partials/include_groups.rb +37 -0
  85. data/lib/ceedling/partials/interface_extras.rb +25 -0
  86. data/lib/ceedling/partials/partializer.rb +599 -120
  87. data/lib/ceedling/partials/partializer_config.rb +5 -0
  88. data/lib/ceedling/partials/partializer_helper.rb +851 -145
  89. data/lib/ceedling/partials/partializer_reconciler.rb +174 -0
  90. data/lib/ceedling/partials/partializer_utils.rb +89 -109
  91. data/lib/ceedling/partials/partials.rb +153 -10
  92. data/lib/ceedling/partials/type_macros.rb +126 -0
  93. data/lib/ceedling/preprocess/README.md +43 -33
  94. data/lib/ceedling/preprocess/preprocessinator.rb +100 -186
  95. data/lib/ceedling/preprocess/preprocessinator_code_finder.rb +65 -72
  96. data/lib/ceedling/preprocess/preprocessinator_file_assembler.rb +31 -75
  97. data/lib/ceedling/preprocess/preprocessinator_reconstructor.rb +51 -14
  98. data/lib/ceedling/setupinator.rb +16 -3
  99. data/lib/ceedling/test_invoker/HEADER_COLLISIONS.md +21 -7
  100. data/lib/ceedling/test_invoker/PIPELINE.md +57 -16
  101. data/lib/ceedling/test_invoker/README.md +1 -1
  102. data/lib/ceedling/test_invoker/derived_search_path_notices.rb +45 -0
  103. data/lib/ceedling/test_invoker/mock_locator.rb +116 -9
  104. data/lib/ceedling/test_invoker/partial_files_preprocessinator.rb +181 -0
  105. data/lib/ceedling/test_invoker/partials_manager.rb +265 -308
  106. data/lib/ceedling/test_invoker/standin_headerinator.rb +8 -15
  107. data/lib/ceedling/test_invoker/test_bare_includes_extractinator.rb +26 -3
  108. data/lib/ceedling/test_invoker/test_build_executor.rb +338 -198
  109. data/lib/ceedling/test_invoker/test_build_planner.rb +13 -19
  110. data/lib/ceedling/test_invoker/test_build_setup.rb +26 -6
  111. data/lib/ceedling/test_invoker/test_build_validations.rb +23 -20
  112. data/lib/ceedling/test_invoker/test_derived_search_paths.rb +189 -0
  113. data/lib/ceedling/test_invoker/test_file_preprocessinator.rb +1 -2
  114. data/lib/ceedling/test_invoker/test_includes_reconcilinator.rb +1 -1
  115. data/lib/ceedling/test_invoker/test_invoker_types.rb +28 -20
  116. data/lib/ceedling/test_invoker/test_pipeline_helpers.rb +5 -3
  117. data/lib/ceedling/test_invoker/test_pipeline_manager.rb +25 -8
  118. data/lib/ceedling/test_invoker/test_runner_generatinator.rb +31 -3
  119. data/lib/ceedling/test_invoker/test_search_paths.rb +30 -8
  120. data/lib/ceedling/test_invoker/test_substitutions.rb +72 -0
  121. data/lib/ceedling/tools/shell_quoting.rb +45 -0
  122. data/lib/ceedling/tools/tool_quoting.rb +79 -0
  123. data/lib/ceedling/{tool_validator.rb → tools/tool_validator.rb} +18 -7
  124. data/lib/version.rb +1 -1
  125. data/plugins/bullseye/bullseye.rake +1 -3
  126. data/plugins/bullseye/lib/bullseye.rb +15 -2
  127. data/plugins/command_hooks/lib/command_hooks.rb +1 -1
  128. data/plugins/fff/lib/fff.rb +42 -15
  129. data/plugins/fff/lib/fff_mock_generator.rb +12 -9
  130. data/plugins/fff/spec/fff_cmock_wrapper_spec.rb +134 -0
  131. data/plugins/fff/spec/fff_mock_header_generator_spec.rb +9 -0
  132. data/plugins/fff/spec/fff_mock_source_generator_spec.rb +20 -0
  133. data/plugins/gcov/lib/console_reportinator.rb +25 -19
  134. data/plugins/gcov/lib/reportgenerator_reportinator.rb +2 -1
  135. data/site-local/404.html +2 -2
  136. data/site-local/assets/javascripts/{bundle.c21346df.min.js → bundle.a5f9d56c.min.js} +1 -1
  137. data/site-local/assets/javascripts/{bundle.c21346df.min.js.map → bundle.a5f9d56c.min.js.map} +2 -2
  138. data/site-local/configuration/environment-vars.html +2 -2
  139. data/site-local/configuration/global-collections.html +3 -3
  140. data/site-local/configuration/index.html +2 -2
  141. data/site-local/configuration/loading.html +2 -2
  142. data/site-local/configuration/mixins.html +2 -2
  143. data/site-local/configuration/parallel-builds.html +2 -2
  144. data/site-local/configuration/project-file.html +2 -2
  145. data/site-local/configuration/reference/cexception.html +2 -2
  146. data/site-local/configuration/reference/cmock.html +5 -2
  147. data/site-local/configuration/reference/defines.html +2 -2
  148. data/site-local/configuration/reference/environment.html +2 -2
  149. data/site-local/configuration/reference/extension.html +2 -2
  150. data/site-local/configuration/reference/files.html +56 -9
  151. data/site-local/configuration/reference/flags.html +2 -2
  152. data/site-local/configuration/reference/index.html +2 -2
  153. data/site-local/configuration/reference/libraries.html +2 -2
  154. data/site-local/configuration/reference/mixins.html +2 -2
  155. data/site-local/configuration/reference/partials.html +84 -2
  156. data/site-local/configuration/reference/paths.html +7 -2
  157. data/site-local/configuration/reference/plugins.html +2 -2
  158. data/site-local/configuration/reference/project.html +247 -5
  159. data/site-local/configuration/reference/release-build.html +2 -2
  160. data/site-local/configuration/reference/test-build.html +2 -2
  161. data/site-local/configuration/reference/test-runner.html +2 -2
  162. data/site-local/configuration/reference/tools.html +49 -4
  163. data/site-local/configuration/reference/unity.html +2 -2
  164. data/site-local/configuration/which-ceedling.html +2 -2
  165. data/site-local/development/index.html +2 -2
  166. data/site-local/development/plugins/configuration.html +2 -2
  167. data/site-local/development/plugins/index.html +2 -2
  168. data/site-local/development/plugins/plugin-subclass.html +5 -4
  169. data/site-local/development/plugins/rake-tasks.html +2 -2
  170. data/site-local/development/releases.html +2 -2
  171. data/site-local/development/workflow.html +2 -2
  172. data/site-local/getting-started/builds.html +2 -2
  173. data/site-local/getting-started/command-line.html +2 -2
  174. data/site-local/getting-started/example-projects/cipher-quest.html +2 -2
  175. data/site-local/getting-started/example-projects/index.html +2 -2
  176. data/site-local/getting-started/example-projects/temp-sensor.html +2 -2
  177. data/site-local/getting-started/example-projects/wondrous-forest.html +10 -2
  178. data/site-local/getting-started/index.html +2 -2
  179. data/site-local/getting-started/installation.html +2 -2
  180. data/site-local/getting-started/quick-start.html +2 -2
  181. data/site-local/help.html +2 -2
  182. data/site-local/index.html +2 -2
  183. data/site-local/overview/build-system.html +2 -2
  184. data/site-local/overview/index.html +2 -2
  185. data/site-local/overview/test-environments.html +2 -2
  186. data/site-local/overview/tools-and-frameworks.html +2 -2
  187. data/site-local/plugins/beep.html +2 -2
  188. data/site-local/plugins/bullseye/index.html +45 -38
  189. data/site-local/plugins/bullseye/licensing.html +2 -2
  190. data/site-local/plugins/command-hooks.html +4 -4
  191. data/site-local/plugins/compile-commands-json-db.html +2 -2
  192. data/site-local/plugins/cppcheck.html +2 -2
  193. data/site-local/plugins/dependencies.html +2 -2
  194. data/site-local/plugins/fff.html +16 -2
  195. data/site-local/plugins/gcov/examples.html +2 -2
  196. data/site-local/plugins/gcov/gcovr.html +8 -2
  197. data/site-local/plugins/gcov/index.html +2 -2
  198. data/site-local/plugins/gcov/overview.html +2 -2
  199. data/site-local/plugins/gcov/reportgenerator.html +18 -14
  200. data/site-local/plugins/gcov/reporting.html +2 -2
  201. data/site-local/plugins/gcov/setup.html +2 -2
  202. data/site-local/plugins/gcov/tool-versions.html +2 -2
  203. data/site-local/plugins/gcov/troubleshooting.html +2 -2
  204. data/site-local/plugins/index.html +2 -2
  205. data/site-local/plugins/module-generator.html +2 -2
  206. data/site-local/plugins/report-build-warnings-log.html +2 -2
  207. data/site-local/plugins/report-tests-gtestlike-stdout.html +2 -2
  208. data/site-local/plugins/report-tests-ide-stdout.html +2 -2
  209. data/site-local/plugins/report-tests-log-factory.html +2 -2
  210. data/site-local/plugins/report-tests-pretty-stdout.html +2 -2
  211. data/site-local/plugins/report-tests-raw-output-log.html +2 -2
  212. data/site-local/plugins/report-tests-teamcity-stdout.html +2 -2
  213. data/site-local/plugins/sanitize.html +2 -2
  214. data/site-local/plugins/valgrind.html +2 -2
  215. data/site-local/project/index.html +2 -2
  216. data/site-local/project/release-history.html +2 -2
  217. data/site-local/project/sbom.html +2 -2
  218. data/site-local/project/upgrade.html +2 -2
  219. data/site-local/reference/build-directives.html +2 -2
  220. data/site-local/reference/command-line.html +2 -2
  221. data/site-local/reference/environment-vars.html +2 -2
  222. data/site-local/reference/gcov-plugin.html +2 -2
  223. data/site-local/reference/global-collections.html +12 -12
  224. data/site-local/reference/index.html +2 -2
  225. data/site-local/reference/partials-macros.html +47 -2
  226. data/site-local/reference/project-configuration.html +2 -2
  227. data/site-local/sitemap.xml.gz +0 -0
  228. data/site-local/snapshot/examples/cipher_quest/index.html +2 -2
  229. data/site-local/snapshot/examples/temp_sensor/index.html +2 -2
  230. data/site-local/snapshot/examples/wondrous_forest/index.html +72 -15
  231. data/site-local/testing-guide/build-directives.html +2 -2
  232. data/site-local/testing-guide/conventions.html +67 -22
  233. data/site-local/testing-guide/frameworks.html +2 -2
  234. data/site-local/testing-guide/index.html +2 -2
  235. data/site-local/testing-guide/partials/configuration.html +31 -4
  236. data/site-local/testing-guide/partials/conventions.html +509 -8
  237. data/site-local/testing-guide/partials/directives.html +4 -3
  238. data/site-local/testing-guide/partials/example.html +2 -2
  239. data/site-local/testing-guide/partials/index.html +2 -2
  240. data/site-local/testing-guide/partials/overview.html +30 -12
  241. data/site-local/testing-guide/partials/variables.html +169 -4
  242. data/site-local/testing-guide/test-cases.html +2 -2
  243. data/site-local/testing-guide/test-sample.html +2 -2
  244. data/site-local/testing-guide/test-suite-anatomy.html +2 -2
  245. data/spec/integration/build_step_doctor_spec.rb +270 -0
  246. data/spec/integration/c_extractor_composition_spec.rb +254 -4
  247. data/spec/integration/includes_extraction_spec.rb +27 -14
  248. data/spec/integration/nested_test_artifacts_spec.rb +1 -1
  249. data/spec/integration/partial_files_preprocessing_spec.rb +128 -0
  250. data/spec/integration/partials_carry_spec.rb +520 -0
  251. data/spec/integration/partials_declarations_spec.rb +655 -0
  252. data/spec/integration/partials_fallback_preprocessing_spec.rb +65 -0
  253. data/spec/integration/partials_function_pointers_spec.rb +277 -0
  254. data/spec/integration/partials_header_composition_spec.rb +268 -35
  255. data/spec/integration/partials_macro_decorators_spec.rb +267 -0
  256. data/spec/integration/partials_module_resolution_spec.rb +26 -19
  257. data/spec/integration/partials_symbol_linkage_spec.rb +13 -0
  258. data/spec/integration/path_length_reporting_spec.rb +64 -0
  259. data/spec/integration/path_scenarios_spec.rb +80 -3
  260. data/spec/integration/quote_include_isolator_spec.rb +56 -0
  261. data/spec/integration/test_build_parallel_barrier_spec.rb +1 -1
  262. data/spec/integration/test_includes_extractinator_spec.rb +70 -5
  263. data/spec/integration/test_naming_spec.rb +6 -3
  264. data/spec/integration/test_source_file_checks_spec.rb +5 -3
  265. data/spec/integration/tool_executor_spec.rb +1 -1
  266. data/spec/integration/tool_validator_spec.rb +2 -2
  267. data/spec/integration/win_long_paths_probe_spec.rb +46 -0
  268. data/spec/integration/win_path_limit_spec.rb +53 -0
  269. data/spec/integration/windows_registry_query_tool_spec.rb +41 -0
  270. data/spec/support/integration/configurator_integration_helper.rb +8 -3
  271. data/spec/support/integration/partial_files_harness.rb +181 -0
  272. data/spec/support/integration/partials_generation_integration_helper.rb +237 -141
  273. data/spec/support/integration/path_scenario_harness.rb +4 -2
  274. data/spec/support/integration/spec_integration_helper.rb +8 -3
  275. data/spec/support/integration/test_includes_harness.rb +56 -35
  276. data/spec/support/integration/tool_executor_integration_helper.rb +14 -2
  277. data/spec/system/bullseye_deployment_spec.rb +2 -0
  278. data/spec/system/delta_builds_spec.rb +26 -12
  279. data/spec/system/encoding_stress_spec.rb +4 -4
  280. data/spec/system/example_wondrous_forest_spec.rb +2 -2
  281. data/spec/system/gcov_deployment_spec.rb +2 -0
  282. data/spec/system/header_include_path_validation_spec.rb +4 -4
  283. data/spec/system/header_search_paths_spec.rb +1083 -0
  284. data/spec/system/mock_include_folders_spec.rb +121 -0
  285. data/spec/system/mockable_header_reassembly_spec.rb +184 -0
  286. data/spec/system/partials_carry_spec.rb +581 -0
  287. data/spec/system/partials_delta_builds_spec.rb +280 -0
  288. data/spec/system/partials_function_pointers_spec.rb +106 -0
  289. data/spec/system/partials_macro_decorators_spec.rb +127 -0
  290. data/spec/system/partials_module_disambiguation_spec.rb +125 -0
  291. data/spec/system/path_handling_probes_spec.rb +16 -12
  292. data/spec/system/pinned_thread_count_spec.rb +4 -4
  293. data/spec/system/preprocessing_fallback_conditionals_spec.rb +1 -1
  294. data/spec/system/short_build_paths_spec.rb +87 -0
  295. data/spec/system/sibling_header_collision_spec.rb +30 -6
  296. data/spec/system/support/bullseye_common_test_cases.rb +42 -0
  297. data/spec/system/support/common_test_cases.rb +2 -2
  298. data/spec/system/support/gcov_partials_test_cases.rb +48 -0
  299. data/spec/system/test_build_layout_spec.rb +209 -0
  300. data/spec/system/test_source_file_directive_spec.rb +35 -5
  301. data/spec/units/c_extractor/c_extractor_code_text_spec.rb +67 -10
  302. data/spec/units/c_extractor/c_extractor_declarations_spec.rb +501 -4
  303. data/spec/units/c_extractor/c_extractor_declarator_spec.rb +245 -0
  304. data/spec/units/c_extractor/c_extractor_defined_type_spec.rb +45 -0
  305. data/spec/units/c_extractor/c_extractor_definitions_spec.rb +163 -3
  306. data/spec/units/c_extractor/c_extractor_functions_spec.rb +462 -21
  307. data/spec/units/c_extractor/c_extractor_preprocessing_spec.rb +39 -0
  308. data/spec/units/c_extractor/c_extractor_spec.rb +4 -4
  309. data/spec/units/c_extractor/c_extractor_types_spec.rb +163 -0
  310. data/spec/units/c_identifier_spec.rb +35 -0
  311. data/spec/units/config/configurator_builder_spec.rb +24 -0
  312. data/spec/units/config/configurator_setup_spec.rb +72 -4
  313. data/spec/units/config/configurator_spec.rb +27 -1
  314. data/spec/units/dependencies/dependency_cache_store_spec.rb +68 -3
  315. data/spec/units/dependencies/dependency_tracker_spec.rb +25 -0
  316. data/spec/units/dependencies/dependinator_spec.rb +17 -2
  317. data/spec/units/diagnostics/build_step_doctor_spec.rb +170 -0
  318. data/spec/units/diagnostics/duplicate_symbol_specialist_spec.rb +117 -0
  319. data/spec/units/diagnostics/header_collision_specialist_spec.rb +267 -0
  320. data/spec/units/diagnostics/include_depth_specialist_spec.rb +137 -0
  321. data/spec/units/diagnostics/missing_symbol_specialist_spec.rb +154 -0
  322. data/spec/units/diagnostics/partial_name_specialist_spec.rb +129 -0
  323. data/spec/units/diagnostics/toolchain_output_spec.rb +86 -0
  324. data/spec/units/encodinator_spec.rb +3 -4
  325. data/spec/units/filesystem/build_roots_spec.rb +131 -0
  326. data/spec/units/filesystem/build_subpath_spec.rb +113 -0
  327. data/spec/units/filesystem/file_finder_helper_spec.rb +80 -0
  328. data/spec/units/filesystem/file_finder_spec.rb +242 -58
  329. data/spec/units/filesystem/file_path_utils_spec.rb +251 -118
  330. data/spec/units/filesystem/file_wrapper_spec.rb +191 -6
  331. data/spec/units/filesystem/path_matcher_spec.rb +36 -0
  332. data/spec/units/filesystem/test_build_layout_spec.rb +216 -0
  333. data/spec/units/filesystem/win_long_paths_spec.rb +204 -0
  334. data/spec/units/filesystem/win_path_prober_spec.rb +158 -0
  335. data/spec/units/generators/generator_helper_spec.rb +0 -60
  336. data/spec/units/generators/generator_mocks_spec.rb +13 -0
  337. data/spec/units/generators/generator_partials_spec.rb +656 -55
  338. data/spec/units/generators/generator_spec.rb +26 -0
  339. data/spec/units/generators/generator_test_runner_spec.rb +9 -5
  340. data/spec/units/generators/partial_source_writer_spec.rb +129 -0
  341. data/spec/units/includes/header_search_spec.rb +406 -0
  342. data/spec/units/includes/include_factory_spec.rb +22 -5
  343. data/spec/units/includes/include_pathinator_spec.rb +77 -13
  344. data/spec/units/includes/include_spec.rb +14 -0
  345. data/spec/units/includes/includes_spec.rb +176 -19
  346. data/spec/units/loginator_spec.rb +31 -0
  347. data/spec/units/mock_locator_spec.rb +199 -5
  348. data/spec/units/partials/include_groups_spec.rb +42 -0
  349. data/spec/units/partials/partializer_config_spec.rb +25 -0
  350. data/spec/units/partials/partializer_helper_carry_spec.rb +661 -0
  351. data/spec/units/partials/partializer_helper_interface_extras_spec.rb +396 -0
  352. data/spec/units/partials/partializer_helper_spec.rb +529 -277
  353. data/spec/units/partials/partializer_reconciler_spec.rb +661 -0
  354. data/spec/units/partials/partializer_spec.rb +1578 -270
  355. data/spec/units/partials/partializer_utils_spec.rb +269 -232
  356. data/spec/units/partials/partials_rename_spec.rb +160 -0
  357. data/spec/units/partials_manager_spec.rb +554 -261
  358. data/spec/units/plugins/bullseye_spec.rb +34 -0
  359. data/spec/units/plugins/console_reportinator_spec.rb +58 -9
  360. data/spec/units/plugins/report_tests_teamcity_stdout_spec.rb +1 -1
  361. data/spec/units/plugins/reportgenerator_reportinator_spec.rb +51 -3
  362. data/spec/units/preprocess/preprocessinator_code_finder_spec.rb +73 -10
  363. data/spec/units/preprocess/preprocessinator_file_assembler_spec.rb +125 -37
  364. data/spec/units/preprocess/preprocessinator_includes_handler_spec.rb +15 -0
  365. data/spec/units/preprocess/preprocessinator_reconstructor_spec.rb +197 -0
  366. data/spec/units/preprocess/preprocessinator_spec.rb +153 -95
  367. data/spec/units/setupinator_spec.rb +51 -0
  368. data/spec/units/standin_headerinator_spec.rb +27 -11
  369. data/spec/units/test_build_executor_spec.rb +780 -166
  370. data/spec/units/test_build_planner_spec.rb +116 -28
  371. data/spec/units/test_build_setup_spec.rb +83 -18
  372. data/spec/units/test_context_extractor_spec.rb +11 -2
  373. data/spec/units/test_derived_search_paths_spec.rb +259 -0
  374. data/spec/units/test_includes_extractinator_spec.rb +56 -8
  375. data/spec/units/test_invoker/objects_wiring_spec.rb +20 -3
  376. data/spec/units/test_invoker/partial_files_preprocessinator_spec.rb +264 -0
  377. data/spec/units/test_invoker/test_substitutions_spec.rb +122 -0
  378. data/spec/units/test_invoker_types_spec.rb +8 -7
  379. data/spec/units/test_pipeline_manager_spec.rb +54 -13
  380. data/spec/units/test_runner_generatinator_spec.rb +93 -1
  381. data/spec/units/test_search_paths_spec.rb +73 -5
  382. data/spec/units/{default_tools_quoting_spec.rb → tools/default_tools_quoting_spec.rb} +39 -5
  383. data/spec/units/tools/shell_quoting_spec.rb +76 -0
  384. data/spec/units/{tool_executor_helper_spec.rb → tools/tool_executor_helper_spec.rb} +1 -1
  385. data/spec/units/{tool_executor_spec.rb → tools/tool_executor_spec.rb} +1 -1
  386. data/spec/units/{tool_validator_spec.rb → tools/tool_validator_spec.rb} +110 -1
  387. data/spec/units/windows_registry_query_tool_spec.rb +53 -0
  388. metadata +161 -16
  389. /data/lib/ceedling/{tool_executor.rb → tools/tool_executor.rb} +0 -0
  390. /data/lib/ceedling/{tool_executor_helper.rb → tools/tool_executor_helper.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea37cd2499cbbf39a49993a77cd3e1fbe6a5e1777b70b8ba4ed1fff23823a446
4
- data.tar.gz: 7dabe29c6ccc55ee156da20783cae2a52496e4efcee00ded8c5259b24128c57c
3
+ metadata.gz: 183d7607c842342c84fdb5b1ebab40e5d1010abf0c7ffc8394000a9f58588b65
4
+ data.tar.gz: '06850be754e6e9eef65e86130d4c5d066d9199c591d580f906305ea8dca2126d'
5
5
  SHA512:
6
- metadata.gz: 7990a5a91fbd7eb56b476f7c71236cc1774eb914d41a24e8774ba534ef56cf29155b8edd8e3968152899c1fdbe266258fe8c7e738502b79deb78b6c405b14c2a
7
- data.tar.gz: 66de8b40c53aadb9ea483dd8d2c9a2deecbc6034ca4075720ac996b77220ea542c16845f019533b825fc243a95624dd7a314b9163939c1f8b4dd0dd37a9cfce1
6
+ metadata.gz: b5677433992155070f7d5a3719e85ebfcd475c74c0651cae4c3c2b649904db486567e782abe40f0b4d65e7a5a38d56363029b78daa3de46b42fa3d441f156eab
7
+ data.tar.gz: 0baae379bdfcb8f4640a8a179c4c5bf65648257bf69c69cddd5efd52f4ccbfcbe72fa6e24145844abab453e503faca92120b864cfdd7a9d2c0fbefc95cd9f53d
data/GIT_COMMIT_SHA CHANGED
@@ -1 +1 @@
1
- 3b30ae3
1
+ 066b01c
data/README.md CHANGED
@@ -38,7 +38,7 @@ Ceedling’s features support all types of C development from low-level embedded
38
38
  to enterprise systems. No tool is perfect, but Ceedling can do a whole lot to
39
39
  help you and your team produce quality software.
40
40
 
41
- ## Ceedling 1.2.2 is the latest and greatest
41
+ ## Ceedling 1.2.3 is the latest and greatest
42
42
 
43
43
  See [_Changelog_](docs/Changelog.md), [_Release Notes_][release-notes], [_Breaking Changes_][breaking-changes], and [_Known Issues_][known-issues].
44
44
 
@@ -0,0 +1,7 @@
1
+ #include "private_macro.h"
2
+ PRIVATE int
3
+ helloPrivate(int value)
4
+ {
5
+
6
+ return value + 1; // Must be the reported hit line
7
+ }
@@ -0,0 +1,5 @@
1
+ #ifndef PRIVATE_MACRO_H
2
+ #define PRIVATE_MACRO_H
3
+ // A storage class a macro supplies, as many projects spell it
4
+ #define PRIVATE static
5
+ #endif
@@ -0,0 +1,13 @@
1
+ #include "tally.h"
2
+ int tally(void) {
3
+ static struct {
4
+ int count;
5
+ } state; // A type and its variable, promoted together from three lines
6
+
7
+ state.count++; // Must independently report as hit
8
+
9
+ return state.count; // Must independently report as hit
10
+ }
11
+
12
+ // Lines 6 and 8 above are deliberately blank; they must never absorb the hits
13
+ // that belong to lines 7 and 9; see gcov_partials_coverage_promoted_type.
@@ -0,0 +1,4 @@
1
+ #ifndef TALLY_H
2
+ #define TALLY_H
3
+ int tally(void);
4
+ #endif
@@ -0,0 +1,10 @@
1
+ // `helloPrivate` is `static` through PRIVATE in private_macro.h. Its declaration for the
2
+ // test file comes from the generated Partial's own header via TEST_PARTIAL_ALL_MODULE.
3
+ #include "unity.h"
4
+ #include "ceedling.h"
5
+ #include TEST_PARTIAL_ALL_MODULE(private_macro)
6
+ #include "private_macro.h"
7
+
8
+ void test_helloPrivate(void) {
9
+ TEST_ASSERT_EQUAL_INT( 42, helloPrivate( 41 ) );
10
+ }
@@ -0,0 +1,9 @@
1
+ #include "unity.h"
2
+ #include "ceedling.h"
3
+ #include TEST_PARTIAL_ALL_MODULE(tally)
4
+ #include "tally.h"
5
+
6
+ void test_tally(void) {
7
+ TEST_ASSERT_EQUAL(1, tally());
8
+ TEST_ASSERT_EQUAL(1, PARTIAL_LOCAL_VAR(tally, state).count);
9
+ }
@@ -10,6 +10,22 @@ A release has a section only if it breaks something. Each section lists what cha
10
10
 
11
11
  ---
12
12
 
13
+ # [1.2.3] — 2026-11-20
14
+
15
+ ## Each tool argument closes its own quotes
16
+
17
+ Tool validation now fails a tool whose `:executable` or argument leaves a quote open ([tool definitions](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/tools/#tool-definition-configurable-elements)). A tool that opens a quote in one `:arguments` entry and closes it in a later one worked before and now fails. Join such entries into one, as in `- -DMSG="a b"` in place of `- -DMSG="a` and `- b"`.
18
+
19
+ ## Each test’s build output sits below its own `_t_` directory
20
+
21
+ A test’s build directory could lie inside another test’s, and the two tests’ files then mixed. Ceedling names each test by its path, so `test/test_calc.c` and `test/test_calc/test_io.c` built into `build/test/out/test/test_calc/` and a folder within it. Each test’s directory now ends in `_t_`, as in `build/test/out/test/test_calc/_t_/`. No test’s directory can hold another’s.
22
+
23
+ A test’s objects, executable, linker map, mocks, Partials and preprocessed files move into this directory. Runners, results and logs stay where they were, and release builds are unchanged. Update anything that reads a test’s executable or mocks by path, such as a debugger launch configuration. A glob such as `build/test/out/**/*.out` still finds every executable.
24
+
25
+ The first test build after upgrading rebuilds every test once. Run `ceedling clobber` after upgrading to remove the old layout’s files, which coverage reports and some `#include`s could otherwise still reach.
26
+
27
+ ---
28
+
13
29
  # [1.2.2] — 2026-10-31
14
30
 
15
31
  ## Test build output is organized by each test’s path from the project root
data/docs/Changelog.md CHANGED
@@ -12,6 +12,77 @@ Each release has its own section, listing only what changed in that release.
12
12
 
13
13
  ---
14
14
 
15
+ # [1.2.3] — 2026-11-20
16
+
17
+ ## 💪 Fixed
18
+
19
+ - [#1385](https://github.com/ThrowTheSwitch/Ceedling/issues/1385) Fixed the [Bullseye plugin’s](https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/bullseye/) `report:bullseye` task including Unity, generated test runners, and test files in its HTML and XML reports when run on the same command line as a fresh `bullseye:` build, as in `ceedling bullseye:all report:bullseye`. Its reports now leave out the same sources as automatic reports. With no coverage file yet, it reports that and writes nothing, rather than failing with a license hint.
20
+ - Fixed one long build path being reported several times, once for each step that created or wrote it. Ceedling now reports each path once.
21
+ - Fixed a flood of notices about headers sharing a directory being logged once for every pair of them, on every build and for every test, whether or not anything failed. A directory of 40 headers gave 780 lines. The guidance now appears only when a compilation fails with what looks like a redeclaration or conflicting types, once for each directory holding a header the compiler names, and explains how the collision can arise and how to resolve it.
22
+ - [#1387](https://github.com/ThrowTheSwitch/Ceedling/issues/1387) Fixed long configured paths lengthening every build path below them ([#1370](https://github.com/ThrowTheSwitch/Ceedling/issues/1370)). A `:paths` root far outside the project, such as a vendor’s include directory, or nested deep inside it, is now spelled in build paths by a short `_<name>_<hash>` name, and everything below it keeps its path. Short roots such as `src/` are unchanged. `build/build_roots.yml` lists each shortened root ([build output](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/conventions/#test-names-build-output)). The first build after upgrading rebuilds everything once.
23
+ - [#1391](https://github.com/ThrowTheSwitch/Ceedling/issues/1391) Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) reusing a test’s [Partials](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) after the test changed which functions it selects, such as `TEST_PARTIAL_PUBLIC_MODULE` to `TEST_PARTIAL_ALL_MODULE`. A change that rewrote only the preprocessed copies a Partial is made from, such as toggling [`:test_build` ↳ `:preprocess_force_fallback`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/test-build/#preprocess_force_fallback), was missed the same way. A Partial now regenerates when either changes.
24
+ - [#1408](https://github.com/ThrowTheSwitch/Ceedling/issues/1408) Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) recompiling some of a test’s objects on every run when Ceedling isolated a header beside one the test mocks. Nothing had changed, but each build gave the isolated copy a directory with a new name. A rebuild now weighs the original headers, so it compiles only what changed, and compiler messages about an isolated header name the original. Isolation also now runs only where it can help, for a mocked header with `:cmock` ↳ `:treat_inlines: :include`. With other mocks and with [Partials](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) it changed nothing, so its notice and second compile no longer appear there.
25
+ - [#1425](https://github.com/ThrowTheSwitch/Ceedling/issues/1425) Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) regenerating every mock when only `--verbosity` changed, and keeping every mock when the [FFF plugin](https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/fff/) was turned on or off. A test rewritten for the other generator failed to compile until a clobber. Verbosity no longer counts as a change to a mock, and switching generators regenerates each one. The first build after upgrading regenerates every mock once.
26
+ - [#1428](https://github.com/ThrowTheSwitch/Ceedling/issues/1428) Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) ignoring edits to a mocked header after `:cmock` ↳ `:treat_inlines` changed from `:include` to `:exclude`. The copy of the header CMock wrote beside the mock stayed, and the build compiled against it until a clobber. A mock generated again now removes that copy.
27
+ - [#1434](https://github.com/ThrowTheSwitch/Ceedling/issues/1434) Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) ignoring edits to a header a test stopped mocking, with `:cmock` ↳ `:treat_inlines: :include`. The copy of the header CMock wrote beside the mock stayed in the test’s mock directory, which remains on the test’s search paths, and the build compiled against it until a clobber. With `:use_test_preprocessor` set to `:tests` or `:all`, the build stopped instead, reporting ``Found no file `build/test/mocks/test/test_c/drivers/foo.h` in search paths.`` Collecting a test’s `#include`s with test preprocessing also read the copy of a header the test still mocks, missing an edit to it that changes which other mocks the test needs. Each build now removes the copies no current mock names and keeps copies out of `#include` collection.
28
+ - [#1435](https://github.com/ThrowTheSwitch/Ceedling/issues/1435) Fixed an [FFF](https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/fff/) fake of a header holding an inline function failing to compile with `:cmock` ↳ `:treat_inlines: :include`, reporting a redefinition of the function. The fake included the original header, which defines the function the fake defines too. A fake now writes a copy of the header without its inline function bodies beside itself and includes that, as a mock does.
29
+ - [#1440](https://github.com/ThrowTheSwitch/Ceedling/issues/1440) Fixed an [FFF](https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/fff/) fake of a header with an extension other than `.h`, such as `.hpp`, failing to build. A fake of `drivers/foox.hpp` was written as `drivers/mock_foox.hpp.h` and `drivers/mock_foox.hpp.c`, so a test including `drivers/mock_foox.hpp` stopped with ``Found no file `drivers/mock_foox.c` in search paths.``, or with a missing-file error from the compiler under test preprocessing. A fake is now named as CMock names a mock, `drivers/mock_foox.hpp` and `drivers/mock_foox.c`. A CMock mock of such a header also no longer logs `Failed to generate directive-only preprocessor output` under test preprocessing, since its stand-in now takes the header’s own extension.
30
+ - [#1438](https://github.com/ThrowTheSwitch/Ceedling/issues/1438) Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) with mock preprocessing (`:use_test_preprocessor` set to `:mocks` or `:all`) generating a mock from an out-of-date reading of a header the mocked header includes. An edit to that header alone left the mock as it was. With `:cmock` ↳ `:treat_inlines: :include`, mock preprocessing could also read the copy of that header CMock wrote beside another mock. The mock kept the declarations the old header selected, and the test failed to build until a clobber. Mock preprocessing now reads each header the mocked header includes as the compiler finds it, and an edit to any of them regenerates the mock. The first build after upgrading preprocesses every mocked header once.
31
+ - [#1433](https://github.com/ThrowTheSwitch/Ceedling/issues/1433) Fixed a mocked header that includes a header beside itself failing to build when an earlier search path holds a same-named header. With `lib/motor.h` including `"config.h"` and `src/hw/config.h` reached first, the header Ceedling prepares for CMock under mock preprocessing named `lib/config.h`, which nothing resolves from the build directory. The build stopped with `fatal error: lib/config.h: No such file or directory`. A test’s runner, CMock’s copy of a header under `:cmock` ↳ `:treat_inlines: :include`, and a Partial’s generated files could also include the same-named header in place of the one beside the includer. Each now includes such a header by its absolute path wherever no search path reaches it.
32
+ - [#1439](https://github.com/ThrowTheSwitch/Ceedling/issues/1439) Fixed a test whose mock or [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) lies in a folder named like another test nested below it failing to build once that test exists. With `test/test_c.c` including `"test_x/mock_qux.h"` and `test/test_c/test_x.c` added, `test:test_c` stopped with ``Found no file `test_x/mock_qux.c` in search paths.``, and a Partial failed to link. A mock of the nested test could also overwrite the other test’s same-named mock. Each test’s own build directories now end in `_t_` after its name, so no test’s directory lies inside another’s ([build output](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/conventions/#test-names-build-output)). A test’s executable and linker map move with its objects (see [Breaking Changes](BreakingChanges.md)). The first test build after upgrading rebuilds every test once. Release builds are unaffected.
33
+ - Fixed a hand-written source named with the mock prefix failing to build into a test. A fake such as `src/fakes/mock_spi.c`, linked through `TEST_SOURCE_FILE("mock_spi.c")`, stopped the build with ``Found no file `mock_spi.c` in search paths.``, since Ceedling looked for it only among the test’s generated mocks. A name with the [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) prefix failed the same way. A test’s own generated mock still comes first.
34
+ - [#1415](https://github.com/ThrowTheSwitch/Ceedling/issues/1415) Fixed a header that only [`:files` ↳ `:include`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/files/#files-include) supplies being impossible to mock since 1.2.0. The build stopped with ``Found no file `sensor.h` in search paths.`` When a test names such a header, Ceedling now adds the directory its `#include` implies to that test’s search paths, after every configured one, and logs it. For a header outside the working directory, a bare name such as `"mock_socket.h"` gets no directory, and the build’s error suggests an `#include` that references the parent folder.
35
+ - [#1418](https://github.com/ThrowTheSwitch/Ceedling/issues/1418) Fixed a mock or `#include` naming a header by a directory below a search path, as in `#include "drivers/mock_foo.h"` with `src/` listed, stopping the build with ``Found no file `drivers/foo.h` in search paths.`` Ceedling now finds a test’s headers as the compiler does, joining each search path with the path the `#include` names ([search paths](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/paths/#paths-include)). A build with `:cmock` ↳ `:treat_inlines: :include` also no longer reports “Multiple files matched” for CMock’s copy of a mocked header.
36
+ - Fixed a mock included through a folder, as in `#include "drivers/mock_foo.h"`, failing to compile when a search path lists only its header’s own directory, as `src/drivers/**` does. The mock included its header as `"drivers/foo.h"`, which no search path reached. A mock now includes its header by the text a search path reaches it by, here `"foo.h"`.
37
+ - Fixed an [FFF](https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/fff/) fake including its header by filename alone, even where its `#include` named a folder. With `lib/` and `src/**` listed, a fake included as `drivers/mock_foo.h` included `src/hw/drivers/foo.h` in place of `lib/drivers/foo.h`, the header `drivers/foo.h` names. A fake now includes its header as a mock does.
38
+
39
+ ### Partials
40
+
41
+ - [#1427](https://github.com/ThrowTheSwitch/Ceedling/issues/1427) Fixed a mock [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) stopping the build when its configuration named a function its module declares but doesn’t define, as `MOCK_PARTIAL_PUBLIC_MODULE(port)` with `MOCK_PARTIAL_CONFIG(port, -port_write)` does. The build reported ``references function 'port_write' which does not exist``, though `port.h` declares it and `port.c` defines it. The check knew only the functions a module defines, and a mock of public functions alone, or any mock of a header-only module, reads no definitions from a source. A mock’s configuration can now name any function its module declares, except an `inline` one whose body is in another header, which no mock can replace.
42
+ - [#1384](https://github.com/ThrowTheSwitch/Ceedling/issues/1384) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) leaving out what its selected functions rely on. A test calling an inline function whose external definition the module’s source provides, with a declaration such as `extern inline int f(void);` or `int f(void);`, failed to link. Selected code calling a function the module only declares, a function the test subtracted to stub, or a `static inline` helper from the module header failed to compile. A Partial now carries those prototypes and the helpers its selected code uses ([what a Partial carries](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/conventions/#what-a-partial-carries-from-your-module)). A mock Partial also no longer mocks such a function, which defined it twice.
43
+ - Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) defining a variable its module declares `extern`, which failed to link against the real definition with GCC 10 and later. By default, a Partial now writes a weak definition that the real one overrides (see _Added_); this behavior is optional.
44
+ - Fixed tested and mocked [Partials](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) dropping part of a function’s return type in certain circumstances. `struct point *f(void)` lost `struct point`, `uint8_t *` lost `uint8_t`, `unsigned long` became `long`, and `const` was stripped.
45
+ - Fixed a [Partial’s](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) implementation header declaring a variable twice when the module’s header declares it and its source defines it, which `-Wredundant-decls` reports.
46
+ - [#1397](https://github.com/ThrowTheSwitch/Ceedling/issues/1397) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) failing to compile for a module that declares a function pointer without a typedef for its type. A function taking or returning one, and a variable holding one, an array of them or a pointer to an array, now generate correctly whether tested or mocked. A variable whose array size, initializer or string holds a pointer in parentheses, as in `sizeof(*p)`, is no longer named after that pointer. A function returning a function pointer no longer stops Ceedling with an internal error, and a defined function whose name a Partial can’t read stops the build with a message naming it ([function pointers](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/conventions/#function-pointers)).
47
+ - [#1399](https://github.com/ThrowTheSwitch/Ceedling/issues/1399) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) taking a struct, union, or enum variable for a type. A variable such as `struct ops g_ops = { 1 };`, or an array of them, went into the Partial’s types header, which defined it twice or failed to compile. A function returning a pointer to a struct, followed by a stray `;`, was taken for a type the same way. A type with an attribute after its closing brace, as in `} __attribute__((packed));`, was taken for a variable instead and never reached the types header.
48
+ - [#1400](https://github.com/ThrowTheSwitch/Ceedling/issues/1400) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) misreading several kinds of variable declaration, which left a variable without an extern or wrote one that failed to compile or link. Every variable of a compound declaration now gets an extern, as `g_y` does in `int g_x = 0, g_y;`. A name holding `$` reads whole. A type spelled with `typeof(…)`, `_Atomic(…)`, `_Alignas(…)`, or `_BitInt(…)`, or with `_Bool`, `_Atomic`, `_Thread_local`, or `_Complex`, keeps its spelling. An extern keeps its variable’s asm label, as in `int g_s __asm__("g_symbol");`. Under [fallback preprocessing](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/conventions/#fallback-test-build-preprocessing), which remains a best effort, a comment inside a declaration no longer garbles it or stops a Partial reading the rest of the file.
49
+ - [#1402](https://github.com/ThrowTheSwitch/Ceedling/issues/1402) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) failing to compile for a module whose source includes its own header and then a header that uses the module header’s types or macros. The Partial wrote every include it carries ahead of the module’s types, so the later header met a type or macro not yet defined. A Partial now writes its includes in the order the module’s source compiles them. A mocked Partial’s header among them keeps its place too.
50
+ - [#1404](https://github.com/ThrowTheSwitch/Ceedling/issues/1404) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) misreading a declaration with a C23 attribute. A variable that one leads, as in `[[maybe_unused]] static int count;`, got an extern that failed to compile, and so did a variable whose name one follows. A function that one leads, as in `[[nodiscard]] static int f(void) { … }`, was never read, and neither was anything after it in the file. Each now reads whole, and its attribute keeps its place in the Partial.
51
+ - [#1401](https://github.com/ThrowTheSwitch/Ceedling/issues/1401) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) failing to compile for a module that declares a variable together with its type, as in `static struct { int count; } s_ctx;` or `struct pair { int a; } g_p1, g_p2;`. The Partial repeated the type’s body in the variable’s extern and in its definition. It now defines the type once, in its types header, and names it for the variable ([a variable declared together with its type](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/variables/#a-variable-declared-together-with-its-type)). A function-scoped `static` of this form is promoted with its type. A member’s array size and the first variable of such a compound declaration, which the body used to lose, now read correctly.
52
+ - Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) reading a forward declaration, as in `struct node;`, as a variable. It wrote `extern struct node;`, which fails a build treating warnings as errors. A Partial now writes the declaration as the module does.
53
+ - Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) renaming more than a promoted function-scoped `static` variable. A member or tag of the same name, as in `p->count`, now keeps its spelling, unless a struct the function defines holds the name. So does the text of a comment or string, apart from an asm template’s `%[count]`.
54
+ - [#1395](https://github.com/ThrowTheSwitch/Ceedling/issues/1395) Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) failing to compile for a module whose `static` comes from a macro, as `#define PRIVATE static` or `#define STATICINLINE static inline` gives. A selected function failed with “static declaration follows non-static declaration”, and a variable got an extern such as `extern PRIVATE int counter;`. A Partial now writes each from its expanded declaration, and every line of a function’s body keeps its place. A variable a macro such as `#define EXTERN extern` declares gets its weak definition too.
55
+ - Fixed a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) dropping an attribute a macro writes after a type’s closing brace, as in `struct pk { char c; int i; } PACKED;` or `struct pk { char c; int i; } PACKED inst;`. The Partial’s copy of the type compiled unpacked with only a warning, so its size disagreed with the module’s. A Partial now keeps the macro with the type.
56
+ - Fixed a [delta build](https://docs.throwtheswitch.org/Ceedling/1.2.0/getting-started/builds/) reusing a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) after a header its module includes changed, such as the header that defines `PRIVATE`. A Partial now regenerates when any project header its module’s preprocessing read changes.
57
+ - Fixed a tested [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) running the real `static inline` functions of a module the test mocks as a Partial named by directory, as `MOCK_PARTIAL_PUBLIC_MODULE_AT(hw, port)` names one. Since 1.2.0 the tested Partial included that module’s real header in place of its mock’s. A module named by directory is now matched by its header’s path.
58
+ - Fixed a module both tested and mocked as [Partials](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) in one test failing to compile when its source never includes its own header. The Partial’s implementation never included its mock’s interface, so a tested function calling a mocked one called it undeclared.
59
+
60
+ ### Preprocessing
61
+
62
+ - [#1423](https://github.com/ThrowTheSwitch/Ceedling/issues/1423) Fixed a mock `#include` that climbs with `..` stopping a test built with [test preprocessing](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/project/#use_test_preprocessor). `#include "../x/mock_foo.h"` for `inc/x/foo.h` with `inc/**` listed stopped the build with ``Found no file `../x/foo.h` in search paths.``, though it built without test preprocessing. The mock is now found as the `#include` reaches it from the test file’s directory.
63
+ - [#1424](https://github.com/ThrowTheSwitch/Ceedling/issues/1424) Fixed a mock `#include` without a folder being dropped beside a same-named mock `#include` with one, as `#include "mock_task.h"` is beside `#include "other/mock_task.h"`. The first mock was never generated, and the test failed to compile. Both mocks are now generated. Two `#include`s of one header’s mock still give it one mock, named by the `#include` with more path.
64
+ - [#1426](https://github.com/ThrowTheSwitch/Ceedling/issues/1426) Fixed a header with two same-named `#include`s, one without a folder and one with, losing one of them in the copy Ceedling prepares for CMock and in a test’s own `#include` list. A mocked `lib/motor.h` that includes `"config.h"` and `"app/config.h"` failed to compile with `:cmock` ↳ `:treat_inlines: :include`. Both `#include`s are now kept, in either order. The notice about an `#include` that several files satisfy no longer counts a file another `#include` took.
65
+ - [#1420](https://github.com/ThrowTheSwitch/Ceedling/issues/1420) Fixed a mock in a test built with [test preprocessing](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/project/#use_test_preprocessor) taking its name from its header’s mirrored directory instead of the `#include` the test wrote. Since 1.2.0, `#include "mock_task.h"` for `rtos/include/task.h` with `rtos/**` listed defined `include_mock_task_Init()` and its siblings. That mock now defines `mock_task_Init()` and its siblings, as a build without test preprocessing does. A test that calls `include_mock_task_Verify()` directly must now call `mock_task_Verify()`. A mock whose `#include` changes its folder is now regenerated.
66
+ - Fixed a mocked header losing a function declaration that follows an empty macro definition, such as `#define CMSIS_DEPRECATED`, with `:cmock` ↳ `:treat_inlines: :include`. In the header Ceedling prepares for CMock, the declaration could be joined onto the `#define`, so no mock was generated for that function.
67
+ - Fixed a mid-line `_Pragma()` being joined into the code around it when Ceedling reassembled a preprocessed file, giving `int a; #pragma pack(1) int b;` on one line.
68
+ - Fixed a header’s include guard going unrecognized behind a leading comment longer than 2,048 bytes, such as a license. A header prepared for CMock with `:treat_inlines: :include` got a generated guard instead and repeated the original guard’s `#define` as an ordinary macro, and a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) of such a header could not suppress the original header, risking `redefinition` errors. A guard-shaped `#ifndef`/`#define` pair inside a comment is no longer taken for the guard.
69
+ - Fixed a system header such as `<stdint.h>` being included twice in a header Ceedling prepares for CMock or a Partial, when the compiler’s own copy of that header includes another of the same name.
70
+
71
+ ## 🌟 Added
72
+
73
+ - More and better guidance on compilation and linking failures that point to common root causes. More cases are covered with more complete explanations and consistent wording. Failure matching is expanded to help across a variety of toolchains. A test whose Partials macro, such as `PARTIAL_LOCAL_VAR()`, builds a name nothing declares gets guidance on the macro’s arguments. An `#include` nested too deeply ([#691](https://github.com/ThrowTheSwitch/Ceedling/issues/691)) gets guidance at preprocessing or compilation. It names a header that includes its own filename and finds itself first.
74
+ - [#699](https://github.com/ThrowTheSwitch/Ceedling/issues/699) Added a check of each tool’s quoting when Ceedling validates its configuration ([tool definitions](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/tools/#tool-definition-configurable-elements)). A quote that `:executable` or an argument leaves open fails validation and names the entry. A typographic quote such as `”`, often pasted from a web page, draws a warning, and it is named as the likely cause of a quote left open. Before, a quote left open paired with one in a later argument. The build then failed with an unrelated error, such as `no input files`, or ran with corrupted paths.
75
+ - Added `PARTIAL_TYPE()` and `PARTIAL_LOCAL_TYPE()` to `ceedling.h`. Each names the type a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) gives a variable declared together with its type, so a test can declare another object of that type, such as a saved copy of a module’s state ([Partials macros](https://docs.throwtheswitch.org/Ceedling/1.2.0/reference/partials-macros/#variable-type-names)).
76
+ - [#1386](https://github.com/ThrowTheSwitch/Ceedling/issues/1386) Added [`:project` ↳ `:win_path_limit`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/project/#win_path_limit) for Windows. `:classic`, the default, keeps Windows’ 260-character limit and now also flags a directory Ceedling creates past 248 characters. `:long_paths` and `:auto` stop long path logging warnings/errors on a host with long paths enabled, after checking once that Ruby can work with long paths. If that check fails, the new optional [`:windows_registry_query`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/tools/#windows_registry_query) tool reads the host’s registry setting to name the cause. On Ruby before 4.0, which can create long paths but not list them, `:auto` keeps the classic limit, and `:long_paths` warns once about what can fail. The setting changes only what Ceedling reports.
77
+ - Added [`:partials` ↳ `:suppress_redundant_decls`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/partials/#suppress_redundant_decls). Enabled by default, it wraps the prototypes a [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) carries in GCC diagnostic pragmas, so `-Wredundant-decls` stays quiet where a carried prototype repeats a header’s declaration.
78
+ - Added [`:partials` ↳ `:extern_variables`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/partials/#extern_variables) for a variable a module declares `extern` but never defines. `:weak`, the default, writes a weak definition in the [Partial](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/), so a test built with GCC or Clang links whether or not it links the defining module. `:test` writes none, leaving the definition to the test.
79
+
80
+ ## ⚠️ Changed
81
+
82
+ - A mocked [Partial’s](https://docs.throwtheswitch.org/Ceedling/1.2.0/testing-guide/partials/) generated header is no longer preprocessed for mocking. CMock reads it as generated, so the work was never used. The `pre_mock_preprocess` and `post_mock_preprocess` plugin hooks, and the [Command Hooks plugin’s](https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/command-hooks/) hooks of the same names, no longer run for one.
83
+
84
+ ---
85
+
15
86
  # [1.2.2] — 2026-10-31
16
87
 
17
88
  ## 💪 Fixed
data/docs/KnownIssues.md CHANGED
@@ -16,6 +16,43 @@ Each release has its own section, listing every issue known to affect it. An iss
16
16
 
17
17
  ---
18
18
 
19
+ ## 1.2.3 — 2026-11-20
20
+
21
+ Ceedling 1.2.x requires Ruby 3+ but only unofficially supports Ruby 4.
22
+
23
+ 1. The new internal pipeline as of 1.0.0 that allows builds to be parallelized and configured per-test-executable can mean a fair amount of duplication of steps. A header file may be mocked identically multiple times. The same source file may be compiled identically multiple times. Delta builds (as of 1.2.0) offer considerable build time savings as do the speedup gains due to parallelization as of 1.0.0. Future releases will optimize away duplication of build steps.
24
+ 1. An `#include` directive must resolve through your project’s configured search paths, as your compiler resolves it, or name a header that `:files` ↳ `:include` adds. A path that would resolve outside your configured search paths (e.g. via relative paths beyond search paths or excessive `..` parent-directory segments) is rejected with a clear, specific error rather than silently causing a confusing downstream build failure.
25
+ 1. With test preprocessing enabled, a test file’s `#include` of a mock whose name comes from a macro defined only in a header, as in `#include MOCK_HEADER` with `MOCK_HEADER` defined in another header, cannot be found. Define the macro under `:defines` ↳ `:test` so the test file sees it directly.
26
+ 1. Fallback preprocessing remains a best effort with no guarantees. It is used where your toolchain’s preprocessor does not support `-fdirectives-only` or where you force it with `:test_build` ↳ `:preprocess_force_fallback`. Its handling of conditional compilation is limited and may not resolve the same branches your compiler would. Macro expansion is not supported at all.
27
+ 1. Delta builds track a library only when they find its file on `:paths` ↳ `:libraries`, or the Dependencies plugin builds it. An “untracked” library found only among your toolchain’s internal search paths, or through a `-L` written into `:flags`, relinks nothing when it changes. Run `ceedling clobber` after such a library changes.
28
+ 1. On Linux and macOS, a test, source, or build path holding `"`, `$`, a backtick, or `\` can still break the commands Ceedling runs. So can any path in a tool you define with an unquoted `${1}`. Quote your own tools’ paths, as [`:tools`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/tools/) describes.
29
+ 1. Paths for `TEST_SOURCE_FILE(...)` remain relative to **_project root_** — that is, from where you execute `ceedling` at the command line. If you move source files or change your directory structure, `TEST_SOURCE_FILE(...)` calls referencing moved files will need to be updated.
30
+ 1. The `ceedling` command of an installation before 1.2.2, such as a 1.2.1 gem, loads a 1.2.3 application that a project selects into its own process. The 1.2.3 application restarts itself in its own process. `new`, `example`, `examples`, `upgrade`, `docs`, and `help` without a project never load the application, so they still run on the older installation’s code. Upgrade the Ceedling whose `ceedling` command you run, typically the gem, to 1.2.3.
31
+ 1. The `ceedling` command you run parses your command line before it hands off to the installation a project selects. It rejects an option that only the selected installation knows. Run the selected installation’s own launcher instead, such as a `--local` project’s `./ceedling` launch script from the project root (`.\ceedling.cmd` on Windows).
32
+ 1. A mock `#include` written relative to the test file that climbs with `..` to a directory the mock search paths do not reach, such as `#include "../src/drivers/mock_foo.h"`, fails to compile, as in earlier releases. Include the mock relative to a search path instead, such as `#include "drivers/mock_foo.h"`.
33
+ 1. On Windows, deep project layouts can still produce build paths near Windows’ 260-character limit. A long `:paths` root is shortened in build paths ([#1387](https://github.com/ThrowTheSwitch/Ceedling/issues/1387)), but a project’s own location, long test names, and deep directories below a root are not. A source outside every `:paths` root, such as one named by `TEST_INCLUDE_PATH()` or `:files`, keeps its whole path, with each `..` written as `_up_/`. Ceedling warns as a path nears the limit. On a host with long paths enabled, [`:project` ↳ `:win_path_limit`](https://docs.throwtheswitch.org/Ceedling/1.2.0/configuration/reference/project/#win_path_limit) can lift that limit.
34
+ 1. On Windows with long paths enabled, Ruby before 4.0 creates, reads, and writes files past 260 characters, but can’t list a directory that deep. Ceedling’s directory scans can fail in such a build directory, and `clean` and `clobber` can leave it behind. Delete it by hand (`rmdir /s /q build`), or use Ruby 4.0.
35
+ 1. Ceedling finds a mock’s header through your configured search paths, not through the directories your toolchain searches on its own. To mock a system header such as glibc’s `sys/socket.h`, list the directory that holds its folder, such as `/usr/include/x86_64-linux-gnu/`, in `:paths` ↳ `:include`, or name the header in `:files` ↳ `:include`. Then include it by its folder, as in `#include "sys/mock_socket.h"`.
36
+ 1. A header that only `:files` ↳ `:include` supplies gets a search path when a test file includes it in quotes, and the whole test build then reaches it. A test that reaches it only through another header or a source file, through `#include <…>`, or through an `#include` whose name a macro gives, finds it only through your configured search paths.
37
+ 1. With `:cmock` ↳ `:treat_inlines: :include` and no mock preprocessing, as with `:project` ↳ `:use_test_preprocessor: :none` or `:tests`, CMock copies a mocked header beside its mock as the header is written. An `#include` in it that reaches its header only from the original header’s own directory then fails to compile, as `#include "types.h"` beside `src/drivers/foo.h` does with only `src/` listed. Listing that directory, as a glob such as `src/**` does, or preprocessing mocks with `:mocks` or `:all`, works around it.
38
+
39
+ ### Partials
40
+
41
+ 1. A module whose header protects itself with `#pragma once` instead of a traditional `#ifndef` include guard can still hit a `redefinition` or `conflicting types` error, if any other header your module uses reaches that header in turn. Ceedling suppresses the real header by defining its include guard, and `#pragma once` provides no guard to define. A mock of such a header keeps only its `extern` declarations and prototypes, leaving its helpers and `static` variables behind. Converting the module’s header to a traditional include guard works around both.
42
+ 1. A module header that `#include`s another header after its own types, where that header uses them, fails in a Partial with an `unknown type name` error. A Partial writes a module header’s own includes ahead of its types. Including that other header from the module’s source instead, after the module’s header, works around it.
43
+ 1. A module source that reaches its own header only through another header, where that header uses the module’s types, fails in a Partial with an `unknown type name` error. When a source never includes its module’s header itself, a Partial writes the module’s types after the source’s includes. Including the module’s header directly from its source, ahead of the other header, works around it.
44
+ 1. A module that one test both tests and mocks keeps its header’s helpers and `static` variables in its own Partial only. Another Partial in that test that includes the module’s header gets the mock’s interface in its place, which leaves them out, so its code that uses them fails to compile or link. Ceedling logs a notice naming what the other Partials use. Testing the module in a test file of its own, and only mocking it in this one, works around it.
45
+ 1. A type created by a macro invocation rather than written out — the list and queue building macros in `sys/queue.h`, for instance — is not recognized as a type, and a Partial using one fails to compile with an `unknown type name` error.
46
+ 1. A function-scoped `static` with a macro after its name, as in `static int count UNUSED;`, is promoted under the macro’s name, and the generated Partial fails to compile. Writing the macro ahead of the type, as in `static UNUSED int count;`, works around it.
47
+ 1. A function-scoped `static` of an anonymous enum, as in `static enum { IDLE, RUN } mode;`, is promoted with its values, which then share file scope with the module’s other names. A value named like another of them fails to compile. Renaming the value, or naming the enum’s type at file scope, works around it.
48
+ 1. A function returning a struct that takes parameters, followed by a stray `;` after its body, as in `struct ops make(int n) { … };`, is taken for a type definition and written to the Partial’s types header. Removing the stray `;` works around it.
49
+ 1. A variable with an asm label and, ahead of its name, a macro taking a word argument, as in `int MY_ALIGN(N) g asm("g_sym");`, is read as a function named after the macro.
50
+ 1. A macro the module retires with `#undef` is carried into the generated Partial anyway, so the name stays visible to your test file and can collide with another macro of the same name.
51
+ 1. Exposing a module’s file-scope variables and functions removes what kept their names private to that module. Two Partialized modules in one test file that each use the same name for a file-scope variable collide at link time.
52
+ 1. Partials cannot generate a module that text-only fallback preprocessing is unable to resolve — a module with an `#include` naming a macro, or with a type behind a conditional expression that cannot be evaluated without a real preprocessor. Ceedling stops the build and names the file and line rather than generating something subtly wrong. Fallback preprocessing is only used where your compiler does not support `-fdirectives-only`, older Apple Clang releases most notably, or where you force it with `:test_build` ↳ `:preprocess_force_fallback`.
53
+
54
+ ---
55
+
19
56
  ## 1.2.2 — 2026-10-31
20
57
 
21
58
  Ceedling 1.2.x requires Ruby 3+ but only unofficially supports Ruby 4.
@@ -31,17 +68,30 @@ Ceedling 1.2.x requires Ruby 3+ but only unofficially supports Ruby 4.
31
68
  1. The `ceedling` command you run parses your command line before it hands off to the installation a project selects. It rejects an option that only the selected installation knows. Run the selected installation’s own launcher instead, such as a `--local` project’s `./ceedling` launch script from the project root (`.\ceedling.cmd` on Windows).
32
69
  1. A mock `#include` written relative to the test file that climbs with `..` to a directory the mock search paths do not reach, such as `#include "../src/drivers/mock_foo.h"`, fails to compile, as in earlier releases. Include the mock relative to a search path instead, such as `#include "drivers/mock_foo.h"`.
33
70
  1. On Windows, a source far outside the project lengthens its build paths, since each `..` in its path from the project adds `_up_/`. Ceedling warns as a path nears Windows’ 260-character limit.
71
+ 1. With `:bullseye` ↳ `:report_task: TRUE`, a `report:bullseye` task on the same command line as a fresh `bullseye:` build writes HTML and XML reports that include Unity, generated test runners, and test files. Run `report:bullseye` again, or run it as its own command after the build ([#1385](https://github.com/ThrowTheSwitch/Ceedling/issues/1385)).
72
+ 1. A test whose build logs “Isolated ‘…’ into its own directory” recompiles some of its objects on every build, though nothing changed. Each build gives the isolated header’s copy a directory with a new name, and those objects track it. Builds stay correct, and no setting avoids the recompiles. The isolation helps only with `:cmock` ↳ `:treat_inlines: :include`. With other mocks and with Partials it changes nothing ([#1408](https://github.com/ThrowTheSwitch/Ceedling/issues/1408)).
73
+ 1. A mock or `#include` that names a header by a directory below a search path, as in `#include "drivers/mock_foo.h"` with `src/` listed, stops the build with ``Found no file `drivers/foo.h` in search paths.`` A glob such as `src/**`, which lists every directory below `src/`, works around it.
74
+ 1. A header that only `:files` ↳ `:include` supplies can’t be mocked. The build stops with ``Found no file `…` in search paths.`` Listing the header’s directory in `:paths` ↳ `:include` works around it.
34
75
 
35
76
  ### Partials
36
77
 
37
78
  1. A module whose header protects itself with `#pragma once` instead of a traditional `#ifndef` include guard can still hit a `redefinition` or `conflicting types` error, if any other header your module uses reaches that header in turn. Ceedling suppresses the real header by defining its include guard, and `#pragma once` provides no guard to define. Converting the module’s header to a traditional include guard works around it.
79
+ 1. A module whose source includes its own header and then a header that uses the module header’s types or macros fails in a Partial with an `unknown type name` or `undeclared` error. A Partial writes every include it carries ahead of the module’s types. Moving those types and macros into a header of their own, which each header using them includes directly, works around it.
80
+ 1. A module header that `#include`s another header after its own types, where that header uses them, fails in a Partial with an `unknown type name` error. A Partial writes a module header’s own includes ahead of its types. Moving those types into a header of their own, which each header using them includes directly, works around it.
38
81
  1. A type created by a macro invocation rather than written out — the list and queue building macros in `sys/queue.h`, for instance — is not recognized as a type, and a Partial using one fails to compile with an `unknown type name` error.
39
- 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile.
82
+ 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile. Define the type on its own, then declare the variable by the type’s name.
40
83
  1. A `struct`, `union`, or `enum` named but not defined, as in `struct node;`, is reproduced in the generated Partial as an invalid declaration. Builds treating warnings as errors fail on it.
84
+ 1. A declaration that a C23 attribute leads, as in `[[maybe_unused]] static int count;`, is misread, and the generated Partial fails to compile. GCC’s spelling of the attribute after the name, as in `static int count __attribute__((unused));`, works around it.
85
+ 1. A function-scoped `static` with a macro after its name, as in `static int count UNUSED;`, is promoted under the macro’s name, and the generated Partial fails to compile. Writing the macro ahead of the type, as in `static UNUSED int count;`, works around it.
86
+ 1. A type with a macro after its closing brace, as in `struct pk { char c; int i; } PACKED;`, is taken for a variable named after the macro, so the type never reaches the Partial’s types header. Writing the macro ahead of the tag, as in `struct PACKED pk { … };`, works around it.
87
+ 1. A function returning a struct that takes parameters, followed by a stray `;` after its body, as in `struct ops make(int n) { … };`, is taken for a type definition and written to the Partial’s types header. Removing the stray `;` works around it.
88
+ 1. A variable with an asm label and, ahead of its name, a macro taking a word argument, as in `int MY_ALIGN(N) g asm("g_sym");`, is read as a function named after the macro.
41
89
  1. A macro the module retires with `#undef` is carried into the generated Partial anyway, so the name stays visible to your test file and can collide with another macro of the same name.
42
90
  1. Exposing a module’s file-scope variables and functions removes what kept their names private to that module. Two Partialized modules in one test file that each use the same name for a file-scope variable collide at link time.
43
91
  1. Partials cannot generate a module that text-only fallback preprocessing is unable to resolve — a module with an `#include` naming a macro, or with a type behind a conditional expression that cannot be evaluated without a real preprocessor. Ceedling stops the build and names the file and line rather than generating something subtly wrong. Fallback preprocessing is only used where your compiler does not support `-fdirectives-only`, older Apple Clang releases most notably, or where you force it with `:test_build` ↳ `:preprocess_force_fallback`.
44
92
 
93
+ Resolved in 1.2.3: `report:bullseye` reports including framework and test sources when run beside a fresh `bullseye:` build, a Partial misreading a declaration that a C23 attribute leads, a Partial failing for a module whose source includes its own header before a header that uses its types, an isolated header recompiling a test’s objects on every build, a Partial failing for a variable declared together with its type, a Partial reproducing a forward declaration such as `struct node;` as an invalid declaration, a Partial losing an attribute a macro writes after a type’s closing brace, a header named by a directory below a search path not being found, and a header only `:files` ↳ `:include` supplies not being mockable.
94
+
45
95
  ---
46
96
 
47
97
  ## 1.2.1 — 2026-10-24
@@ -64,19 +114,32 @@ Ceedling 1.2.x requires Ruby 3+ but only unofficially supports Ruby 4.
64
114
  1. A `-:` `:paths` entry removes only the directory it names, not the directories below it. Add a `-:` entry for each, or use a glob such as `-:src/legacy/**`.
65
115
  1. `~` in a configured path names a directory called `~`, not your home directory. Write the full path instead.
66
116
  1. A `:files` glob such as `+:**/*.c` collects the build directory’s own mocks, runners, and vendored Unity and CMock sources, and test files, and a release build then stops compiling them. Write the glob below your own source directories, such as `+:src/**/*.c`. A source root holding the test root also collects test files into a release build; add a `-:` `:files` entry for them.
117
+ 1. With `:bullseye` ↳ `:report_task: TRUE`, a `report:bullseye` task on the same command line as a fresh `bullseye:` build writes HTML and XML reports that include Unity, generated test runners, and test files. Run `report:bullseye` again, or run it as its own command after the build ([#1385](https://github.com/ThrowTheSwitch/Ceedling/issues/1385)).
118
+ 1. A test whose build logs “Isolated ‘…’ into its own directory” recompiles some of its objects on every build, though nothing changed. Each build gives the isolated header’s copy a directory with a new name, and those objects track it. Builds stay correct, and no setting avoids the recompiles. The isolation helps only with `:cmock` ↳ `:treat_inlines: :include`. With other mocks and with Partials it changes nothing ([#1408](https://github.com/ThrowTheSwitch/Ceedling/issues/1408)).
119
+ 1. A mock or `#include` that names a header by a directory below a search path, as in `#include "drivers/mock_foo.h"` with `src/` listed, stops the build with ``Found no file `drivers/foo.h` in search paths.`` A glob such as `src/**`, which lists every directory below `src/`, works around it.
120
+ 1. A header that only `:files` ↳ `:include` supplies can’t be mocked. The build stops with ``Found no file `…` in search paths.`` Listing the header’s directory in `:paths` ↳ `:include` works around it.
67
121
 
68
122
  ### Partials
69
123
 
70
124
  1. A module whose header protects itself with `#pragma once` instead of a traditional `#ifndef` include guard can still hit a `redefinition` or `conflicting types` error, if any other header your module uses reaches that header in turn. Ceedling suppresses the real header by defining its include guard, and `#pragma once` provides no guard to define. Converting the module’s header to a traditional include guard works around it.
125
+ 1. A module whose source includes its own header and then a header that uses the module header’s types or macros fails in a Partial with an `unknown type name` or `undeclared` error. A Partial writes every include it carries ahead of the module’s types. Moving those types and macros into a header of their own, which each header using them includes directly, works around it.
126
+ 1. A module header that `#include`s another header after its own types, where that header uses them, fails in a Partial with an `unknown type name` error. A Partial writes a module header’s own includes ahead of its types. Moving those types into a header of their own, which each header using them includes directly, works around it.
71
127
  1. A type created by a macro invocation rather than written out — the list and queue building macros in `sys/queue.h`, for instance — is not recognized as a type, and a Partial using one fails to compile with an `unknown type name` error.
72
- 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile.
128
+ 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile. Define the type on its own, then declare the variable by the type’s name.
73
129
  1. A `struct`, `union`, or `enum` named but not defined, as in `struct node;`, is reproduced in the generated Partial as an invalid declaration. Builds treating warnings as errors fail on it.
130
+ 1. A declaration that a C23 attribute leads, as in `[[maybe_unused]] static int count;`, is misread, and the generated Partial fails to compile. GCC’s spelling of the attribute after the name, as in `static int count __attribute__((unused));`, works around it.
131
+ 1. A function-scoped `static` with a macro after its name, as in `static int count UNUSED;`, is promoted under the macro’s name, and the generated Partial fails to compile. Writing the macro ahead of the type, as in `static UNUSED int count;`, works around it.
132
+ 1. A type with a macro after its closing brace, as in `struct pk { char c; int i; } PACKED;`, is taken for a variable named after the macro, so the type never reaches the Partial’s types header. Writing the macro ahead of the tag, as in `struct PACKED pk { … };`, works around it.
133
+ 1. A function returning a struct that takes parameters, followed by a stray `;` after its body, as in `struct ops make(int n) { … };`, is taken for a type definition and written to the Partial’s types header. Removing the stray `;` works around it.
134
+ 1. A variable with an asm label and, ahead of its name, a macro taking a word argument, as in `int MY_ALIGN(N) g asm("g_sym");`, is read as a function named after the macro.
74
135
  1. A macro the module retires with `#undef` is carried into the generated Partial anyway, so the name stays visible to your test file and can collide with another macro of the same name.
75
136
  1. Exposing a module’s file-scope variables and functions removes what kept their names private to that module. Two Partialized modules in one test file that each use the same name for a file-scope variable collide at link time.
76
137
  1. Partials cannot generate a module that text-only fallback preprocessing is unable to resolve — a module with an `#include` naming a macro, or with a type behind a conditional expression that cannot be evaluated without a real preprocessor. Ceedling stops the build and names the file and line rather than generating something subtly wrong. Fallback preprocessing is only used where your compiler does not support `-fdirectives-only`, older Apple Clang releases most notably, or where you force it with `:test_build` ↳ `:preprocess_force_fallback`.
77
138
 
78
139
  Resolved in 1.2.2: the mixing of two installations’ code, `./ceedling` failing in a `--local` project, delta builds not relinking a changed library, most shell characters in a path stopping a test from running, and the path handling problems above: mocks written outside the build directory, same-named sources sharing an object, `clobber` emptying a project under a `.` build root, `-:` entries keeping the directories below them, and `~`. Also resolved: a directory left in `build/vendor/` for a file `lstat` misreported failing every build. The [Changelog](Changelog.md) lists every other fix since this release.
79
140
 
141
+ Resolved in 1.2.3: `report:bullseye` reports including framework and test sources when run beside a fresh `bullseye:` build, a Partial misreading a declaration that a C23 attribute leads, a Partial failing for a module whose source includes its own header before a header that uses its types, an isolated header recompiling a test’s objects on every build, a Partial failing for a variable declared together with its type, a Partial reproducing a forward declaration such as `struct node;` as an invalid declaration, a Partial losing an attribute a macro writes after a type’s closing brace, a header named by a directory below a search path not being found, and a header only `:files` ↳ `:include` supplies not being mockable.
142
+
80
143
  ---
81
144
 
82
145
  ## 1.2.0 — 2026-10-21
@@ -99,19 +162,32 @@ Ceedling 1.2.x requires Ruby 3+ but only unofficially supports Ruby 4.
99
162
  1. A `-:` `:paths` entry removes only the directory it names, not the directories below it. Add a `-:` entry for each, or use a glob such as `-:src/legacy/**`.
100
163
  1. `~` in a configured path names a directory called `~`, not your home directory. Write the full path instead.
101
164
  1. A `:files` glob such as `+:**/*.c` collects the build directory’s own mocks, runners, and vendored Unity and CMock sources, and test files, and a release build then stops compiling them. Write the glob below your own source directories, such as `+:src/**/*.c`. A source root holding the test root also collects test files into a release build; add a `-:` `:files` entry for them.
165
+ 1. With `:bullseye` ↳ `:report_task: TRUE`, a `report:bullseye` task on the same command line as a fresh `bullseye:` build writes HTML and XML reports that include Unity, generated test runners, and test files. Run `report:bullseye` again, or run it as its own command after the build ([#1385](https://github.com/ThrowTheSwitch/Ceedling/issues/1385)).
166
+ 1. A test whose build logs “Isolated ‘…’ into its own directory” recompiles some of its objects on every build, though nothing changed. Each build gives the isolated header’s copy a directory with a new name, and those objects track it. Builds stay correct, and no setting avoids the recompiles. The isolation helps only with `:cmock` ↳ `:treat_inlines: :include`. With other mocks and with Partials it changes nothing ([#1408](https://github.com/ThrowTheSwitch/Ceedling/issues/1408)).
167
+ 1. A mock or `#include` that names a header by a directory below a search path, as in `#include "drivers/mock_foo.h"` with `src/` listed, stops the build with ``Found no file `drivers/foo.h` in search paths.`` A glob such as `src/**`, which lists every directory below `src/`, works around it.
168
+ 1. A header that only `:files` ↳ `:include` supplies can’t be mocked. The build stops with ``Found no file `…` in search paths.`` Listing the header’s directory in `:paths` ↳ `:include` works around it.
102
169
 
103
170
  ### Partials
104
171
 
105
172
  1. A module whose header protects itself with `#pragma once` instead of a traditional `#ifndef` include guard can still hit a `redefinition` or `conflicting types` error, if any other header your module uses reaches that header in turn. Ceedling suppresses the real header by defining its include guard, and `#pragma once` provides no guard to define. Converting the module’s header to a traditional include guard works around it.
173
+ 1. A module whose source includes its own header and then a header that uses the module header’s types or macros fails in a Partial with an `unknown type name` or `undeclared` error. A Partial writes every include it carries ahead of the module’s types. Moving those types and macros into a header of their own, which each header using them includes directly, works around it.
174
+ 1. A module header that `#include`s another header after its own types, where that header uses them, fails in a Partial with an `unknown type name` error. A Partial writes a module header’s own includes ahead of its types. Moving those types into a header of their own, which each header using them includes directly, works around it.
106
175
  1. A type created by a macro invocation rather than written out — the list and queue building macros in `sys/queue.h`, for instance — is not recognized as a type, and a Partial using one fails to compile with an `unknown type name` error.
107
- 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile.
176
+ 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile. Define the type on its own, then declare the variable by the type’s name.
108
177
  1. A `struct`, `union`, or `enum` named but not defined, as in `struct node;`, is reproduced in the generated Partial as an invalid declaration. Builds treating warnings as errors fail on it.
178
+ 1. A declaration that a C23 attribute leads, as in `[[maybe_unused]] static int count;`, is misread, and the generated Partial fails to compile. GCC’s spelling of the attribute after the name, as in `static int count __attribute__((unused));`, works around it.
179
+ 1. A function-scoped `static` with a macro after its name, as in `static int count UNUSED;`, is promoted under the macro’s name, and the generated Partial fails to compile. Writing the macro ahead of the type, as in `static UNUSED int count;`, works around it.
180
+ 1. A type with a macro after its closing brace, as in `struct pk { char c; int i; } PACKED;`, is taken for a variable named after the macro, so the type never reaches the Partial’s types header. Writing the macro ahead of the tag, as in `struct PACKED pk { … };`, works around it.
181
+ 1. A function returning a struct that takes parameters, followed by a stray `;` after its body, as in `struct ops make(int n) { … };`, is taken for a type definition and written to the Partial’s types header. Removing the stray `;` works around it.
182
+ 1. A variable with an asm label and, ahead of its name, a macro taking a word argument, as in `int MY_ALIGN(N) g asm("g_sym");`, is read as a function named after the macro.
109
183
  1. A macro the module retires with `#undef` is carried into the generated Partial anyway, so the name stays visible to your test file and can collide with another macro of the same name.
110
184
  1. Exposing a module’s file-scope variables and functions removes what kept their names private to that module. Two Partialized modules in one test file that each use the same name for a file-scope variable collide at link time.
111
185
  1. Partials cannot generate a module that text-only fallback preprocessing is unable to resolve — a module with an `#include` naming a macro, or with a type behind a conditional expression that cannot be evaluated without a real preprocessor. Ceedling stops the build and names the file and line rather than generating something subtly wrong. Fallback preprocessing is only used where your compiler does not support `-fdirectives-only`, older Apple Clang releases most notably, or where you force it with `:test_build` ↳ `:preprocess_force_fallback`.
112
186
 
113
187
  Resolved in 1.2.2: the mixing of two installations’ code, `./ceedling` failing in a `--local` project, delta builds not relinking a changed library, most shell characters in a path stopping a test from running, and the path handling problems above: mocks written outside the build directory, same-named sources sharing an object, `clobber` emptying a project under a `.` build root, `-:` entries keeping the directories below them, and `~`. Also resolved: frameworks vendor copying failing on files `lstat` misreports as directories. The [Changelog](Changelog.md) lists every other fix since this release.
114
188
 
189
+ Resolved in 1.2.3: `report:bullseye` reports including framework and test sources when run beside a fresh `bullseye:` build, a Partial misreading a declaration that a C23 attribute leads, a Partial failing for a module whose source includes its own header before a header that uses its types, an isolated header recompiling a test’s objects on every build, a Partial failing for a variable declared together with its type, a Partial reproducing a forward declaration such as `struct node;` as an invalid declaration, a Partial losing an attribute a macro writes after a type’s closing brace, a header named by a directory below a search path not being found, and a header only `:files` ↳ `:include` supplies not being mockable.
190
+
115
191
  ---
116
192
 
117
193
  ## 1.1.x — 2026-07-16
@@ -137,13 +213,22 @@ Covers 1.1.0 through 1.1.10 as known by 1.1.10. An item may not apply to every p
137
213
  1. User includes (`#include "path/user.h"`) from source C files lose their relative path when Partial and mock header files are generated from source. Compilation failures can result from certain uncommon cases involving headers of the same names in different directories and a source file including both such headers.
138
214
  1. Partial directive macros accept only a bare module name — a filename stem with no path. A project holding two modules of the same name in different directories cannot say which of them a Partial is for, and Ceedling resolves the name the way a compiler resolves a header, selecting the first match among the ordered search paths. Path-qualified Partial macros will arrive in 1.2.0.
139
215
  1. A module whose header protects itself with `#pragma once` instead of a traditional `#ifndef` include guard can still hit a `redefinition` or `conflicting types` error, if any other header your module uses reaches that header in turn. Ceedling suppresses the real header by defining its include guard, and `#pragma once` provides no guard to define. Converting the module’s header to a traditional include guard works around it.
216
+ 1. A module whose source includes its own header and then a header that uses the module header’s types or macros fails in a Partial with an `unknown type name` or `undeclared` error. A Partial writes every include it carries ahead of the module’s types. Moving those types and macros into a header of their own, which each header using them includes directly, works around it.
217
+ 1. A module header that `#include`s another header after its own types, where that header uses them, fails in a Partial with an `unknown type name` error. A Partial writes a module header’s own includes ahead of its types. Moving those types into a header of their own, which each header using them includes directly, works around it.
140
218
  1. A type created by a macro invocation rather than written out — the list and queue building macros in `sys/queue.h`, for instance — is not recognized as a type, and a Partial using one fails to compile with an `unknown type name` error.
141
- 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile.
219
+ 1. A `struct`, `union`, or `enum` written directly on a variable, as in `static struct { int depth; } slot;`, is treated as a variable alone. The generated Partial states the type twice and fails to compile. Define the type on its own, then declare the variable by the type’s name.
142
220
  1. A `struct`, `union`, or `enum` named but not defined, as in `struct node;`, is reproduced in the generated Partial as an invalid declaration. Builds treating warnings as errors fail on it.
221
+ 1. A declaration that a C23 attribute leads, as in `[[maybe_unused]] static int count;`, is misread, and the generated Partial fails to compile. GCC’s spelling of the attribute after the name, as in `static int count __attribute__((unused));`, works around it.
222
+ 1. A function-scoped `static` with a macro after its name, as in `static int count UNUSED;`, is promoted under the macro’s name, and the generated Partial fails to compile. Writing the macro ahead of the type, as in `static UNUSED int count;`, works around it.
223
+ 1. A type with a macro after its closing brace, as in `struct pk { char c; int i; } PACKED;`, is taken for a variable named after the macro, so the type never reaches the Partial’s types header. Writing the macro ahead of the tag, as in `struct PACKED pk { … };`, works around it.
224
+ 1. A function returning a struct that takes parameters, followed by a stray `;` after its body, as in `struct ops make(int n) { … };`, is taken for a type definition and written to the Partial’s types header. Removing the stray `;` works around it.
225
+ 1. A variable with an asm label and, ahead of its name, a macro taking a word argument, as in `int MY_ALIGN(N) g asm("g_sym");`, is read as a function named after the macro.
143
226
  1. A macro the module retires with `#undef` is carried into the generated Partial anyway, so the name stays visible to your test file and can collide with another macro of the same name.
144
227
  1. Exposing a module’s file-scope variables and functions removes what kept their names private to that module. Two Partialized modules in one test file that each use the same name for a file-scope variable collide at link time.
145
228
  1. A source line can be joined to the line before it in a generated Partial when its line number happens to match the last line of a header the source included. Two adjacent `#define`s, for instance, become one line, and the build fails with `stray '#' in program`.
146
229
 
230
+ Resolved in 1.2.3: a Partial misreading a declaration that a C23 attribute leads, a Partial failing for a module whose source includes its own header before a header that uses its types, a Partial failing for a variable declared together with its type, a Partial reproducing a forward declaration such as `struct node;` as an invalid declaration, and a Partial losing an attribute a macro writes after a type’s closing brace.
231
+
147
232
  ---
148
233
 
149
234
  ## 1.0.0 — 2025-01-01
@@ -158,3 +243,5 @@ Covers 1.1.0 through 1.1.10 as known by 1.1.10. An item may not apply to every p
158
243
  1. The Bullseye code coverage plugin has been temporarily disabled until a license can be procured that will allow updates and improvements.
159
244
  1. On Windows, a test file whose name contains _install_, _setup_, _update_, or _patch_ can build a test executable that the Installer Detection feature of User Account Control (UAC) will not run without administrator privileges. Toolchains that embed a manifest requesting the invoker’s privileges, such as MSYS2’s MinGW-w64 GCC with its default manifest installed, avoid this. Otherwise, avoid these words in test filenames.
160
245
  1. A test can't run when its file name or the build root holds a space, an apostrophe, or another character the shell reads, such as `&`, `;`, `(`, or `|`. Every case reports a crash, or the build stops. Paths the Dependencies plugin’s tools name break the same way. Rename the file, or quote the test fixture’s executable: `:tools` ↳ `:test_fixture` ↳ `:executable: '"${1}"'` ([#1373](https://github.com/ThrowTheSwitch/Ceedling/issues/1373)).
246
+
247
+ Resolved in 1.1.0: test preprocessing losing Unity’s `TEST_CASE()` and `TEST_RANGE()`.
@@ -11,6 +11,8 @@ This example project illustrates:
11
11
  and `static` variables that are normally inaccessible to the linker
12
12
  - **Every major Partials pattern** across a range of sensor and system modules
13
13
  - **Partials and mocks used together** in the same test suite
14
+ - **Carrying** — a Partial bringing along the helpers, prototypes, and
15
+ variables its selected functions rely on
14
16
 
15
17
  This project is test-suite only (no release build).
16
18
 
@@ -33,6 +35,9 @@ wondrous_forest/
33
35
  │ ├── ForestMonitor.c/.h
34
36
  │ ├── SensorHal.c/.h
35
37
  │ ├── UartDriver.c/.h
38
+ │ ├── RainGauge.c/.h
39
+ │ ├── RainTipIsr.c/.h # Defines the tip counter RainGauge.h declares extern
40
+ │ ├── ForestUnits.h # C99 inline functions, no source file of its own
36
41
  │ ├── sensors/soil/Calibration.c/.h # Same module name as the one below
37
42
  │ ├── sensors/light/Calibration.c/.h # Told apart by directory
38
43
  │ └── Types.h
@@ -45,7 +50,9 @@ wondrous_forest/
45
50
  ├── TestEventQueue.c
46
51
  ├── TestForestMonitor.c
47
52
  ├── TestSensorHal.c
48
- └── TestUartDriver.c
53
+ ├── TestUartDriver.c
54
+ ├── TestRainGauge.c
55
+ └── TestCalibration.c
49
56
  ```
50
57
 
51
58
  ---
@@ -64,6 +71,27 @@ wondrous_forest/
64
71
  | TestSensorHal.c | Traditional — HAL has no private statics |
65
72
  | TestUartDriver.c | Traditional — UART driver has no private statics |
66
73
  | TestCalibration.c | `TEST_PARTIAL_PRIVATE_MODULE_AT` — two same-named modules |
74
+ | TestRainGauge.c | `TEST_PARTIAL_PUBLIC_MODULE` + a subtracted, stubbed function |
75
+
76
+ ---
77
+
78
+ ## What a Partial Carries
79
+
80
+ A Partial brings along what its selected functions rely on. `TestRainGauge.c`
81
+ selects RainGauge's public functions and subtracts one of them. Those
82
+ functions rely on code the test does not select, so the Partial carries it.
83
+ Run the test with `--verbosity=debug` to see each carried item and why.
84
+
85
+ | Carried item | Why the Partial needs it |
86
+ |---|---|
87
+ | `RainGauge_TipsToMicrometers()` | `RainGauge.h` defines this `static inline` helper, and `RainGauge_Update()` calls it |
88
+ | `extern inline` prototype of `ForestUnits_MicrometersToTenthsMm()` | `ForestUnits.h` defines the function C99 `inline`. The prototype makes the Partial hold its external definition |
89
+ | Prototype of `RainGauge_ReportStorm()` | The test subtracts this function and defines a stub. `RainGauge_Update()` calls the stub |
90
+ | Weak definition of `g_rain_tip_count` | `RainGauge.h` declares the counter `extern`. Its real definition in `RainTipIsr.c`, which the test links, takes precedence |
91
+
92
+ Each carried item keeps its original spelling. A `#line` directive ahead of
93
+ each points back to its original file and line. Coverage of the carried
94
+ helper therefore counts toward `RainGauge.h`.
67
95
 
68
96
  ---
69
97
 
@@ -0,0 +1,23 @@
1
+ /* =========================================================================
2
+ Ceedling - Test-Centered Build System for C
3
+ ThrowTheSwitch.org
4
+ Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
5
+ SPDX-License-Identifier: MIT
6
+ ========================================================================= */
7
+
8
+ #ifndef FOREST_UNITS_H
9
+ #define FOREST_UNITS_H
10
+
11
+ #include "Types.h"
12
+
13
+ /* Unit conversions shared across the station, written as C99 inline functions.
14
+ * Every caller sees the body and may inline it. An unoptimized call links to an
15
+ * external definition instead. C99 places that definition in the one source file
16
+ * that declares the function `extern inline`. This header has no source file of
17
+ * its own, so RainGauge.c holds the definition. */
18
+ inline uint32 ForestUnits_MicrometersToTenthsMm(uint32 micrometers)
19
+ {
20
+ return micrometers / 100u;
21
+ }
22
+
23
+ #endif /* FOREST_UNITS_H */
@@ -0,0 +1,59 @@
1
+ /* =========================================================================
2
+ Ceedling - Test-Centered Build System for C
3
+ ThrowTheSwitch.org
4
+ Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
5
+ SPDX-License-Identifier: MIT
6
+ ========================================================================= */
7
+
8
+ #include "Types.h"
9
+ #include "RainGauge.h"
10
+ #include "ForestUnits.h"
11
+ #include "UartDriver.h"
12
+
13
+ /* Makes this file hold the external definition of a ForestUnits.h inline function */
14
+ extern inline uint32 ForestUnits_MicrometersToTenthsMm(uint32 micrometers);
15
+
16
+ static uint32 s_tips_at_update;
17
+ static uint32 s_rainfall_um;
18
+ static bool s_storm;
19
+
20
+ void RainGauge_Init(void)
21
+ {
22
+ s_tips_at_update = g_rain_tip_count;
23
+ s_rainfall_um = 0u;
24
+ s_storm = false;
25
+ }
26
+
27
+ /* Adds the rain since the last update and reports a storm once, as it begins */
28
+ void RainGauge_Update(void)
29
+ {
30
+ uint32 tips = g_rain_tip_count;
31
+ uint32 minute_um = RainGauge_TipsToMicrometers(tips - s_tips_at_update);
32
+ bool storm = (minute_um * RAIN_GAUGE_UPDATES_PER_HOUR) >= RAIN_GAUGE_STORM_UM_PER_HOUR;
33
+
34
+ s_tips_at_update = tips;
35
+ s_rainfall_um += minute_um;
36
+
37
+ if (storm && !s_storm) { RainGauge_ReportStorm(); }
38
+ s_storm = storm;
39
+ }
40
+
41
+ uint32 RainGauge_GetRainfallUm(void)
42
+ {
43
+ return s_rainfall_um;
44
+ }
45
+
46
+ uint32 RainGauge_GetRainfallTenthsMm(void)
47
+ {
48
+ return ForestUnits_MicrometersToTenthsMm(s_rainfall_um);
49
+ }
50
+
51
+ bool RainGauge_IsStorm(void)
52
+ {
53
+ return s_storm;
54
+ }
55
+
56
+ void RainGauge_ReportStorm(void)
57
+ {
58
+ UartDriver_SendString("STORM\r\n");
59
+ }