ceedling 1.2.0 → 1.2.1

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 (157) hide show
  1. checksums.yaml +4 -4
  2. data/GIT_COMMIT_SHA +1 -1
  3. data/README.md +47 -50
  4. data/Rakefile +3 -2
  5. data/bin/app_cfg.rb +21 -0
  6. data/bin/cli_handler.rb +7 -1
  7. data/bin/cli_helper.rb +5 -0
  8. data/docs/Changelog.md +10 -0
  9. data/docs/overrides/main.html +11 -8
  10. data/lib/ceedling/config/configurator.rb +5 -2
  11. data/lib/ceedling/config/configurator_setup.rb +26 -15
  12. data/lib/ceedling/file_wrapper.rb +56 -26
  13. data/lib/ceedling/rake_app/test_task_name.rb +29 -0
  14. data/lib/ceedling/rakefile.rb +1 -0
  15. data/lib/ceedling/rakefiles/tests/rules_tests.rake +3 -20
  16. data/lib/ceedling/rakefiles/tests/rules_tests_generate.rake +4 -30
  17. data/lib/ceedling/setupinator.rb +4 -0
  18. data/lib/ceedling/test_invoker/test_build_executor.rb +18 -1
  19. data/lib/version.rb +1 -1
  20. data/plugins/bullseye/bullseye.rake +6 -9
  21. data/plugins/gcov/gcov.rake +6 -9
  22. data/plugins/sanitize/sanitize.rake +6 -6
  23. data/plugins/valgrind/valgrind.rake +6 -6
  24. data/site-local/404.html +6 -20
  25. data/site-local/assets/javascripts/{bundle.d7400e89.min.js → bundle.c21346df.min.js} +3 -3
  26. data/site-local/assets/javascripts/{bundle.d7400e89.min.js.map → bundle.c21346df.min.js.map} +2 -2
  27. data/site-local/assets/javascripts/workers/{search.2c215733.min.js → search.a7633da7.min.js} +2 -2
  28. data/site-local/assets/javascripts/workers/{search.2c215733.min.js.map → search.a7633da7.min.js.map} +1 -1
  29. data/site-local/assets/stylesheets/main.57a0d79d.min.css +6 -0
  30. data/site-local/assets/stylesheets/main.57a0d79d.min.css.map +1 -0
  31. data/site-local/assets/stylesheets/palette.fb2fffe2.min.css +4 -0
  32. data/site-local/assets/stylesheets/palette.fb2fffe2.min.css.map +1 -0
  33. data/site-local/configuration/environment-vars.html +6 -20
  34. data/site-local/configuration/global-collections.html +6 -20
  35. data/site-local/configuration/index.html +6 -20
  36. data/site-local/configuration/loading.html +6 -20
  37. data/site-local/configuration/mixins.html +10 -24
  38. data/site-local/configuration/parallel-builds.html +6 -20
  39. data/site-local/configuration/project-file.html +8 -22
  40. data/site-local/configuration/reference/cexception.html +6 -20
  41. data/site-local/configuration/reference/cmock.html +6 -20
  42. data/site-local/configuration/reference/defines.html +16 -30
  43. data/site-local/configuration/reference/environment.html +10 -24
  44. data/site-local/configuration/reference/extension.html +6 -20
  45. data/site-local/configuration/reference/files.html +13 -27
  46. data/site-local/configuration/reference/flags.html +13 -27
  47. data/site-local/configuration/reference/index.html +6 -20
  48. data/site-local/configuration/reference/libraries.html +6 -20
  49. data/site-local/configuration/reference/mixins.html +6 -20
  50. data/site-local/configuration/reference/partials.html +6 -20
  51. data/site-local/configuration/reference/paths.html +11 -25
  52. data/site-local/configuration/reference/plugins.html +6 -20
  53. data/site-local/configuration/reference/project.html +16 -30
  54. data/site-local/configuration/reference/release-build.html +6 -20
  55. data/site-local/configuration/reference/test-build.html +6 -20
  56. data/site-local/configuration/reference/test-runner.html +6 -20
  57. data/site-local/configuration/reference/tools.html +18 -32
  58. data/site-local/configuration/reference/unity.html +6 -20
  59. data/site-local/configuration/which-ceedling.html +6 -20
  60. data/site-local/development/index.html +6 -20
  61. data/site-local/development/plugins/configuration.html +6 -20
  62. data/site-local/development/plugins/index.html +6 -20
  63. data/site-local/development/plugins/plugin-subclass.html +54 -68
  64. data/site-local/development/plugins/rake-tasks.html +8 -22
  65. data/site-local/development/releases.html +79 -28
  66. data/site-local/development/workflow.html +14 -28
  67. data/site-local/getting-started/builds.html +6 -20
  68. data/site-local/getting-started/command-line.html +6 -20
  69. data/site-local/getting-started/example-projects/cipher-quest.html +6 -20
  70. data/site-local/getting-started/example-projects/index.html +6 -20
  71. data/site-local/getting-started/example-projects/temp-sensor.html +6 -20
  72. data/site-local/getting-started/example-projects/wondrous-forest.html +6 -20
  73. data/site-local/getting-started/index.html +6 -20
  74. data/site-local/getting-started/installation.html +6 -20
  75. data/site-local/getting-started/quick-start.html +6 -20
  76. data/site-local/help.html +6 -20
  77. data/site-local/index.html +11 -24
  78. data/site-local/overview/build-system.html +6 -20
  79. data/site-local/overview/index.html +6 -20
  80. data/site-local/overview/test-environments.html +6 -20
  81. data/site-local/overview/tools-and-frameworks.html +6 -20
  82. data/site-local/plugins/beep.html +6 -20
  83. data/site-local/plugins/bullseye/index.html +13 -24
  84. data/site-local/plugins/bullseye/licensing.html +14 -28
  85. data/site-local/plugins/command-hooks.html +8 -22
  86. data/site-local/plugins/compile-commands-json-db.html +6 -20
  87. data/site-local/plugins/cppcheck.html +8 -22
  88. data/site-local/plugins/dependencies.html +10 -24
  89. data/site-local/plugins/fff.html +7 -21
  90. data/site-local/plugins/gcov/examples.html +7 -21
  91. data/site-local/plugins/gcov/gcovr.html +7 -21
  92. data/site-local/plugins/gcov/index.html +6 -20
  93. data/site-local/plugins/gcov/overview.html +9 -20
  94. data/site-local/plugins/gcov/reportgenerator.html +9 -23
  95. data/site-local/plugins/gcov/reporting.html +6 -20
  96. data/site-local/plugins/gcov/setup.html +6 -20
  97. data/site-local/plugins/gcov/tool-versions.html +6 -20
  98. data/site-local/plugins/gcov/troubleshooting.html +10 -24
  99. data/site-local/plugins/index.html +6 -20
  100. data/site-local/plugins/module-generator.html +21 -35
  101. data/site-local/plugins/report-build-warnings-log.html +53 -67
  102. data/site-local/plugins/report-tests-gtestlike-stdout.html +6 -20
  103. data/site-local/plugins/report-tests-ide-stdout.html +43 -57
  104. data/site-local/plugins/report-tests-log-factory.html +50 -64
  105. data/site-local/plugins/report-tests-pretty-stdout.html +7 -21
  106. data/site-local/plugins/report-tests-raw-output-log.html +6 -20
  107. data/site-local/plugins/report-tests-teamcity-stdout.html +16 -30
  108. data/site-local/plugins/sanitize.html +54 -64
  109. data/site-local/plugins/valgrind.html +46 -56
  110. data/site-local/project/index.html +6 -20
  111. data/site-local/project/release-history.html +6 -20
  112. data/site-local/project/sbom.html +6 -20
  113. data/site-local/project/upgrade.html +6 -20
  114. data/site-local/reference/build-directives.html +6 -20
  115. data/site-local/reference/command-line.html +6 -20
  116. data/site-local/reference/environment-vars.html +6 -20
  117. data/site-local/reference/gcov-plugin.html +6 -20
  118. data/site-local/reference/global-collections.html +6 -20
  119. data/site-local/reference/index.html +6 -20
  120. data/site-local/reference/partials-macros.html +6 -20
  121. data/site-local/reference/project-configuration.html +6 -20
  122. data/site-local/sitemap.xml.gz +0 -0
  123. data/site-local/snapshot/examples/cipher_quest/index.html +16 -30
  124. data/site-local/snapshot/examples/temp_sensor/index.html +8 -22
  125. data/site-local/snapshot/examples/wondrous_forest/index.html +6 -20
  126. data/site-local/testing-guide/build-directives.html +14 -28
  127. data/site-local/testing-guide/conventions.html +13 -27
  128. data/site-local/testing-guide/frameworks.html +11 -25
  129. data/site-local/testing-guide/index.html +6 -20
  130. data/site-local/testing-guide/partials/configuration.html +8 -22
  131. data/site-local/testing-guide/partials/conventions.html +8 -22
  132. data/site-local/testing-guide/partials/directives.html +16 -30
  133. data/site-local/testing-guide/partials/example.html +14 -28
  134. data/site-local/testing-guide/partials/index.html +6 -20
  135. data/site-local/testing-guide/partials/overview.html +6 -20
  136. data/site-local/testing-guide/partials/variables.html +11 -25
  137. data/site-local/testing-guide/test-cases.html +13 -27
  138. data/site-local/testing-guide/test-sample.html +12 -26
  139. data/site-local/testing-guide/test-suite-anatomy.html +6 -20
  140. data/spec/integration/configurator_pipeline_spec.rb +10 -0
  141. data/spec/integration/dependencies/dependency_tracker_core_spec.rb +40 -0
  142. data/spec/integration/rake_task_registry_plugins_spec.rb +95 -0
  143. data/spec/integration/vendor_copy_transient_io_retry_spec.rb +122 -74
  144. data/spec/support/integration/configurator_integration_helper.rb +4 -1
  145. data/spec/units/bin/app_cfg_spec.rb +10 -0
  146. data/spec/units/bin/cli_handler_spec.rb +2 -1
  147. data/spec/units/bin/cli_helper_spec.rb +10 -0
  148. data/spec/units/config/configurator_setup_spec.rb +61 -43
  149. data/spec/units/config/configurator_spec.rb +10 -1
  150. data/spec/units/file_wrapper_spec.rb +66 -27
  151. data/spec/units/rake_app/test_task_name_spec.rb +47 -0
  152. data/spec/units/test_build_executor_spec.rb +42 -2
  153. metadata +16 -11
  154. data/site-local/assets/stylesheets/main.ec1eaa64.min.css +0 -1
  155. data/site-local/assets/stylesheets/main.ec1eaa64.min.css.map +0 -1
  156. data/site-local/assets/stylesheets/palette.ab4e12ef.min.css +0 -1
  157. data/site-local/assets/stylesheets/palette.ab4e12ef.min.css.map +0 -1
@@ -21,7 +21,7 @@
21
21
 
22
22
 
23
23
  <link rel="icon" href="../assets/images/favicon.png">
24
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
24
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.0">
25
25
 
26
26
 
27
27
 
@@ -29,10 +29,10 @@
29
29
 
30
30
 
31
31
 
32
- <link rel="stylesheet" href="../assets/stylesheets/main.ec1eaa64.min.css">
32
+ <link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
33
33
 
34
34
 
35
- <link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
35
+ <link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
36
36
 
37
37
 
38
38
 
@@ -89,30 +89,16 @@
89
89
  </div>
90
90
  <div data-md-component="announce">
91
91
 
92
- <aside class="md-banner">
93
- <div class="md-banner__inner md-grid md-typeset">
94
-
95
-
96
-
97
-
98
- </div>
99
-
100
- </aside>
101
-
102
92
  </div>
103
93
 
104
94
  <div data-md-color-scheme="default" data-md-component="outdated" hidden>
105
95
 
106
96
  <aside class="md-banner md-banner--warning">
107
97
  <div class="md-banner__inner md-grid md-typeset">
108
-
109
-
110
- You are not viewing the latest version.
98
+ You are not viewing the latest version.
111
99
  <a href="../..">
112
100
  <strong>Click here to go to latest.</strong>
113
101
  </a>
114
-
115
-
116
102
  </div>
117
103
  <script>var el=document.querySelector("[data-md-component=outdated]"),base=new URL(".."),outdated=__md_get("__outdated",sessionStorage,base);!0===outdated&&el&&(el.hidden=!1)</script>
118
104
  </aside>
@@ -4494,14 +4480,14 @@ assertions right is actually a bit tricky. Unity does all that
4494
4480
  hard work for you and has been thoroughly tested itself and battle
4495
4481
  hardened through use by many, many developers.</p>
4496
4482
  <h2 id="super-simple-passing-test-case">Super simple passing test case</h2>
4497
- <div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;unity.h&quot;</span>
4483
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"unity.h"</span>
4498
4484
  <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>
4499
4485
  <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="kt">void</span><span class="w"> </span><span class="nf">test_case</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
4500
4486
  <a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="n">TEST_ASSERT_TRUE</span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">);</span>
4501
4487
  <a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="p">}</span>
4502
4488
  </code></pre></div>
4503
4489
  <h2 id="super-simple-failing-test-case">Super simple failing test case</h2>
4504
- <div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;unity.h&quot;</span>
4490
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"unity.h"</span>
4505
4491
  <a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a>
4506
4492
  <a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="kt">void</span><span class="w"> </span><span class="nf">test_a_different_case</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
4507
4493
  <a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="w"> </span><span class="n">TEST_ASSERT_TRUE</span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="p">);</span>
@@ -4511,8 +4497,8 @@ hardened through use by many, many developers.</p>
4511
4497
  <p>In reality, we're probably not testing the static value of an integer
4512
4498
  against itself. Instead, we're calling functions in our source code
4513
4499
  and making assertions against return values.</p>
4514
- <div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;unity.h&quot;</span>
4515
- <a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;my_math.h&quot;</span>
4500
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"unity.h"</span>
4501
+ <a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"my_math.h"</span>
4516
4502
  <a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a>
4517
4503
  <a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="kt">void</span><span class="w"> </span><span class="nf">test_some_sums</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
4518
4504
  <a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="w"> </span><span class="n">TEST_ASSERT_EQUALS</span><span class="p">(</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">mySum</span><span class="p">(</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">)</span><span class="w"> </span><span class="p">);</span>
@@ -4544,7 +4530,7 @@ cases and tally up all the results.</p>
4544
4530
  <a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a>-------------------
4545
4531
  <a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a>[test/TestModel.c]
4546
4532
  <a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a> Test: testInitShouldCallSchedulerAndTemperatureFilterInit
4547
- <a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a> At line (21): &quot;Function TaskScheduler_Init() called more times than expected.&quot;
4533
+ <a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a> At line (21): "Function TaskScheduler_Init() called more times than expected."
4548
4534
  <a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a>
4549
4535
  <a id="__codelineno-4-8" name="__codelineno-4-8" href="#__codelineno-4-8"></a>--------------------
4550
4536
  <a id="__codelineno-4-9" name="__codelineno-4-9" href="#__codelineno-4-9"></a>OVERALL TEST SUMMARY
@@ -4574,7 +4560,7 @@ all of this can be managed and checked.</p>
4574
4560
  to rely on something else to do it for you. Ceedling uses the <a href="http://github.com/ThrowTheSwitch/CMock">CMock</a>
4575
4561
  framework to perform mocking for you.</p>
4576
4562
  <p>Here's some sample code you might want to test:</p>
4577
- <div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;other_code.h&quot;</span>
4563
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"other_code.h"</span>
4578
4564
  <a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a>
4579
4565
  <a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a><span class="kt">void</span><span class="w"> </span><span class="nf">doTheThingYo</span><span class="p">(</span><span class="kt">mode_t</span><span class="w"> </span><span class="n">input</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
4580
4566
  <a id="__codelineno-5-4" name="__codelineno-5-4" href="#__codelineno-5-4"></a><span class="w"> </span><span class="kt">mode_t</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">processMode</span><span class="p">(</span><span class="n">input</span><span class="p">);</span>
@@ -4588,7 +4574,7 @@ framework to perform mocking for you.</p>
4588
4574
  </code></pre></div>
4589
4575
  <p>And, here's what test cases using mocks for that code could look
4590
4576
  like:</p>
4591
- <div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;mock_other_code.h&quot;</span>
4577
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"mock_other_code.h"</span>
4592
4578
  <a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a>
4593
4579
  <a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a><span class="kt">void</span><span class="w"> </span><span class="nf">test_doTheThingYo_should_enableOutputF</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
4594
4580
  <a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a><span class="w"> </span><span class="c1">// Mocks</span>
@@ -4690,10 +4676,10 @@ and details on how everything fits together.</p>
4690
4676
 
4691
4677
 
4692
4678
 
4693
- <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
4679
+ <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
4694
4680
 
4695
4681
 
4696
- <script src="../assets/javascripts/bundle.d7400e89.min.js"></script>
4682
+ <script src="../assets/javascripts/bundle.c21346df.min.js"></script>
4697
4683
 
4698
4684
 
4699
4685
  </body>
@@ -21,7 +21,7 @@
21
21
 
22
22
 
23
23
  <link rel="icon" href="../assets/images/favicon.png">
24
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
24
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.0">
25
25
 
26
26
 
27
27
 
@@ -29,10 +29,10 @@
29
29
 
30
30
 
31
31
 
32
- <link rel="stylesheet" href="../assets/stylesheets/main.ec1eaa64.min.css">
32
+ <link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
33
33
 
34
34
 
35
- <link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
35
+ <link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
36
36
 
37
37
 
38
38
 
@@ -89,30 +89,16 @@
89
89
  </div>
90
90
  <div data-md-component="announce">
91
91
 
92
- <aside class="md-banner">
93
- <div class="md-banner__inner md-grid md-typeset">
94
-
95
-
96
-
97
-
98
- </div>
99
-
100
- </aside>
101
-
102
92
  </div>
103
93
 
104
94
  <div data-md-color-scheme="default" data-md-component="outdated" hidden>
105
95
 
106
96
  <aside class="md-banner md-banner--warning">
107
97
  <div class="md-banner__inner md-grid md-typeset">
108
-
109
-
110
- You are not viewing the latest version.
98
+ You are not viewing the latest version.
111
99
  <a href="../..">
112
100
  <strong>Click here to go to latest.</strong>
113
101
  </a>
114
-
115
-
116
102
  </div>
117
103
  <script>var el=document.querySelector("[data-md-component=outdated]"),base=new URL(".."),outdated=__md_get("__outdated",sessionStorage,base);!0===outdated&&el&&(el.hidden=!1)</script>
118
104
  </aside>
@@ -4402,13 +4388,13 @@ test assertions, mocks, partials, release builds, mixins, and system &amp; embed
4402
4388
  programming.</p>
4403
4389
  </div>
4404
4390
  <div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="c1">// test_foo.c -----------------------------------------------</span>
4405
- <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;unity.h&quot;</span><span class="c1"> // Compile/link in Unity test framework</span>
4406
- <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;types.h&quot;</span><span class="c1"> // Header file with no *.c file -- no compilation/linking</span>
4407
- <a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;foo.h&quot;</span><span class="c1"> // Corresponding source file, foo.c, under test will be compiled and linked</span>
4408
- <a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;mock_bar.h&quot;</span><span class="c1"> // bar.h will be found and mocked as mock_bar.c + compiled/linked in;</span>
4409
- <a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;mock_baz.h&quot;</span><span class="c1"> // baz.h will be found and mocked as mock_baz.c + compiled/linked in</span>
4391
+ <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"unity.h"</span><span class="w"> </span><span class="c1">// Compile/link in Unity test framework</span>
4392
+ <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"types.h"</span><span class="w"> </span><span class="c1">// Header file with no *.c file -- no compilation/linking</span>
4393
+ <a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"foo.h"</span><span class="w"> </span><span class="c1">// Corresponding source file, foo.c, under test will be compiled and linked</span>
4394
+ <a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"mock_bar.h"</span><span class="w"> </span><span class="c1">// bar.h will be found and mocked as mock_bar.c + compiled/linked in;</span>
4395
+ <a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">"mock_baz.h"</span><span class="w"> </span><span class="c1">// baz.h will be found and mocked as mock_baz.c + compiled/linked in</span>
4410
4396
  <a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a>
4411
- <a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="n">TEST_SOURCE_FILE</span><span class="p">(</span><span class="s">&quot;more.c&quot;</span><span class="p">)</span><span class="w"> </span><span class="c1">// foo.c depends on symbols from more.c, but more.c has no matching more.h</span>
4397
+ <a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="n">TEST_SOURCE_FILE</span><span class="p">(</span><span class="s">"more.c"</span><span class="p">)</span><span class="w"> </span><span class="c1">// foo.c depends on symbols from more.c, but more.c has no matching more.h</span>
4412
4398
  <a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a>
4413
4399
  <a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a><span class="kt">void</span><span class="w"> </span><span class="n">setUp</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="c1">// Every test file requires this function;</span>
4414
4400
  <a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a><span class="w"> </span><span class="c1">// setUp() is called by the generated runner before each test case function</span>
@@ -4519,10 +4505,10 @@ to be reported to the developer at the command line.</p>
4519
4505
 
4520
4506
 
4521
4507
 
4522
- <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
4508
+ <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
4523
4509
 
4524
4510
 
4525
- <script src="../assets/javascripts/bundle.d7400e89.min.js"></script>
4511
+ <script src="../assets/javascripts/bundle.c21346df.min.js"></script>
4526
4512
 
4527
4513
 
4528
4514
  </body>
@@ -21,7 +21,7 @@
21
21
 
22
22
 
23
23
  <link rel="icon" href="../assets/images/favicon.png">
24
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
24
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.8.0">
25
25
 
26
26
 
27
27
 
@@ -29,10 +29,10 @@
29
29
 
30
30
 
31
31
 
32
- <link rel="stylesheet" href="../assets/stylesheets/main.ec1eaa64.min.css">
32
+ <link rel="stylesheet" href="../assets/stylesheets/main.57a0d79d.min.css">
33
33
 
34
34
 
35
- <link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
35
+ <link rel="stylesheet" href="../assets/stylesheets/palette.fb2fffe2.min.css">
36
36
 
37
37
 
38
38
 
@@ -89,30 +89,16 @@
89
89
  </div>
90
90
  <div data-md-component="announce">
91
91
 
92
- <aside class="md-banner">
93
- <div class="md-banner__inner md-grid md-typeset">
94
-
95
-
96
-
97
-
98
- </div>
99
-
100
- </aside>
101
-
102
92
  </div>
103
93
 
104
94
  <div data-md-color-scheme="default" data-md-component="outdated" hidden>
105
95
 
106
96
  <aside class="md-banner md-banner--warning">
107
97
  <div class="md-banner__inner md-grid md-typeset">
108
-
109
-
110
- You are not viewing the latest version.
98
+ You are not viewing the latest version.
111
99
  <a href="../..">
112
100
  <strong>Click here to go to latest.</strong>
113
101
  </a>
114
-
115
-
116
102
  </div>
117
103
  <script>var el=document.querySelector("[data-md-component=outdated]"),base=new URL(".."),outdated=__md_get("__outdated",sessionStorage,base);!0===outdated&&el&&(el.hidden=!1)</script>
118
104
  </aside>
@@ -4503,10 +4489,10 @@ executables and tallying all the test results.</p>
4503
4489
 
4504
4490
 
4505
4491
 
4506
- <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
4492
+ <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.tabs", "navigation.sections", "navigation.top", "navigation.indexes", "navigation.path", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "latest", "provider": "mike"}}</script>
4507
4493
 
4508
4494
 
4509
- <script src="../assets/javascripts/bundle.d7400e89.min.js"></script>
4495
+ <script src="../assets/javascripts/bundle.c21346df.min.js"></script>
4510
4496
 
4511
4497
 
4512
4498
  </body>
@@ -35,6 +35,16 @@ describe 'Configurator pipeline (integration)' do
35
35
  end
36
36
  end
37
37
 
38
+ # A command that only reads the project, such as files:test, leaves build/vendor alone (GH #1361)
39
+ it 'vendors nothing for a command that builds nothing' do
40
+ in_temp_project( minimal_project_files ) do
41
+ configure( minimal_project_yaml, test_build: false )
42
+
43
+ expect(File.exist?( 'build/vendor/unity/src/unity.c' )).to be false
44
+ expect(File.exist?( 'build/vendor/cmock/src/cmock.c' )).to be false
45
+ end
46
+ end
47
+
38
48
  it 'adds and removes files through :files' do
39
49
  files = minimal_project_files.merge( 'extra/adder_extra.c' => "\n", 'src/generated.c' => "\n" )
40
50
 
@@ -7,6 +7,7 @@
7
7
 
8
8
  require 'spec_helper'
9
9
  require 'dependency_tracker_integration_helper'
10
+ require 'ceedling/test_invoker/test_build_executor'
10
11
 
11
12
  # Integration-level coverage of DependencyTracker's core query API -- register,
12
13
  # stale?, mark_fresh, invalidate, flush -- against a real FileWrapper, real
@@ -241,4 +242,43 @@ describe 'DependencyTracker core tracking (integration)' do
241
242
  end
242
243
  end
243
244
 
245
+ # A delta build skips running an unchanged test executable and reports its cached results.
246
+ # An executable linked with command line arguments enabled is identical with or without a
247
+ # test case filter, so the fixture's own metadata must carry the filter (GH #1360).
248
+ it 'reruns a fixture in a later run only when its test case filters changed' do
249
+ in_temp_dir do |dir|
250
+ store_path = File.join(dir, '.dep_cache.json')
251
+ executable = write_fixture( File.join(dir, 'test_foo.out'), 'executable bytes' )
252
+ target = write_fixture( File.join(dir, 'test_foo.fixture_run'), '' )
253
+
254
+ executor = TestBuildExecutor.allocate
255
+ configurator = double( 'configurator' )
256
+ executor.instance_variable_set( :@configurator, configurator )
257
+
258
+ meta_for = lambda do |include, exclude|
259
+ allow(configurator).to receive(:include_test_case).and_return( include )
260
+ allow(configurator).to receive(:exclude_test_case).and_return( exclude )
261
+ executor.fixture_meta( fixture_tool: { executable: '${1}' }, use_backtrace: :simple, backtrace_tools: [] )
262
+ end
263
+
264
+ first_run = build_dependency_tracker( store_path: store_path )
265
+ first_run.register( target, files: [executable], meta: meta_for.call( 'test_wakeup', '' ) )
266
+ first_run.mark_fresh( target )
267
+ first_run.flush
268
+
269
+ runs = {
270
+ 'the same filter' => [['test_wakeup', ''], false],
271
+ 'no filter' => [['', ''], true],
272
+ 'a different filter' => [['test_error', ''], true],
273
+ 'an exclusion added' => [['test_wakeup', 'test_error'], true]
274
+ }
275
+
276
+ runs.each do |label, ((include, exclude), stale)|
277
+ later_run = build_dependency_tracker( store_path: store_path )
278
+ later_run.register( target, files: [executable], meta: meta_for.call( include, exclude ) )
279
+ expect( later_run.stale?( target ) ).to be(stale), "expected #{label} to be #{stale ? 'stale' : 'fresh'}"
280
+ end
281
+ end
282
+ end
283
+
244
284
  end
@@ -0,0 +1,95 @@
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
+ # The task registry decides from the requested task names whether a command builds tests or a
9
+ # release, and so whether build/vendor/ is populated (GH #1361). It reads that from the real
10
+ # .rake files. The first pass runs before plugin constants are loaded, so a plugin namespace
11
+ # such as `namespace GCOV_SYM do` is resolved by its NAME_SYM naming convention. The second
12
+ # pass resolves the constants themselves. Both must agree.
13
+
14
+ require 'spec_helper'
15
+ require 'ceedling/constants'
16
+ require 'ceedling/rake_app/rake_task_registry'
17
+
18
+ describe 'RakeTaskRegistry against the real rakefiles (integration)' do
19
+ REGISTRY_SPEC_ROOT = File.expand_path( '../..', __dir__ )
20
+
21
+ REGISTRY_SPEC_RAKEFILES = Dir.glob( File.join( REGISTRY_SPEC_ROOT, 'lib/ceedling/rakefiles/**/*.rake' ) ) +
22
+ %w[gcov valgrind sanitize bullseye].map { |plugin| File.join( REGISTRY_SPEC_ROOT, "plugins/#{plugin}/#{plugin}.rake" ) }
23
+
24
+ REGISTRY_SPEC_PLUGIN_CONSTANTS = {
25
+ 'GCOV_SYM' => :gcov,
26
+ 'VALGRIND_SYM' => :valgrind,
27
+ 'SANITIZE_SYM' => :sanitize,
28
+ 'BULLSEYE_SYM' => :bullseye
29
+ }.freeze
30
+
31
+ REGISTRY_SPEC_TEST_BUILDS = %w[
32
+ test test:all test:test_foo.c test:unit/test_foo.c
33
+ gen:mocks:test_foo.c
34
+ gcov:all gcov:test_foo.c gcov:test/test_foo.c
35
+ valgrind:all valgrind:test/test_foo.c
36
+ sanitize:all sanitize:test/test_foo.c
37
+ bullseye:all bullseye:test/test_foo.c
38
+ ].freeze
39
+
40
+ REGISTRY_SPEC_NOT_BUILDS = %w[files:test dumpconfig clobber clean utils:gcov report:gcov module:create].freeze
41
+
42
+ def registry
43
+ registry = RakeTaskRegistry.new
44
+ registry.register_test_tasks( REGISTRY_SPEC_RAKEFILES )
45
+ registry.register_release_tasks( REGISTRY_SPEC_RAKEFILES )
46
+ return registry
47
+ end
48
+
49
+ def expect_classified(registry)
50
+ REGISTRY_SPEC_TEST_BUILDS.each do |task|
51
+ expect( registry.task_is?( task, RakeTaskRegistry::TAG_TEST ) ).to be(true), "#{task} should be a test build"
52
+ expect( registry.task_is?( task, RakeTaskRegistry::TAG_BUILD ) ).to be(true), "#{task} should be a build"
53
+ end
54
+
55
+ expect( registry.task_is?( 'release', RakeTaskRegistry::TAG_RELEASE ) ).to be(true)
56
+ expect( registry.task_is?( 'release', RakeTaskRegistry::TAG_TEST ) ).to be(false)
57
+
58
+ REGISTRY_SPEC_NOT_BUILDS.each do |task|
59
+ expect( registry.task_is?( task, RakeTaskRegistry::TAG_BUILD ) ).to be(false), "#{task} should not be a build"
60
+ end
61
+ end
62
+
63
+ it 'finds every test-building plugin namespace before plugin constants are loaded' do
64
+ REGISTRY_SPEC_PLUGIN_CONSTANTS.each_key { |name| hide_const( name ) }
65
+ expect_classified( registry )
66
+ end
67
+
68
+ # A build reached through a call the registry can't place would leave build/vendor
69
+ # unpopulated. Each call sits in a namespace, or in a top-level task (`task RELEASE_SYM`)
70
+ # named for a namespace the registry knows.
71
+ it 'places every test and release pipeline call where the registry finds it' do
72
+ registered = registry
73
+ markers = [RakeTaskRegistry::MARKER_TEST_TASKS_SETUP_AND_INVOKE, RakeTaskRegistry::MARKER_RELEASE_TASKS]
74
+
75
+ REGISTRY_SPEC_RAKEFILES.each do |rakefile|
76
+ lines = File.readlines( rakefile, encoding: 'bom|utf-8' )
77
+ lines.each_with_index do |line, index|
78
+ next unless markers.any? { |marker| line.match?( marker ) }
79
+
80
+ namespace = registered.send( :find_enclosing_namespace, lines, index )
81
+ task_line = lines[0...index].reverse.find { |prior| prior.match?( /\Atask\s/ ) }
82
+ task_name = task_line && task_line[/\Atask\s*\(?\s*:?([A-Za-z_]+)/, 1]
83
+ task_name = Object.const_get( task_name ).to_s if task_name&.match?( /\A[A-Z_]+\z/ )
84
+ found = !namespace.nil? || !registered.tags_for( task_name.to_s ).empty?
85
+
86
+ expect( found ).to be(true), "#{File.basename( rakefile )}:#{index + 1} runs a pipeline the registry cannot place"
87
+ end
88
+ end
89
+ end
90
+
91
+ it 'finds every test-building plugin namespace once plugin constants are loaded' do
92
+ REGISTRY_SPEC_PLUGIN_CONSTANTS.each { |name, value| stub_const( name, value ) }
93
+ expect_classified( registry )
94
+ end
95
+ end