ceedling 0.28.2 → 0.28.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.
- checksums.yaml +4 -4
- data/assets/ceedling +3 -0
- data/assets/ceedling.cmd +1 -0
- data/assets/default_gitignore +5 -0
- data/assets/project_with_guts.yml +1 -0
- data/assets/project_with_guts_gcov.yml +3 -0
- data/assets/test_example_file_verbose.c +12 -0
- data/bin/ceedling +30 -6
- data/docs/CeedlingPacket.md +135 -23
- data/docs/CeedlingPacket.odt +0 -0
- data/examples/blinky/rakefile.rb +2 -1
- data/lib/ceedling/configurator.rb +7 -5
- data/lib/ceedling/configurator_builder.rb +10 -7
- data/lib/ceedling/configurator_plugins.rb +29 -24
- data/lib/ceedling/configurator_setup.rb +0 -1
- data/lib/ceedling/defaults.rb +7 -2
- data/lib/ceedling/dependinator.rb +10 -2
- data/lib/ceedling/file_finder.rb +57 -49
- data/lib/ceedling/file_path_utils.rb +12 -4
- data/lib/ceedling/file_wrapper.rb +4 -0
- data/lib/ceedling/generator.rb +4 -3
- data/lib/ceedling/generator_test_results.rb +15 -13
- data/lib/ceedling/plugin_manager.rb +18 -18
- data/lib/ceedling/plugin_reportinator.rb +3 -2
- data/lib/ceedling/plugin_reportinator_helper.rb +2 -3
- data/lib/ceedling/preprocessinator_extractor.rb +2 -2
- data/lib/ceedling/preprocessinator_includes_handler.rb +5 -0
- data/lib/ceedling/rakefile.rb +1 -0
- data/lib/ceedling/release_invoker_helper.rb +5 -2
- data/lib/ceedling/rules_release.rake +2 -1
- data/lib/ceedling/rules_tests.rake +18 -9
- data/lib/ceedling/rules_tests_deep_dependencies.rake +2 -2
- data/lib/ceedling/task_invoker.rb +15 -3
- data/lib/ceedling/tasks_vendor.rake +3 -3
- data/lib/ceedling/test_invoker.rb +39 -12
- data/lib/ceedling/test_invoker_helper.rb +5 -1
- data/lib/ceedling/tool_executor.rb +8 -4
- data/lib/ceedling/version.rb +1 -1
- data/out.fail +21 -0
- data/plugins/beep/README.md +22 -0
- data/plugins/beep/lib/beep.rb +40 -0
- data/plugins/bullseye/bullseye.rake +43 -36
- data/plugins/bullseye/config/defaults.yml +4 -0
- data/plugins/bullseye/lib/bullseye.rb +27 -5
- data/plugins/command_hooks/lib/command_hooks.rb +3 -0
- data/plugins/gcov/README.md +34 -1
- data/plugins/gcov/config/defaults.yml +3 -3
- data/plugins/gcov/gcov.rake +7 -5
- data/plugins/gcov/lib/gcov.rb +3 -1
- data/plugins/gcov/lib/gcov_constants.rb +2 -0
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +12 -9
- data/plugins/module_generator/lib/module_generator.rb +14 -1
- data/plugins/module_generator/module_generator.rake +21 -4
- data/plugins/raw_output_report/lib/raw_output_report.rb +41 -0
- data/spec/gcov/gcov_deployment_spec.rb +1 -1
- data/spec/gcov/gcov_test_cases_spec.rb +2 -2
- data/spec/generator_test_results_spec.rb +5 -0
- data/spec/preprocessinator_includes_handler_spec.rb +1 -0
- data/spec/spec_system_helper.rb +178 -4
- data/spec/support/test_example.fail +1 -0
- data/spec/support/test_example.pass +1 -0
- data/spec/support/test_example_empty.pass +1 -0
- data/spec/support/test_example_ignore.pass +1 -0
- data/spec/support/test_example_mangled.pass +1 -0
- data/spec/support/test_example_with_time.pass +22 -0
- data/spec/system/deployment_spec.rb +33 -0
- data/vendor/cmock/README.md +4 -3
- data/vendor/cmock/docs/CMock_Summary.md +1 -1
- data/vendor/cmock/lib/cmock_config.rb +4 -0
- data/vendor/cmock/lib/cmock_generator.rb +5 -2
- data/vendor/cmock/lib/cmock_generator_plugin_array.rb +4 -4
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +9 -11
- data/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +0 -1
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +2 -3
- data/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +2 -4
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +0 -2
- data/vendor/cmock/lib/cmock_generator_utils.rb +16 -3
- data/vendor/cmock/lib/cmock_header_parser.rb +59 -34
- data/vendor/cmock/release/build.info +1 -1
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/scripts/create_makefile.rb +17 -2
- data/vendor/cmock/src/cmock.c +13 -7
- data/vendor/cmock/test/test_helper.rb +11 -10
- data/vendor/cmock/test/unit/cmock_config_test.rb +4 -2
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +10 -4
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +20 -12
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +2 -2
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +2 -2
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +3 -3
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +8 -6
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +27 -10
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +108 -20
- data/vendor/cmock/vendor/c_exception/Gemfile +4 -0
- data/vendor/cmock/vendor/c_exception/Gemfile.lock +12 -0
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -0
- data/vendor/cmock/vendor/c_exception/README.md +162 -0
- data/vendor/cmock/vendor/c_exception/Rakefile +42 -0
- data/vendor/cmock/vendor/c_exception/docs/CException.md +292 -0
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -0
- data/vendor/cmock/vendor/c_exception/lib/CException.h +110 -0
- data/vendor/cmock/vendor/c_exception/makefile +24 -0
- data/vendor/cmock/vendor/c_exception/release/build.info +2 -0
- data/vendor/cmock/vendor/c_exception/release/version.info +2 -0
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -0
- data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -0
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +67 -0
- data/vendor/cmock/vendor/unity/README.md +231 -0
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +118 -0
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +308 -0
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +457 -0
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +323 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +252 -0
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +25 -0
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +6 -0
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +139 -0
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +136 -0
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +779 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +433 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +192 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +260 -0
- data/vendor/cmock/vendor/unity/docs/license.txt +21 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +71 -0
- data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +5 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +70 -0
- data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -0
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -0
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +43 -0
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +249 -0
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +13 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +46 -0
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -0
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -0
- data/vendor/cmock/vendor/unity/examples/unity_config.h +247 -0
- data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +48 -0
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
- data/vendor/cmock/vendor/unity/extras/fixture/readme.txt +9 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +436 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +83 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +75 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +22 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
- data/vendor/cmock/vendor/unity/release/build.info +2 -0
- data/vendor/cmock/vendor/unity/release/version.info +2 -0
- data/vendor/cmock/vendor/unity/src/unity.c +1572 -0
- data/vendor/cmock/vendor/unity/src/unity.h +503 -0
- data/vendor/cmock/vendor/unity/src/unity_internals.h +924 -0
- data/vendor/cmock/vendor/unity/test/Makefile +68 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +57 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +67 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +70 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +58 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +67 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +70 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
- data/vendor/cmock/vendor/unity/test/rakefile +125 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +260 -0
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +78 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +78 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +47 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +47 -0
- data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +101 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +90 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +80 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +95 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -0
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +186 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +195 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -0
- data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +113 -0
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +5371 -0
- data/vendor/unity/auto/generate_test_runner.rb +30 -10
- data/vendor/unity/auto/parse_output.rb +212 -109
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +9 -10
- data/vendor/unity/docs/UnityAssertionsReference.md +11 -2
- data/vendor/unity/docs/UnityConfigurationGuide.md +90 -55
- data/vendor/unity/docs/UnityGettingStartedGuide.md +6 -5
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +23 -5
- data/vendor/unity/examples/unity_config.h +8 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +4 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +2 -2
- data/vendor/unity/release/build.info +1 -1
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +64 -57
- data/vendor/unity/src/unity.h +111 -7
- data/vendor/unity/src/unity_internals.h +173 -73
- data/vendor/unity/test/Makefile +5 -1
- data/vendor/unity/test/testdata/testRunnerGenerator.c +4 -1
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +4 -1
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +4 -1
- data/vendor/unity/test/tests/testparameterized.c +5 -2
- data/vendor/unity/test/tests/testunity.c +34 -0
- metadata +150 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a42e9eac6e308f7c966953c1c2d3dc9f1ccfc9bb
|
|
4
|
+
data.tar.gz: bc07f7ab10c38c3f3ddc106e87610d2cb504f263
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1af9dc3072c77add2e69897021dfadb222b7568315c23777233afd1b27cf4fe0dc1bd1b865762676244a79ce785774468d7bf7a18c70e60b47c5d685db9bc2c8
|
|
7
|
+
data.tar.gz: 10c3c3203587c59f3c93fad88b53f3608c0a52f41d81753c2982167b8c4804524a5f6ac773db311bb3d0eb6c34431b3732fa4551d16eec608ef561343815134e
|
data/assets/ceedling
ADDED
data/assets/ceedling.cmd
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby vendor\ceedling\bin\ceedling %*
|
data/bin/ceedling
CHANGED
|
@@ -12,6 +12,11 @@ if (!project_found)
|
|
|
12
12
|
project_found = File.exists?(main_filepath)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
def is_windows?
|
|
16
|
+
return ((RbConfig::CONFIG['host_os'] =~ /mswin|mingw/) ? true : false) if defined?(RbConfig)
|
|
17
|
+
return ((Config::CONFIG['host_os'] =~ /mswin|mingw/) ? true : false)
|
|
18
|
+
end
|
|
19
|
+
|
|
15
20
|
unless (project_found)
|
|
16
21
|
#===================================== We Do Not Have A Project ================================================
|
|
17
22
|
|
|
@@ -29,6 +34,9 @@ unless (project_found)
|
|
|
29
34
|
method_option :no_docs, :type => :boolean, :default => false, :desc => "No docs in vendor directory"
|
|
30
35
|
method_option :nodocs, :type => :boolean, :default => false
|
|
31
36
|
method_option :as_gem, :type => :boolean, :default => false, :desc => "Create the scaffold using Ceedling as a gem instead of filling in the vendor directory. Implies --no-docs."
|
|
37
|
+
method_option :asgem, :type => :boolean, :default => false
|
|
38
|
+
method_option :with_ignore, :type => :boolean, :default => false, :desc => "Create a gitignore file for ignoring ceedling generated files."
|
|
39
|
+
method_option :withignore, :type => :boolean, :default => false
|
|
32
40
|
method_option :no_configs, :type => :boolean, :default => false, :desc => "Don't install starter configuration files."
|
|
33
41
|
method_option :noconfigs, :type => :boolean, :default => false
|
|
34
42
|
def new(name, silent = false)
|
|
@@ -47,17 +55,17 @@ unless (project_found)
|
|
|
47
55
|
no_commands do
|
|
48
56
|
def copy_assets_and_create_structure(name, silent=false, force=false, options = {})
|
|
49
57
|
|
|
50
|
-
no_docs
|
|
51
|
-
no_configs
|
|
52
|
-
as_gem
|
|
58
|
+
no_docs = options[:no_docs] || options[:nodocs] || false
|
|
59
|
+
no_configs = options[:no_configs] || options[:noconfigs] || false
|
|
60
|
+
as_gem = options[:as_gem] || options[:asgem] || false
|
|
61
|
+
with_ignore = options[:with_ignore] || options[:withignore] || false
|
|
53
62
|
|
|
54
63
|
ceedling_path = File.join(name, 'vendor', 'ceedling')
|
|
55
64
|
source_path = File.join(name, 'src')
|
|
56
65
|
test_path = File.join(name, 'test')
|
|
57
66
|
test_support_path = File.join(name, 'test/support')
|
|
58
|
-
build_path = File.join(name, 'build')
|
|
59
67
|
|
|
60
|
-
[source_path, test_path, test_support_path
|
|
68
|
+
[source_path, test_path, test_support_path].each do |d|
|
|
61
69
|
FileUtils.mkdir_p d
|
|
62
70
|
end
|
|
63
71
|
|
|
@@ -87,13 +95,20 @@ unless (project_found)
|
|
|
87
95
|
end
|
|
88
96
|
end
|
|
89
97
|
|
|
90
|
-
folders =
|
|
98
|
+
folders = if as_gem
|
|
99
|
+
%w{plugins lib}
|
|
100
|
+
else
|
|
101
|
+
%w{plugins lib bin}
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
#copy full folders from ceedling gem into project
|
|
91
105
|
folders.map do |f|
|
|
92
106
|
{:src => f, :dst => File.join(ceedling_path, f)}
|
|
93
107
|
end.each do |f|
|
|
94
108
|
directory(f[:src], f[:dst], :force => force)
|
|
95
109
|
end
|
|
96
110
|
|
|
111
|
+
#copy necessary subcomponents from ceedling gem into project
|
|
97
112
|
sub_components = [
|
|
98
113
|
{:src => 'vendor/c_exception/lib/', :dst => 'vendor/c_exception/lib'},
|
|
99
114
|
{:src => 'vendor/c_exception/release/', :dst => 'vendor/c_exception/release'},
|
|
@@ -118,9 +133,18 @@ unless (project_found)
|
|
|
118
133
|
copy_file(File.join('assets', 'project_as_gem.yml'), File.join(name, 'project.yml'), :force => force)
|
|
119
134
|
else
|
|
120
135
|
copy_file(File.join('assets', 'project_with_guts.yml'), File.join(name, 'project.yml'), :force => force)
|
|
136
|
+
if is_windows?
|
|
137
|
+
copy_file(File.join('assets', 'ceedling.cmd'), File.join(name, 'ceedling.cmd'), :force => force)
|
|
138
|
+
else
|
|
139
|
+
copy_file(File.join('assets', 'ceedling'), File.join(name, 'ceedling'), :force => force)
|
|
140
|
+
end
|
|
121
141
|
end
|
|
122
142
|
end
|
|
123
143
|
|
|
144
|
+
if (with_ignore)
|
|
145
|
+
copy_file(File.join('assets', 'default_gitignore'), File.join(name, '.gitignore'), :force => force)
|
|
146
|
+
end
|
|
147
|
+
|
|
124
148
|
unless silent
|
|
125
149
|
puts "\n"
|
|
126
150
|
puts "Project '#{name}' #{force ? "upgraded" : "created"}!"
|
data/docs/CeedlingPacket.md
CHANGED
|
@@ -202,6 +202,11 @@ General notes:
|
|
|
202
202
|
and Rakefiles, consult the [Rake tutorial, examples, and
|
|
203
203
|
user guide](http://rubyrake.org/).
|
|
204
204
|
|
|
205
|
+
4. When using Ceedling in Windows environments, a test file name may
|
|
206
|
+
not include the sequences “patch” or “setup”. The Windows Installer
|
|
207
|
+
Detection Technology (part of UAC), requires administrator
|
|
208
|
+
privileges to execute file names with these strings.
|
|
209
|
+
|
|
205
210
|
|
|
206
211
|
|
|
207
212
|
Now What? How Do I Make It GO?
|
|
@@ -323,6 +328,7 @@ Ceedling (more on this later).
|
|
|
323
328
|
ceedling release:assemble:foo.s
|
|
324
329
|
|
|
325
330
|
* `ceedling module:create[Filename]`:
|
|
331
|
+
* `ceedling module:create[<Path:>Filename]`:
|
|
326
332
|
|
|
327
333
|
It's often helpful to create a file automatically. What's better than
|
|
328
334
|
that? Creating a source file, a header file, and a corresponding test
|
|
@@ -331,6 +337,10 @@ Ceedling (more on this later).
|
|
|
331
337
|
There are also patterns which can be specified to automatically generate
|
|
332
338
|
a bunch of files. Try `ceedling module:create[Poodles,mch]` for example!
|
|
333
339
|
|
|
340
|
+
The module generator has several options you can configure.
|
|
341
|
+
F.e. Generating the source/header/test file in a subdirectory (by adding <Path> when calling module:create).
|
|
342
|
+
For more info, refer to the [Module Generator](https://github.com/ThrowTheSwitch/Ceedling/blob/master/docs/CeedlingPacket.md#module-generator) section.
|
|
343
|
+
|
|
334
344
|
* `ceedling logging <tasks...>`:
|
|
335
345
|
|
|
336
346
|
Enable logging to <build path>/logs. Must come before test and release
|
|
@@ -797,6 +807,17 @@ project: global project settings
|
|
|
797
807
|
|
|
798
808
|
**Default**: FALSE
|
|
799
809
|
|
|
810
|
+
* `generate_deep_dependencies`:
|
|
811
|
+
|
|
812
|
+
When `use_deep_dependencies` is set to TRUE, Ceedling will run a separate
|
|
813
|
+
build step to generate the deep dependencies. If you are using gcc as your
|
|
814
|
+
primary compiler, or another compiler that can generate makefile rules as
|
|
815
|
+
a side effect of compilation, then you can set this to FALSE to avoid the
|
|
816
|
+
extra build step but still use the deep dependencies data when deciding
|
|
817
|
+
which source files to rebuild.
|
|
818
|
+
|
|
819
|
+
**Default**: TRUE
|
|
820
|
+
|
|
800
821
|
* `test_file_prefix`:
|
|
801
822
|
|
|
802
823
|
Ceedling collects test files by convention from within the test file
|
|
@@ -1453,10 +1474,26 @@ by overriding the value in the Ceedling YAML configuration file.
|
|
|
1453
1474
|
List of conditional compilation symbols used to configure Unity's
|
|
1454
1475
|
features in its source and header files. See Unity documentation to
|
|
1455
1476
|
understand available options. No symbols must be set unless the
|
|
1456
|
-
defaults are inappropriate for your specific environment.
|
|
1477
|
+
defaults are inappropriate for your specific environment. Most Unity
|
|
1478
|
+
defines can be easily configured through the YAML file.
|
|
1457
1479
|
|
|
1458
1480
|
**Default**: [] (empty)
|
|
1459
1481
|
|
|
1482
|
+
Example [:unity] YAML blurbs
|
|
1483
|
+
```yaml
|
|
1484
|
+
:unity: #itty bitty processor & toolchain with limited test execution options
|
|
1485
|
+
:defines:
|
|
1486
|
+
- UNITY_INT_WIDTH=16 #16 bit processor without support for 32 bit instructions
|
|
1487
|
+
- UNITY_EXCLUDE_FLOAT #no floating point unit
|
|
1488
|
+
|
|
1489
|
+
:unity: #great big gorilla processor that grunts and scratches
|
|
1490
|
+
:defines:
|
|
1491
|
+
- UNITY_SUPPORT_64 #big memory, big counters, big registers
|
|
1492
|
+
- UNITY_LINE_TYPE=\"unsigned int\" #apparently we're using really long test files,
|
|
1493
|
+
- UNITY_COUNTER_TYPE=\"unsigned int\" #and we've got a ton of test cases in those test files
|
|
1494
|
+
- UNITY_FLOAT_TYPE=\"double\" #you betcha
|
|
1495
|
+
```
|
|
1496
|
+
|
|
1460
1497
|
|
|
1461
1498
|
Notes on Unity configuration:
|
|
1462
1499
|
|
|
@@ -1476,29 +1513,34 @@ Notes on Unity configuration:
|
|
|
1476
1513
|
routine that transmits a character via RS232 or USB. Once you have
|
|
1477
1514
|
that routine, you can replace `putchar()` calls in Unity by overriding
|
|
1478
1515
|
the function-like macro `UNITY_OUTPUT_CHAR`. Consult your toolchain
|
|
1479
|
-
and shell documentation.
|
|
1480
|
-
|
|
1516
|
+
and shell documentation. Eventhough this can also be defined in the YAML file
|
|
1517
|
+
most shell environments do not handle parentheses as command line arguments
|
|
1518
|
+
very well. To still be able to add this functionality all necessary
|
|
1519
|
+
options can be defined in the `unity_config.h`. Unity needs to be told to look for
|
|
1520
|
+
the `unity_config.h` in the YAML file, though.
|
|
1481
1521
|
|
|
1482
1522
|
Example [:unity] YAML blurbs
|
|
1483
|
-
|
|
1484
1523
|
```yaml
|
|
1485
|
-
:unity:
|
|
1524
|
+
:unity:
|
|
1486
1525
|
:defines:
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
#let's say environment & tools provide no way to run tests on desktop so we gotta go on target
|
|
1490
|
-
#replace putchar() with write_usart() via command line specified macro (gcc style)
|
|
1491
|
-
#note escaped quotes for our hypothetical shell that doesn't like parens in arguments
|
|
1492
|
-
#transformed into -D"UNITY_OUTPUT_CHAR(a)=write_usart(a)" at command line by [:tools] entry
|
|
1493
|
-
- "\"UNITY_OUTPUT_CHAR(a)=write_usart(a)\""
|
|
1526
|
+
- UNITY_INCLUDE_CONFIG_H
|
|
1527
|
+
```
|
|
1494
1528
|
|
|
1495
|
-
|
|
1496
|
-
:defines:
|
|
1497
|
-
- UNITY_SUPPORT_64 #big memory, big counters, big registers
|
|
1498
|
-
- UNITY_LINE_TYPE=\"unsigned int\" #apparently we're using really long test files,
|
|
1499
|
-
- UNITY_COUNTER_TYPE=\"unsigned int\" #and we've got a ton of test cases in those test files
|
|
1500
|
-
- UNITY_FLOAT_TYPE=\"double\" #you betcha
|
|
1529
|
+
Example unity_config.h
|
|
1501
1530
|
```
|
|
1531
|
+
#ifndef UNITY_CONFIG_H
|
|
1532
|
+
#define UNITY_CONFIG_H
|
|
1533
|
+
|
|
1534
|
+
#include "uart_output.h" //Helper library for your custom environment
|
|
1535
|
+
|
|
1536
|
+
#define UNITY_INT_WIDTH 16
|
|
1537
|
+
#define UNITY_OUTPUT_START() uart_init(F_CPU, BAUD) //Helperfunction to init UART
|
|
1538
|
+
#define UNITY_OUTPUT_CHAR(a) uart_putchar(a) //Helperfunction to forward char via UART
|
|
1539
|
+
#define UNITY_OUTPUT_COMPLETE() uart_complete() //Helperfunction to inform that test has ended
|
|
1540
|
+
|
|
1541
|
+
#endif
|
|
1542
|
+
```
|
|
1543
|
+
|
|
1502
1544
|
|
|
1503
1545
|
**tools**: a means for representing command line tools for use under
|
|
1504
1546
|
Ceedling's automation framework
|
|
@@ -1513,14 +1555,14 @@ tools.
|
|
|
1513
1555
|
* `test_compiler`:
|
|
1514
1556
|
|
|
1515
1557
|
Compiler for test & source-under-test code
|
|
1516
|
-
${1}: input source ${2}: output object ${3}: optional output list ${4}: optional
|
|
1558
|
+
${1}: input source ${2}: output object ${3}: optional output list ${4}: optional output dependencies file
|
|
1517
1559
|
|
|
1518
1560
|
**Default**: gcc
|
|
1519
1561
|
|
|
1520
1562
|
* `test_linker`:
|
|
1521
1563
|
|
|
1522
1564
|
Linker to generate test fixture executables
|
|
1523
|
-
${1}: input objects ${2}: output binary ${3}: optional output map ${4}: optional
|
|
1565
|
+
${1}: input objects ${2}: output binary ${3}: optional output map ${4}: optional library list
|
|
1524
1566
|
|
|
1525
1567
|
**Default**: gcc
|
|
1526
1568
|
|
|
@@ -1555,7 +1597,7 @@ tools.
|
|
|
1555
1597
|
* `release_compiler`:
|
|
1556
1598
|
|
|
1557
1599
|
Compiler for release source code
|
|
1558
|
-
${1}: input source ${2}: output object ${3}: optional output list ${4}: optional
|
|
1600
|
+
${1}: input source ${2}: output object ${3}: optional output list ${4}: optional output dependencies file
|
|
1559
1601
|
|
|
1560
1602
|
**Default**: gcc
|
|
1561
1603
|
|
|
@@ -1569,7 +1611,7 @@ tools.
|
|
|
1569
1611
|
* `release_linker`:
|
|
1570
1612
|
|
|
1571
1613
|
Linker for release source code
|
|
1572
|
-
${1}: input objects ${2}: output binary ${3}: optional output map ${4}: optional
|
|
1614
|
+
${1}: input objects ${2}: output binary ${3}: optional output map ${4}: optional library list
|
|
1573
1615
|
|
|
1574
1616
|
**Default**: gcc
|
|
1575
1617
|
|
|
@@ -1911,6 +1953,77 @@ Example [:plugins] YAML blurb
|
|
|
1911
1953
|
root>/artifacts` directory (e.g. test/ for test tasks, `release/` for a
|
|
1912
1954
|
release build, or even `bullseye/` for bullseye runs).
|
|
1913
1955
|
|
|
1956
|
+
Module Generator
|
|
1957
|
+
========================
|
|
1958
|
+
Ceedling includes a plugin called module_generator that will create a source, header and test file for you.
|
|
1959
|
+
There are several possibilities to configure this plugin through your project.yml to suit your project's needs.
|
|
1960
|
+
|
|
1961
|
+
Directory Structure
|
|
1962
|
+
-------------------------------------------
|
|
1963
|
+
|
|
1964
|
+
The default configuration for directory/project structure is:
|
|
1965
|
+
```yaml
|
|
1966
|
+
:module_generator:
|
|
1967
|
+
:project_root: ./
|
|
1968
|
+
:source_root: src/
|
|
1969
|
+
:test_root: test/
|
|
1970
|
+
```
|
|
1971
|
+
You can change these variables in your project.yml file to comply with your project's directory structure.
|
|
1972
|
+
|
|
1973
|
+
If you call `ceedling module:create`, it will create three files:
|
|
1974
|
+
1. A source file in the source_root
|
|
1975
|
+
2. A header file in the source_root
|
|
1976
|
+
3. A test file in the test_root
|
|
1977
|
+
|
|
1978
|
+
If you want your header file to be in another location,
|
|
1979
|
+
you can specify the ':inc_root:" in your project.yml file:
|
|
1980
|
+
```yaml
|
|
1981
|
+
:module_generator:
|
|
1982
|
+
:inc_root: inc/
|
|
1983
|
+
```
|
|
1984
|
+
The module_generator will then create the header file in your defined ':inc_root:'.
|
|
1985
|
+
By default, ':inc_root:' is not defined so the module_generator will use the source_root.
|
|
1986
|
+
|
|
1987
|
+
Sometimes, your project can't be divided into a single src, inc, and test folder. You have several directories
|
|
1988
|
+
with sources/..., something like this for example:
|
|
1989
|
+
<project_root>
|
|
1990
|
+
- myDriver
|
|
1991
|
+
- src
|
|
1992
|
+
- inc
|
|
1993
|
+
- test
|
|
1994
|
+
- myOtherDriver
|
|
1995
|
+
- src
|
|
1996
|
+
- inc
|
|
1997
|
+
- test
|
|
1998
|
+
- ...
|
|
1999
|
+
|
|
2000
|
+
Don't worry, you don't have to manually create the source/header/test files.
|
|
2001
|
+
The module_generator can accept a path to create a source_root/inc_root/test_root folder with your files:
|
|
2002
|
+
`ceedling module:create[<module_root_path>:<module_name>]`
|
|
2003
|
+
|
|
2004
|
+
F.e., applied to the above project structure:
|
|
2005
|
+
`ceedling module:create[myOtherDriver:driver]`
|
|
2006
|
+
This will make the module_generator run in the subdirectory 'myOtherDriver' and generate the module files
|
|
2007
|
+
for you in that directory. So, this command will generate the following files:
|
|
2008
|
+
1. A source file 'driver.c' in <project_root>/myOtherDriver/<source_root>
|
|
2009
|
+
2. A header file 'driver.h' in <project_root>/myOtherDriver/<source_root> (or <inc_root> if specified)
|
|
2010
|
+
3. A test file 'test_driver.c' in <project_root>/myOtherDriver/<test_root>
|
|
2011
|
+
|
|
2012
|
+
Naming
|
|
2013
|
+
-------------------------------------------
|
|
2014
|
+
By default, the module_generator will generate your files in lowercase.
|
|
2015
|
+
`ceedling module:create[mydriver]` and `ceedling module:create[myDriver]`(note the uppercase) will generate the same files:
|
|
2016
|
+
1. mydriver.c
|
|
2017
|
+
2. mydriver.h
|
|
2018
|
+
3. test_mydriver.c
|
|
2019
|
+
|
|
2020
|
+
You can configure the module_generator to use a differect naming mechanism through the project.yml:
|
|
2021
|
+
```yaml
|
|
2022
|
+
:module_generator:
|
|
2023
|
+
:naming: "camel"
|
|
2024
|
+
```
|
|
2025
|
+
There are other possibilities as well (bumpy, camel, snake, caps).
|
|
2026
|
+
Refer to the unity module generator for more info (the unity module generator is used under the hood by module_generator).
|
|
1914
2027
|
|
|
1915
2028
|
Advanced Topics (Coming)
|
|
1916
2029
|
========================
|
|
@@ -1945,4 +2058,3 @@ Creating Custom Plugins
|
|
|
1945
2058
|
-----------------------
|
|
1946
2059
|
|
|
1947
2060
|
Oh boy. This is going to take some explaining.
|
|
1948
|
-
|
data/docs/CeedlingPacket.odt
CHANGED
|
Binary file
|
data/examples/blinky/rakefile.rb
CHANGED
|
@@ -173,12 +173,15 @@ class Configurator
|
|
|
173
173
|
FilePathUtils::standardize(path)
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
+
config[:plugins][:load_paths] << FilePathUtils::standardize(Ceedling.load_path)
|
|
177
|
+
config[:plugins][:load_paths].uniq!
|
|
178
|
+
|
|
176
179
|
paths_hash = @configurator_plugins.add_load_paths(config)
|
|
177
180
|
|
|
178
|
-
@rake_plugins = @configurator_plugins.find_rake_plugins(config)
|
|
179
|
-
@script_plugins = @configurator_plugins.find_script_plugins(config)
|
|
180
|
-
config_plugins = @configurator_plugins.find_config_plugins(config)
|
|
181
|
-
plugin_defaults = @configurator_plugins.find_plugin_defaults(config)
|
|
181
|
+
@rake_plugins = @configurator_plugins.find_rake_plugins(config, paths_hash)
|
|
182
|
+
@script_plugins = @configurator_plugins.find_script_plugins(config, paths_hash)
|
|
183
|
+
config_plugins = @configurator_plugins.find_config_plugins(config, paths_hash)
|
|
184
|
+
plugin_defaults = @configurator_plugins.find_plugin_defaults(config, paths_hash)
|
|
182
185
|
|
|
183
186
|
config_plugins.each do |plugin|
|
|
184
187
|
config.deep_merge!( @yaml_wrapper.load(plugin) )
|
|
@@ -328,7 +331,6 @@ class Configurator
|
|
|
328
331
|
|
|
329
332
|
def insert_rake_plugins(plugins)
|
|
330
333
|
plugins.each do |plugin|
|
|
331
|
-
# TODO needs a duplicate guard
|
|
332
334
|
@project_config_hash[:project_rakefile_component_files] << plugin
|
|
333
335
|
end
|
|
334
336
|
end
|
|
@@ -89,12 +89,14 @@ class ConfiguratorBuilder
|
|
|
89
89
|
[:project_build_tests_root, project_build_tests_root, true ],
|
|
90
90
|
[:project_build_release_root, project_build_release_root, in_hash[:project_release_build] ],
|
|
91
91
|
|
|
92
|
-
[:project_test_artifacts_path,
|
|
93
|
-
[:project_test_runners_path,
|
|
94
|
-
[:project_test_results_path,
|
|
95
|
-
[:project_test_build_output_path,
|
|
96
|
-
[:
|
|
97
|
-
[:
|
|
92
|
+
[:project_test_artifacts_path, File.join(project_build_artifacts_root, TESTS_BASE_PATH), true ],
|
|
93
|
+
[:project_test_runners_path, File.join(project_build_tests_root, 'runners'), true ],
|
|
94
|
+
[:project_test_results_path, File.join(project_build_tests_root, 'results'), true ],
|
|
95
|
+
[:project_test_build_output_path, File.join(project_build_tests_root, 'out'), true ],
|
|
96
|
+
[:project_test_build_output_asm_path, File.join(project_build_tests_root, 'out', 'asm'), true ],
|
|
97
|
+
[:project_test_build_output_c_path, File.join(project_build_tests_root, 'out', 'c'), true ],
|
|
98
|
+
[:project_test_build_cache_path, File.join(project_build_tests_root, 'cache'), true ],
|
|
99
|
+
[:project_test_dependencies_path, File.join(project_build_tests_root, 'dependencies'), true ],
|
|
98
100
|
|
|
99
101
|
[:project_release_artifacts_path, File.join(project_build_artifacts_root, RELEASE_BASE_PATH), in_hash[:project_release_build] ],
|
|
100
102
|
[:project_release_build_cache_path, File.join(project_build_release_root, 'cache'), in_hash[:project_release_build] ],
|
|
@@ -270,7 +272,7 @@ class ConfiguratorBuilder
|
|
|
270
272
|
def collect_assembly(in_hash)
|
|
271
273
|
all_assembly = @file_wrapper.instantiate_file_list
|
|
272
274
|
|
|
273
|
-
return {:collection_all_assembly => all_assembly} if (not in_hash[:release_build_use_assembly])
|
|
275
|
+
return {:collection_all_assembly => all_assembly} if ((not in_hash[:release_build_use_assembly]) && (not in_hash[:test_build_use_assembly]))
|
|
274
276
|
|
|
275
277
|
in_hash[:collection_paths_source].each do |path|
|
|
276
278
|
all_assembly.include( File.join(path, "*#{in_hash[:extension_assembly]}") )
|
|
@@ -361,6 +363,7 @@ class ConfiguratorBuilder
|
|
|
361
363
|
all_input.include( path )
|
|
362
364
|
else
|
|
363
365
|
all_input.include( File.join(path, "*#{in_hash[:extension_source]}") )
|
|
366
|
+
all_input.include( File.join(path, "*#{in_hash[:extension_assembly]}") ) if (defined?(TEST_BUILD_USE_ASSEMBLY) && TEST_BUILD_USE_ASSEMBLY)
|
|
364
367
|
end
|
|
365
368
|
end
|
|
366
369
|
|