ceedling 0.19.0 → 0.20.2
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/Rakefile +10 -10
- data/bin/ceedling +205 -92
- data/ceedling-0.19.0.gem +0 -0
- data/config/test_environment.rb +12 -12
- data/docs/CeedlingPacket.md +866 -853
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/examples/temp_sensor/rakefile.rb +4 -4
- data/examples/temp_sensor/src/AdcConductor.c +42 -42
- data/examples/temp_sensor/src/AdcConductor.h +13 -13
- data/examples/temp_sensor/src/AdcHardware.c +27 -27
- data/examples/temp_sensor/src/AdcHardware.h +11 -11
- data/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
- data/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
- data/examples/temp_sensor/src/AdcModel.c +33 -33
- data/examples/temp_sensor/src/AdcModel.h +13 -13
- data/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
- data/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
- data/examples/temp_sensor/src/Executor.c +25 -25
- data/examples/temp_sensor/src/Executor.h +9 -9
- data/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
- data/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
- data/examples/temp_sensor/src/Main.c +46 -46
- data/examples/temp_sensor/src/Main.h +7 -7
- data/examples/temp_sensor/src/Model.c +10 -10
- data/examples/temp_sensor/src/Model.h +8 -8
- data/examples/temp_sensor/src/ModelConfig.h +7 -7
- data/examples/temp_sensor/src/TaskScheduler.c +72 -72
- data/examples/temp_sensor/src/TaskScheduler.h +11 -11
- data/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
- data/examples/temp_sensor/src/TemperatureCalculator.h +8 -8
- data/examples/temp_sensor/src/TemperatureFilter.c +38 -38
- data/examples/temp_sensor/src/TemperatureFilter.h +10 -10
- data/examples/temp_sensor/src/TimerConductor.c +15 -15
- data/examples/temp_sensor/src/TimerConductor.h +9 -9
- data/examples/temp_sensor/src/TimerConfigurator.c +51 -51
- data/examples/temp_sensor/src/TimerConfigurator.h +15 -15
- data/examples/temp_sensor/src/TimerHardware.c +15 -15
- data/examples/temp_sensor/src/TimerHardware.h +8 -8
- data/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
- data/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
- data/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
- data/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
- data/examples/temp_sensor/src/TimerModel.c +9 -9
- data/examples/temp_sensor/src/TimerModel.h +8 -8
- data/examples/temp_sensor/src/Types.h +90 -90
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +8 -8
- data/examples/temp_sensor/src/UsartConductor.c +21 -21
- data/examples/temp_sensor/src/UsartConductor.h +7 -7
- data/examples/temp_sensor/src/UsartConfigurator.c +39 -39
- data/examples/temp_sensor/src/UsartConfigurator.h +13 -13
- data/examples/temp_sensor/src/UsartHardware.c +22 -22
- data/examples/temp_sensor/src/UsartHardware.h +9 -9
- data/examples/temp_sensor/src/UsartModel.c +34 -34
- data/examples/temp_sensor/src/UsartModel.h +10 -10
- data/examples/temp_sensor/src/UsartPutChar.c +16 -16
- data/examples/temp_sensor/src/UsartPutChar.h +8 -8
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
- data/examples/temp_sensor/test/TestAdcConductor.c +121 -121
- data/examples/temp_sensor/test/TestAdcHardware.c +44 -44
- data/examples/temp_sensor/test/TestAdcModel.c +33 -33
- data/examples/temp_sensor/test/TestExecutor.c +36 -36
- data/examples/temp_sensor/test/TestMain.c +24 -24
- data/examples/temp_sensor/test/TestModel.c +20 -20
- data/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
- data/examples/temp_sensor/test/TestTemperatureFilter.c +79 -79
- data/examples/temp_sensor/test/TestTimerConductor.c +32 -32
- data/examples/temp_sensor/test/TestTimerHardware.c +26 -26
- data/examples/temp_sensor/test/TestTimerModel.c +18 -18
- data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
- data/examples/temp_sensor/test/TestUsartConductor.c +40 -40
- data/examples/temp_sensor/test/TestUsartHardware.c +36 -36
- data/examples/temp_sensor/test/TestUsartModel.c +36 -36
- data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
- data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
- data/lib/ceedling/configurator_builder.rb +1 -1
- data/lib/ceedling/tasks_base.rake +10 -2
- data/lib/ceedling/tool_executor.rb +3 -0
- data/lib/ceedling/version.rb +3 -3
- data/license.txt +1 -1
- data/plugins/bullseye/bullseye.rake +162 -162
- data/plugins/gcov/gcov.rake +152 -152
- data/plugins/module_generator/lib/module_generator.rb +145 -145
- data/plugins/module_generator/module_generator.rake +14 -14
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -0
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -0
- data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -0
- data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -0
- data/spec/system/deployment_spec.rb +0 -1
- data/test_graveyard/integration/paths_test.rb +80 -80
- data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +75 -75
- data/test_graveyard/integration/rake_rules_cmock_test.rb +74 -74
- data/test_graveyard/integration/rake_rules_preprocess_test.rb +178 -178
- data/test_graveyard/integration/rake_rules_test.rb +268 -268
- data/test_graveyard/integration/rake_tasks_test.rb +103 -103
- data/test_graveyard/integration_test_helper.rb +34 -34
- data/test_graveyard/rakefile_rules.rb +10 -10
- data/test_graveyard/rakefile_rules_aux_dependencies.rb +10 -10
- data/test_graveyard/rakefile_rules_cmock.rb +10 -10
- data/test_graveyard/rakefile_rules_preprocess.rb +10 -10
- data/test_graveyard/rakefile_tasks.rb +10 -10
- data/test_graveyard/system/file_system_test.rb +78 -78
- data/test_graveyard/system/project_mocks_test.rb +38 -38
- data/test_graveyard/system/project_simple_test.rb +39 -39
- data/test_graveyard/system/rule_mocks_test.rb +44 -44
- data/test_graveyard/system/rule_runners_test.rb +44 -44
- data/test_graveyard/system_test_helper.rb +73 -73
- data/test_graveyard/test_helper.rb +93 -93
- data/test_graveyard/unit/busted/configurator_builder_test.rb +569 -569
- data/test_graveyard/unit/busted/configurator_helper_test.rb +234 -234
- data/test_graveyard/unit/busted/configurator_test.rb +232 -232
- data/test_graveyard/unit/busted/configurator_validator_test.rb +169 -169
- data/test_graveyard/unit/busted/deep_merge_fix_test.rb +55 -55
- data/test_graveyard/unit/busted/dependinator_test.rb +129 -129
- data/test_graveyard/unit/busted/file_finder_helper_test.rb +45 -45
- data/test_graveyard/unit/busted/file_finder_test.rb +114 -114
- data/test_graveyard/unit/busted/file_path_utils_test.rb +97 -97
- data/test_graveyard/unit/busted/file_system_utils_test.rb +21 -21
- data/test_graveyard/unit/busted/generator_test.rb +187 -187
- data/test_graveyard/unit/busted/generator_test_results_test.rb +129 -129
- data/test_graveyard/unit/busted/generator_test_runner_test.rb +475 -475
- data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +39 -39
- data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +156 -156
- data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +93 -93
- data/test_graveyard/unit/busted/preprocessinator_test.rb +57 -57
- data/test_graveyard/unit/busted/project_file_loader_test.rb +142 -142
- data/test_graveyard/unit/busted/setupinator_test.rb +45 -45
- data/test_graveyard/unit/busted/streaminator_test.rb +49 -49
- data/test_graveyard/unit/busted/task_invoker_test.rb +69 -69
- data/test_graveyard/unit/busted/test_includes_extractor_test.rb +111 -111
- data/test_graveyard/unit/busted/test_invoker_helper_test.rb +62 -62
- data/test_graveyard/unit/busted/test_invoker_test.rb +47 -47
- data/test_graveyard/unit/busted/tool_executor_helper_test.rb +100 -100
- data/test_graveyard/unit/busted/tool_executor_test.rb +351 -351
- data/test_graveyard/unit/busted/verbosinator_test.rb +65 -65
- data/test_graveyard/unit/preprocessinator_extractor_test.rb +731 -731
- data/test_graveyard/unit_test_helper.rb +16 -16
- data/vendor/c_exception/LICENSE.txt +30 -30
- data/vendor/c_exception/README.md +11 -1
- data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/c_exception/docs/readme.txt +261 -242
- data/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/c_exception/lib/CException.h +110 -86
- data/vendor/c_exception/makefile +23 -23
- data/vendor/c_exception/test/CExceptionConfig.h +46 -46
- data/vendor/c_exception/test/TestException.c +391 -342
- data/vendor/c_exception/test/TestException_Runner.c +5 -12
- data/vendor/c_exception/vendor/unity/README.md +211 -0
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
- data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
- data/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
- data/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
- data/vendor/c_exception/vendor/unity/release/build.info +1 -1
- data/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
- data/vendor/c_exception/vendor/unity/src/unity.h +290 -307
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
- data/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
- data/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/c_exception/vendor/unity/{targets/gcc_64.yml → test/targets/gcc_auto_limits.yml} +46 -45
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
- data/vendor/{cmock/vendor/c_exception/vendor/unity/targets/gcc_64.yml → c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -45
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
- data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
- data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
- data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
- data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
- data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
- data/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
- data/vendor/cmock/docs/CMock_Summary.md +3 -0
- data/vendor/cmock/lib/cmock_config.rb +1 -0
- data/vendor/cmock/lib/cmock_file_writer.rb +7 -3
- data/vendor/cmock/lib/cmock_generator.rb +3 -2
- data/vendor/cmock/lib/cmock_header_parser.rb +12 -5
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/test/system/test_compilation/parsing.h +3 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +7 -0
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +57 -1
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -30
- data/vendor/cmock/vendor/c_exception/README.md +11 -1
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/docs/readme.txt +261 -242
- data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/cmock/vendor/c_exception/lib/CException.h +110 -86
- data/vendor/cmock/vendor/c_exception/makefile +23 -23
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -46
- data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -342
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +5 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +211 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +290 -307
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
- data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets/gcc_32.yml → test/targets/gcc_auto_limits.yml} +46 -44
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
- data/vendor/{c_exception/vendor/unity/targets/gcc_32.yml → cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -44
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
- data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
- data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +30 -13
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +96 -93
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -19
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +18 -17
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +66 -5
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +2 -1
- data/vendor/cmock/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +187 -27
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +14 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +6 -5
- data/vendor/cmock/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +38 -27
- data/vendor/cmock/vendor/unity/src/unity.h +5 -0
- data/vendor/cmock/vendor/unity/src/unity_internals.h +22 -18
- data/vendor/cmock/vendor/unity/test/Makefile +52 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +7 -4
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +1 -1
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +0 -1
- data/vendor/cmock/vendor/unity/test/testdata/testsample.c +19 -2
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +55 -4
- data/vendor/unity/auto/generate_test_runner.rb +4 -2
- data/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +24 -41
- data/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +5 -7
- data/vendor/unity/extras/fixture/test/Makefile +53 -8
- data/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +129 -32
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +6 -0
- data/vendor/unity/extras/fixture/test/unity_output_Spy.c +4 -4
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +32 -21
- data/vendor/unity/src/unity.h +5 -0
- data/vendor/unity/src/unity_internals.h +7 -3
- data/vendor/unity/test/Makefile +52 -0
- data/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
- data/vendor/unity/test/expectdata/testsample_def.c +4 -0
- data/vendor/unity/test/expectdata/testsample_head1.c +4 -0
- data/vendor/unity/test/expectdata/testsample_head1.h +7 -4
- data/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
- data/vendor/unity/test/expectdata/testsample_new1.c +4 -0
- data/vendor/unity/test/expectdata/testsample_new2.c +4 -0
- data/vendor/unity/test/expectdata/testsample_param.c +4 -0
- data/vendor/unity/test/expectdata/testsample_run1.c +4 -0
- data/vendor/unity/test/expectdata/testsample_run2.c +4 -0
- data/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
- data/vendor/unity/test/testdata/testsample.c +19 -2
- data/vendor/unity/test/tests/testunity.c +35 -4
- metadata +75 -52
- data/ceedling-0.18.0.gem +0 -0
- data/docs/CeedlingLogo.png +0 -0
- data/vendor/c_exception/vendor/unity/Gemfile +0 -4
- data/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
- data/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
- data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
- data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
- data/vendor/c_exception/vendor/unity/makefile +0 -37
- data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile +0 -4
- data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
- data/vendor/cmock/vendor/c_exception/vendor/unity/makefile +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1aff03f6dbcd85cb8d6bf618998935423324403e
|
|
4
|
+
data.tar.gz: 393d461963ddd536aa561916ed2c97ef9ba388e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5210173ce2d66525a3a032639d2c71493b06b8e92ce7a753325cbed191eb78e0914dd1d848fdb6634df1f12012ddaa7445fa5c47cfce300d1e4638d85c50c32d
|
|
7
|
+
data.tar.gz: dd6b7a3ded702d7661924e8246449fc9aab3ea1768c154c247752e0981483bb2fa942579cc612c4ddc5e019f93a12fe68bbf5772bbdc72475616557e73c90e11
|
data/Rakefile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env rake
|
|
2
|
-
require 'bundler'
|
|
3
|
-
require 'rspec/core/rake_task'
|
|
4
|
-
|
|
5
|
-
desc "Run all rspecs"
|
|
6
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
7
|
-
t.pattern = 'spec/**/*_spec.rb'
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
task :ci => [:spec]
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
require 'bundler'
|
|
3
|
+
require 'rspec/core/rake_task'
|
|
4
|
+
|
|
5
|
+
desc "Run all rspecs"
|
|
6
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
7
|
+
t.pattern = 'spec/**/*_spec.rb'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
task :ci => [:spec]
|
data/bin/ceedling
CHANGED
|
@@ -1,128 +1,241 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
|
+
#these are always used
|
|
3
4
|
require 'rubygems'
|
|
4
5
|
require 'fileutils'
|
|
5
|
-
require 'thor'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
end
|
|
7
|
+
unless (File.exists?("project.yml"))
|
|
8
|
+
#===================================== We Do Not Have A Project ================================================
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
desc "new PROJECT_NAME", "new a new ceedling project"
|
|
15
|
-
method_option :nodocs, :type => :boolean, :default => false, :desc => "No docs in vendor directory"
|
|
16
|
-
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."
|
|
17
|
-
def new(name, silent = false)
|
|
18
|
-
ceedling_path = File.join(name, 'vendor', 'ceedling')
|
|
19
|
-
source_path = File.join(name, 'src')
|
|
20
|
-
test_path = File.join(name, 'test')
|
|
21
|
-
test_support_path = File.join(name, 'test/support')
|
|
22
|
-
build_path = File.join(name, 'build')
|
|
23
|
-
|
|
24
|
-
[source_path, test_path, test_support_path, build_path].each do |d|
|
|
25
|
-
FileUtils.mkdir_p d
|
|
26
|
-
end
|
|
10
|
+
puts "Welcome to Ceedling!"
|
|
11
|
+
require 'thor'
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
def here
|
|
14
|
+
File.dirname(__FILE__) + "/.."
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class CeedlingTasks < Thor
|
|
18
|
+
include Thor::Actions
|
|
19
|
+
|
|
20
|
+
desc "new PROJECT_NAME", "create a new ceedling project"
|
|
21
|
+
method_option :nodocs, :type => :boolean, :default => false, :desc => "No docs in vendor directory"
|
|
22
|
+
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."
|
|
23
|
+
def new(name, silent = false)
|
|
24
|
+
ceedling_path = File.join(name, 'vendor', 'ceedling')
|
|
25
|
+
source_path = File.join(name, 'src')
|
|
26
|
+
test_path = File.join(name, 'test')
|
|
27
|
+
test_support_path = File.join(name, 'test/support')
|
|
28
|
+
build_path = File.join(name, 'build')
|
|
29
|
+
|
|
30
|
+
[source_path, test_path, test_support_path, build_path].each do |d|
|
|
31
|
+
FileUtils.mkdir_p d
|
|
32
|
+
end
|
|
30
33
|
|
|
31
|
-
unless options[:
|
|
32
|
-
|
|
33
|
-
FileUtils.mkdir_p doc_path
|
|
34
|
+
unless options[:as_gem]
|
|
35
|
+
FileUtils.mkdir_p ceedling_path
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
unless options[:nodocs]
|
|
38
|
+
doc_path = File.join(ceedling_path, 'docs')
|
|
39
|
+
FileUtils.mkdir_p doc_path
|
|
40
|
+
|
|
41
|
+
in_doc_path = lambda {|f| File.join(doc_path, f)}
|
|
42
|
+
|
|
43
|
+
doc_files = [
|
|
44
|
+
'docs/CeedlingPacket.pdf',
|
|
45
|
+
'vendor/c_exception/docs/CExceptionSummary.pdf',
|
|
46
|
+
'vendor/cmock/docs/CMock Summary.pdf',
|
|
47
|
+
'vendor/unity/docs/Unity Summary.pdf',
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
doc_files.each do |f|
|
|
51
|
+
copy_file f, in_doc_path.call(File.basename(f))
|
|
52
|
+
end
|
|
53
|
+
end
|
|
36
54
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
55
|
+
folders = %w{plugins lib}
|
|
56
|
+
folders.map do |f|
|
|
57
|
+
{:src => f, :dst => File.join(ceedling_path, f)}
|
|
58
|
+
end.each do |f|
|
|
59
|
+
directory f[:src], f[:dst]
|
|
60
|
+
end
|
|
43
61
|
|
|
44
|
-
|
|
45
|
-
|
|
62
|
+
sub_components = [
|
|
63
|
+
{:src => 'vendor/c_exception/lib/', :dst => 'vendor/c_exception/lib'},
|
|
64
|
+
{:src => 'vendor/c_exception/release/', :dst => 'vendor/c_exception/release'},
|
|
65
|
+
{:src => 'vendor/cmock/config/', :dst => 'vendor/cmock/config'},
|
|
66
|
+
{:src => 'vendor/cmock/lib/', :dst => 'vendor/cmock/lib'},
|
|
67
|
+
{:src => 'vendor/cmock/release/', :dst => 'vendor/cmock/release'},
|
|
68
|
+
{:src => 'vendor/cmock/src/', :dst => 'vendor/cmock/src'},
|
|
69
|
+
{:src => 'vendor/constructor/lib/', :dst => 'vendor/constructor/lib'},
|
|
70
|
+
{:src => 'vendor/deep_merge/lib/', :dst => 'vendor/deep_merge/lib'},
|
|
71
|
+
{:src => 'vendor/diy/lib', :dst => 'vendor/diy/lib'},
|
|
72
|
+
{:src => 'vendor/unity/auto/', :dst => 'vendor/unity/auto'},
|
|
73
|
+
{:src => 'vendor/unity/release/', :dst => 'vendor/unity/release'},
|
|
74
|
+
{:src => 'vendor/unity/src/', :dst => 'vendor/unity/src'},
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
sub_components.each do |c|
|
|
78
|
+
directory c[:src], File.join(ceedling_path, c[:dst])
|
|
46
79
|
end
|
|
47
80
|
end
|
|
48
81
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
82
|
+
if options[:as_gem]
|
|
83
|
+
copy_file File.join('assets', 'project_as_gem.yml'), File.join(name, 'project.yml')
|
|
84
|
+
copy_file File.join('assets', 'rakefile_as_gem.rb'), File.join(name, 'rakefile.rb')
|
|
85
|
+
else
|
|
86
|
+
copy_file File.join('assets', 'project_with_guts.yml'), File.join(name, 'project.yml')
|
|
87
|
+
copy_file File.join('assets', 'rakefile_with_guts.rb'), File.join(name, 'rakefile.rb')
|
|
54
88
|
end
|
|
55
89
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{:src => 'vendor/cmock/src/', :dst => 'vendor/cmock/src'},
|
|
63
|
-
{:src => 'vendor/constructor/lib/', :dst => 'vendor/constructor/lib'},
|
|
64
|
-
{:src => 'vendor/deep_merge/lib/', :dst => 'vendor/deep_merge/lib'},
|
|
65
|
-
{:src => 'vendor/diy/lib', :dst => 'vendor/diy/lib'},
|
|
66
|
-
{:src => 'vendor/unity/auto/', :dst => 'vendor/unity/auto'},
|
|
67
|
-
{:src => 'vendor/unity/release/', :dst => 'vendor/unity/release'},
|
|
68
|
-
{:src => 'vendor/unity/src/', :dst => 'vendor/unity/src'},
|
|
69
|
-
]
|
|
70
|
-
|
|
71
|
-
sub_components.each do |c|
|
|
72
|
-
directory c[:src], File.join(ceedling_path, c[:dst])
|
|
90
|
+
unless silent
|
|
91
|
+
puts "\n"
|
|
92
|
+
puts "Project '#{name}' created!"
|
|
93
|
+
puts " - Tool documentation is located in vendor/ceedling/docs" if (not options[:nodocs]) and (not options[:as_gem])
|
|
94
|
+
puts " - Execute 'rake -T' to view available test & build tasks"
|
|
95
|
+
puts ''
|
|
73
96
|
end
|
|
74
97
|
end
|
|
75
98
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
desc "examples", "list available example projects"
|
|
100
|
+
def examples()
|
|
101
|
+
puts "Available sample projects:"
|
|
102
|
+
FileUtils.cd(File.join(here, "examples")) do
|
|
103
|
+
Dir["*"].each {|proj| puts " #{proj}"}
|
|
104
|
+
end
|
|
82
105
|
end
|
|
83
106
|
|
|
84
|
-
|
|
107
|
+
desc "example PROJ_NAME [DEST]", "new specified example project (in DEST, if specified)"
|
|
108
|
+
def example(proj_name, dest=nil)
|
|
109
|
+
if dest.nil? then dest = proj_name end
|
|
110
|
+
|
|
111
|
+
invoke :new, [dest, true]
|
|
112
|
+
|
|
113
|
+
dest_src = File.join(dest,'src')
|
|
114
|
+
dest_test = File.join(dest,'test')
|
|
115
|
+
dest_rakefile = File.join(dest,'rakefile.rb')
|
|
116
|
+
dest_project = File.join(dest,'project.yml')
|
|
117
|
+
|
|
118
|
+
directory "examples/#{proj_name}/src", dest_src
|
|
119
|
+
directory "examples/#{proj_name}/test", dest_test
|
|
120
|
+
remove_file dest_rakefile
|
|
121
|
+
remove_file dest_project
|
|
122
|
+
copy_file "examples/#{proj_name}/rakefile.rb", dest_rakefile
|
|
123
|
+
copy_file "examples/#{proj_name}/project.yml", dest_project
|
|
124
|
+
|
|
85
125
|
puts "\n"
|
|
86
|
-
puts "
|
|
87
|
-
puts " - Tool documentation is located in vendor/ceedling/docs"
|
|
126
|
+
puts "Example project '#{proj_name}' created!"
|
|
127
|
+
puts " - Tool documentation is located in vendor/ceedling/docs"
|
|
88
128
|
puts " - Execute 'rake -T' to view available test & build tasks"
|
|
89
129
|
puts ''
|
|
90
130
|
end
|
|
91
131
|
end
|
|
92
132
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Dir["*"].each {|proj| puts " #{proj}"}
|
|
133
|
+
if (ARGV[0] =~ /^\-T$/)
|
|
134
|
+
puts "\n(No Project Detected, Therefore Showing Options to Create Projects)"
|
|
135
|
+
CeedlingTasks.tasks.each_pair do |k,v|
|
|
136
|
+
puts v.usage.ljust(25,' ') + v.description
|
|
98
137
|
end
|
|
138
|
+
puts "\n"
|
|
139
|
+
else
|
|
140
|
+
CeedlingTasks.source_root here
|
|
141
|
+
CeedlingTasks.start
|
|
99
142
|
end
|
|
100
143
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
144
|
+
#===================================== We Have A Project Already ================================================
|
|
145
|
+
else
|
|
146
|
+
|
|
147
|
+
require 'pty'
|
|
148
|
+
require 'yaml'
|
|
149
|
+
require 'rbconfig'
|
|
150
|
+
|
|
151
|
+
#determine platform
|
|
152
|
+
platform = begin
|
|
153
|
+
case(RbConfig::CONFIG['host_os'])
|
|
154
|
+
when /mswin|mingw|cygwin/i
|
|
155
|
+
:mswin
|
|
156
|
+
when /darwin/
|
|
157
|
+
:osx
|
|
158
|
+
else
|
|
159
|
+
:linux
|
|
160
|
+
end
|
|
161
|
+
rescue
|
|
162
|
+
:linux
|
|
163
|
+
end
|
|
104
164
|
|
|
105
|
-
|
|
165
|
+
#create our default meta-runner option set
|
|
166
|
+
options = {
|
|
167
|
+
:pretend_we_are_gtest => false,
|
|
168
|
+
:args => "",
|
|
169
|
+
:pretest => nil,
|
|
170
|
+
:outfile => nil,
|
|
171
|
+
:add_path => [],
|
|
172
|
+
:path_connector => (platform == :mswin) ? ";" : ":",
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
#guess that we need a special script file first if it exists
|
|
176
|
+
if (platform == :mswin)
|
|
177
|
+
options[:pretest] = File.exists?("#{ platform.to_s }_setup.bat") ? "#{ platform.to_s }_setup.bat" : nil
|
|
178
|
+
else
|
|
179
|
+
options[:pretest] = File.exists?("#{ platform.to_s }_setup.sh") ? "source #{ platform.to_s }_setup.sh" : nil
|
|
180
|
+
end
|
|
106
181
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
182
|
+
#merge in project settings if they can be found here
|
|
183
|
+
yaml_options = YAML.load_file('project.yml')
|
|
184
|
+
options[:pretend_we_are_gtest] = (yaml_options[:plugins][:enabled].include? :stdout_gtestlike_tests_report)
|
|
185
|
+
options[:add_path] = yaml_options[:paths][:tools] || []
|
|
186
|
+
|
|
187
|
+
#sort through command line options
|
|
188
|
+
options[:args]
|
|
189
|
+
ARGV.each do |v|
|
|
190
|
+
case(v)
|
|
191
|
+
when /--gtest/
|
|
192
|
+
options[:pretend_we_are_gtest] = true
|
|
193
|
+
else
|
|
194
|
+
options[:args] += v + " "
|
|
195
|
+
end
|
|
196
|
+
end
|
|
111
197
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
198
|
+
#add to the path
|
|
199
|
+
if (options[:add_path] && !options[:add_path].empty?)
|
|
200
|
+
path = ENV["PATH"]
|
|
201
|
+
options[:add_path].each do |p|
|
|
202
|
+
f = File.expand_path(File.dirname(__FILE__),p)
|
|
203
|
+
path = (f + options[:path_connector] + path) unless path.include? f
|
|
204
|
+
end
|
|
205
|
+
ENV["PATH"] = path
|
|
206
|
+
end
|
|
118
207
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
208
|
+
#run rake and capture all the output
|
|
209
|
+
results = ""
|
|
210
|
+
okay_to_print = !(options[:pretend_we_are_gtest])
|
|
211
|
+
begin
|
|
212
|
+
options[:cmd] = if (options[:pretest].nil? || options[:pretest].empty?)
|
|
213
|
+
"rake #{options[:args]}"
|
|
214
|
+
else
|
|
215
|
+
"#{options[:pretest]} && rake #{options[:args]}"
|
|
216
|
+
end
|
|
217
|
+
PTY.spawn(options[:cmd]) do |stdout, stdin, pid|
|
|
218
|
+
begin
|
|
219
|
+
stdout.each do |line|
|
|
220
|
+
okay_to_print = true if ((options[:pretend_we_are_gtest]) && (line.match(/\[\=+\]/)))
|
|
221
|
+
line.gsub!(/(?<!\w)rake(?!\w)/,'ceedling') if (options[:args].strip == "-T")
|
|
222
|
+
puts(line) if okay_to_print
|
|
223
|
+
end
|
|
224
|
+
rescue Errno::EIO
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
rescue Exception => e
|
|
228
|
+
results += e.inspect #unless (e == PTY::ChildExited)
|
|
124
229
|
end
|
|
125
|
-
end
|
|
126
230
|
|
|
127
|
-
|
|
128
|
-
|
|
231
|
+
#File.open("debug.txt",'w'){|f| f << ARGV.inspect << "\n\n" << options.inspect << "\n\n" << results }
|
|
232
|
+
|
|
233
|
+
#dump the results back out stdout unless otherwise specified
|
|
234
|
+
if (options[:outfile].nil?)
|
|
235
|
+
puts results
|
|
236
|
+
else
|
|
237
|
+
File.open(options[:outfile],'w') {|f| f << results }
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
#===================================================================================================================
|
|
241
|
+
end
|
data/ceedling-0.19.0.gem
ADDED
|
Binary file
|
data/config/test_environment.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
# Setup our load path:
|
|
3
|
-
[
|
|
4
|
-
'lib',
|
|
5
|
-
'test',
|
|
6
|
-
'vendor/behaviors/lib',
|
|
7
|
-
'vendor/hardmock/lib',
|
|
8
|
-
'vendor/constructor/lib',
|
|
9
|
-
'vendor/deep_merge/lib',
|
|
10
|
-
].each do |dir|
|
|
11
|
-
$LOAD_PATH.unshift( File.join( File.expand_path(File.dirname(__FILE__) + "/../"), dir) )
|
|
12
|
-
end
|
|
1
|
+
|
|
2
|
+
# Setup our load path:
|
|
3
|
+
[
|
|
4
|
+
'lib',
|
|
5
|
+
'test',
|
|
6
|
+
'vendor/behaviors/lib',
|
|
7
|
+
'vendor/hardmock/lib',
|
|
8
|
+
'vendor/constructor/lib',
|
|
9
|
+
'vendor/deep_merge/lib',
|
|
10
|
+
].each do |dir|
|
|
11
|
+
$LOAD_PATH.unshift( File.join( File.expand_path(File.dirname(__FILE__) + "/../"), dir) )
|
|
12
|
+
end
|
data/docs/CeedlingPacket.md
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
[All code is copyright © 2010-2012 Ceedling Project
|
|
1
|
+
[All code is copyright © 2010-2012 Ceedling Project
|
|
2
2
|
by Mike Karlesky, Mark VanderVoord, and Greg Williams.
|
|
3
3
|
|
|
4
4
|
This Documentation Is Released Under a
|
|
5
5
|
Creative Commons 3.0 Attribution Share-Alike License]
|
|
6
6
|
|
|
7
|
-
What the What?
|
|
8
|
-
|
|
9
|
-
Assembling build environments for C projects - especially with
|
|
10
|
-
automated unit tests - is a pain. Whether it's Make or Rake or Premake
|
|
11
|
-
or what-have-you, set up with an all-purpose build environment
|
|
12
|
-
tool is tedious and requires considerable glue code to pull together
|
|
13
|
-
the necessary tools and libraries. Ceedling allows you to generate
|
|
14
|
-
an entire test and build environment for a C project from a single
|
|
15
|
-
YAML configuration file. Ceedling is written in Ruby and works
|
|
16
|
-
with the Rake build tool plus other goodness like Unity and CMock
|
|
17
|
-
- the unit testing and mocking frameworks for C. Ceedling and
|
|
18
|
-
its complementary tools can support the tiniest of embedded
|
|
19
|
-
processors, the beefiest 64 bit power houses available, and
|
|
20
|
-
everything in between.
|
|
21
|
-
|
|
22
|
-
For a build project including unit tests and using the default
|
|
23
|
-
toolchain gcc, the configuration file could be as simple as this:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
you would run `
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
the
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
7
|
+
What the What?
|
|
8
|
+
|
|
9
|
+
Assembling build environments for C projects - especially with
|
|
10
|
+
automated unit tests - is a pain. Whether it's Make or Rake or Premake
|
|
11
|
+
or what-have-you, set up with an all-purpose build environment
|
|
12
|
+
tool is tedious and requires considerable glue code to pull together
|
|
13
|
+
the necessary tools and libraries. Ceedling allows you to generate
|
|
14
|
+
an entire test and build environment for a C project from a single
|
|
15
|
+
YAML configuration file. Ceedling is written in Ruby and works
|
|
16
|
+
with the Rake build tool plus other goodness like Unity and CMock
|
|
17
|
+
- the unit testing and mocking frameworks for C. Ceedling and
|
|
18
|
+
its complementary tools can support the tiniest of embedded
|
|
19
|
+
processors, the beefiest 64 bit power houses available, and
|
|
20
|
+
everything in between.
|
|
21
|
+
|
|
22
|
+
For a build project including unit tests and using the default
|
|
23
|
+
toolchain gcc, the configuration file could be as simple as this:
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
:project:
|
|
27
|
+
:build_root: project/build/
|
|
28
|
+
:release_build: TRUE
|
|
29
|
+
|
|
30
|
+
:paths:
|
|
31
|
+
:test:
|
|
32
|
+
- tests/**
|
|
33
|
+
:source:
|
|
34
|
+
- source/**
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
From the command line, to build the release version of your project,
|
|
38
|
+
you would simply run `ceedling release`. To run all your unit tests,
|
|
39
|
+
you would run `ceedling test:all`. That's it!
|
|
40
|
+
|
|
41
|
+
Of course, many more advanced options allow you to configure
|
|
42
|
+
your project with a variety of features to meet a variety of needs.
|
|
43
|
+
Ceedling can work with practically any command line toolchain
|
|
44
|
+
and directory structure – all by way of the configuration file.
|
|
45
|
+
Further, because Ceedling piggy backs on Rake, you can add your
|
|
46
|
+
own Rake tasks to accomplish project tasks outside of testing
|
|
47
|
+
and release builds. A facility for plugins also allows you to
|
|
48
|
+
extend Ceedling's capabilities for needs such as custom code
|
|
49
|
+
metrics reporting and coverage testing.
|
|
50
|
+
|
|
51
|
+
What's with this Name?
|
|
52
|
+
|
|
53
|
+
Glad you asked. Ceedling is tailored for unit tested C projects
|
|
54
|
+
and is built upon / around Rake (Rake is a Make replacement implemented
|
|
55
|
+
in the Ruby scripting language). So, we've got C, our Rake, and
|
|
56
|
+
the fertile soil of a build environment in which to grow and tend
|
|
57
|
+
your project and its unit tests. Ta da - _Ceedling_.
|
|
58
|
+
|
|
59
|
+
What Do You Mean "tailored for unit tested C projects"?
|
|
60
|
+
|
|
61
|
+
Well, we like to write unit tests for our C code to make it lean and
|
|
61
62
|
mean (that whole [Test-Driven Development][tdd]
|
|
62
|
-
thing). Along the way, this style of writing C code spawned two
|
|
63
|
-
tools to make the job easier: a unit test framework for C called
|
|
64
|
-
_Unity_ and a mocking library called _CMock_. And, though it's
|
|
65
|
-
not directly related to testing, a C framework for exception
|
|
66
|
-
handling called _CException_ also came along.
|
|
63
|
+
thing). Along the way, this style of writing C code spawned two
|
|
64
|
+
tools to make the job easier: a unit test framework for C called
|
|
65
|
+
_Unity_ and a mocking library called _CMock_. And, though it's
|
|
66
|
+
not directly related to testing, a C framework for exception
|
|
67
|
+
handling called _CException_ also came along.
|
|
67
68
|
|
|
68
69
|
[tdd]: http://en.wikipedia.org/wiki/Test-driven_development
|
|
69
70
|
|
|
70
|
-
These tools and frameworks are great, but they require quite
|
|
71
|
-
a bit of environment support to pull them all together in a convenient,
|
|
72
|
-
usable fashion. We started off with Rakefiles to assemble everything.
|
|
73
|
-
These ended up being quite complicated and had to be hand-edited
|
|
74
|
-
or created anew for each new project. Ceedling replaces all that
|
|
75
|
-
tedium and rework with a configuration file that ties everything
|
|
76
|
-
together.
|
|
71
|
+
These tools and frameworks are great, but they require quite
|
|
72
|
+
a bit of environment support to pull them all together in a convenient,
|
|
73
|
+
usable fashion. We started off with Rakefiles to assemble everything.
|
|
74
|
+
These ended up being quite complicated and had to be hand-edited
|
|
75
|
+
or created anew for each new project. Ceedling replaces all that
|
|
76
|
+
tedium and rework with a configuration file that ties everything
|
|
77
|
+
together.
|
|
77
78
|
|
|
78
79
|
Though Ceedling is tailored for unit testing, it can also go right ahead
|
|
79
80
|
and build your final binary release artifact for you as well. Or,
|
|
@@ -83,26 +84,26 @@ environment than it is a general purpose release build environment;
|
|
|
83
84
|
complicated projects including separate bootloaders or multiple library
|
|
84
85
|
builds, etc. are not its strong suit.
|
|
85
86
|
|
|
86
|
-
Hold on. Back up. Ruby? Rake? YAML? Unity? CMock? CException?
|
|
87
|
+
Hold on. Back up. Ruby? Rake? YAML? Unity? CMock? CException?
|
|
87
88
|
|
|
88
|
-
Seem overwhelming? It's not bad at all, and for the benefits tests
|
|
89
|
-
bring us, it's all worth it.
|
|
89
|
+
Seem overwhelming? It's not bad at all, and for the benefits tests
|
|
90
|
+
bring us, it's all worth it.
|
|
90
91
|
|
|
91
|
-
[Ruby][] is a handy scripting
|
|
92
|
-
language like Perl or Python. It's a modern, full featured language
|
|
93
|
-
that happens to be quite handy for accomplishing tasks like code
|
|
94
|
-
generation or automating one's workflow while developing in
|
|
95
|
-
a compiled language such as C.
|
|
92
|
+
[Ruby][] is a handy scripting
|
|
93
|
+
language like Perl or Python. It's a modern, full featured language
|
|
94
|
+
that happens to be quite handy for accomplishing tasks like code
|
|
95
|
+
generation or automating one's workflow while developing in
|
|
96
|
+
a compiled language such as C.
|
|
96
97
|
|
|
97
98
|
[Ruby]: http://www.ruby-lang.org/en/
|
|
98
99
|
|
|
99
|
-
[Rake][] is a utility written in Ruby
|
|
100
|
-
for accomplishing dependency tracking and task automation
|
|
101
|
-
common to building software. It's a modern, more flexible replacement
|
|
102
|
-
for [Make][]).
|
|
103
|
-
Rakefiles are Ruby files, but they contain build targets similar
|
|
104
|
-
in nature to that of Makefiles (but you can also run Ruby code in
|
|
105
|
-
your Rakefile).
|
|
100
|
+
[Rake][] is a utility written in Ruby
|
|
101
|
+
for accomplishing dependency tracking and task automation
|
|
102
|
+
common to building software. It's a modern, more flexible replacement
|
|
103
|
+
for [Make][]).
|
|
104
|
+
Rakefiles are Ruby files, but they contain build targets similar
|
|
105
|
+
in nature to that of Makefiles (but you can also run Ruby code in
|
|
106
|
+
your Rakefile).
|
|
106
107
|
|
|
107
108
|
[Rake]: http://rubyrake.org/
|
|
108
109
|
[Make]: http://en.wikipedia.org/wiki/Make_(software)
|
|
@@ -148,130 +149,130 @@ up your return call trace.
|
|
|
148
149
|
Notes
|
|
149
150
|
-----
|
|
150
151
|
|
|
151
|
-
* YAML support is included with Ruby - requires no special installation
|
|
152
|
-
or configuration.
|
|
152
|
+
* YAML support is included with Ruby - requires no special installation
|
|
153
|
+
or configuration.
|
|
153
154
|
|
|
154
|
-
* Unity, CMock, and CException are bundled with Ceedling, and
|
|
155
|
-
Ceedling is designed to glue them all together for your project
|
|
156
|
-
as seamlessly as possible.
|
|
155
|
+
* Unity, CMock, and CException are bundled with Ceedling, and
|
|
156
|
+
Ceedling is designed to glue them all together for your project
|
|
157
|
+
as seamlessly as possible.
|
|
157
158
|
|
|
158
159
|
|
|
159
|
-
Installation & Setup: What Exactly Do I Need to Get Started?
|
|
160
|
+
Installation & Setup: What Exactly Do I Need to Get Started?
|
|
160
161
|
------------------------------------------------------------
|
|
161
162
|
|
|
162
|
-
As a [Ruby gem](http://docs.rubygems.org/read/chapter/1):
|
|
163
|
+
As a [Ruby gem](http://docs.rubygems.org/read/chapter/1):
|
|
163
164
|
|
|
164
|
-
1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
|
|
165
|
+
1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
|
|
165
166
|
|
|
166
|
-
2. Use Ruby's command line gem package manager to install Rake:
|
|
167
|
-
`gem install rake`
|
|
167
|
+
2. Use Ruby's command line gem package manager to install Rake:
|
|
168
|
+
`gem install rake`
|
|
168
169
|
|
|
169
|
-
3. Use Ruby's command line gem package manager to install Ceedling:
|
|
170
|
-
`gem install ceedling` {text:line-break} (Unity, CMock,
|
|
171
|
-
and CException come along with Ceedling for free)
|
|
170
|
+
3. Use Ruby's command line gem package manager to install Ceedling:
|
|
171
|
+
`gem install ceedling` {text:line-break} (Unity, CMock,
|
|
172
|
+
and CException come along with Ceedling for free)
|
|
172
173
|
|
|
173
|
-
4. Execute Ceedling at command line to create example project
|
|
174
|
-
or an empty Ceedling project in your filesystem (executing
|
|
175
|
-
`ceedling help` first is, well, helpful).
|
|
174
|
+
4. Execute Ceedling at command line to create example project
|
|
175
|
+
or an empty Ceedling project in your filesystem (executing
|
|
176
|
+
`ceedling help` first is, well, helpful).
|
|
176
177
|
|
|
177
|
-
Gem install notes:
|
|
178
|
+
Gem install notes:
|
|
178
179
|
|
|
179
|
-
1. Steps 1-3 are a one time affair for your local environment.
|
|
180
|
-
When steps 1-3 are completed once, only step 4 is needed for
|
|
181
|
-
each new project.
|
|
180
|
+
1. Steps 1-3 are a one time affair for your local environment.
|
|
181
|
+
When steps 1-3 are completed once, only step 4 is needed for
|
|
182
|
+
each new project.
|
|
182
183
|
|
|
183
184
|
|
|
184
185
|
|
|
185
|
-
Alternatively, from scratch:
|
|
186
|
+
Alternatively, from scratch:
|
|
186
187
|
|
|
187
|
-
1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
|
|
188
|
+
1. [Download and install Ruby](http://www.ruby-lang.org/en/downloads/)
|
|
188
189
|
|
|
189
|
-
2. Use Ruby's command line gem package manager to install Rake:
|
|
190
|
-
`gem install rake`
|
|
190
|
+
2. Use Ruby's command line gem package manager to install Rake:
|
|
191
|
+
`gem install rake`
|
|
191
192
|
|
|
192
|
-
3. Grab the Ceedling package (from sourceforge as download
|
|
193
|
-
or from svn) and place in your filesystem {text:line-break}
|
|
194
|
-
(it already contains Unity, CMock, and CException)
|
|
193
|
+
3. Grab the Ceedling package (from sourceforge as download
|
|
194
|
+
or from svn) and place in your filesystem {text:line-break}
|
|
195
|
+
(it already contains Unity, CMock, and CException)
|
|
195
196
|
|
|
196
|
-
4. Create an empty build directory for your project {text:line-break}
|
|
197
|
-
(Ceedling will fill out the directory structure below the
|
|
198
|
-
build root when executed)
|
|
197
|
+
4. Create an empty build directory for your project {text:line-break}
|
|
198
|
+
(Ceedling will fill out the directory structure below the
|
|
199
|
+
build root when executed)
|
|
199
200
|
|
|
200
|
-
5. Create a simple Rakefile (`rakefile.rb`) that contains
|
|
201
|
-
a load call to Ceedling on your filesystem and a default task
|
|
202
|
-
(tasks available to tie to `default` are listed in the next
|
|
201
|
+
5. Create a simple Rakefile (`rakefile.rb`) that contains
|
|
202
|
+
a load call to Ceedling on your filesystem and a default task
|
|
203
|
+
(tasks available to tie to `default` are listed in the next
|
|
203
204
|
section):
|
|
204
|
-
|
|
205
|
+
|
|
205
206
|
```ruby
|
|
206
|
-
load '<path>/ceedling/lib/rakefile.rb'
|
|
207
|
+
load '<path>/ceedling/lib/rakefile.rb'
|
|
207
208
|
# ex. run all tests & build release artifact
|
|
208
209
|
task :default => ['test:all', :release]
|
|
209
|
-
# namespaced tasks must be quoted
|
|
210
|
-
# top-level tasks are Ruby symbols denoted by a leading ':'`
|
|
210
|
+
# namespaced tasks must be quoted
|
|
211
|
+
# top-level tasks are Ruby symbols denoted by a leading ':'`
|
|
211
212
|
```
|
|
212
213
|
|
|
213
|
-
6. Create your project YAML file (more on this later in this document).
|
|
214
|
-
`project.yml` is the default file name Ceedling recognizes
|
|
215
|
-
in the working directory from which Rake is run (Rake is the
|
|
216
|
-
tool we actually use to take advantage of what Ceedling provides).
|
|
214
|
+
6. Create your project YAML file (more on this later in this document).
|
|
215
|
+
`project.yml` is the default file name Ceedling recognizes
|
|
216
|
+
in the working directory from which Rake is run (Rake is the
|
|
217
|
+
tool we actually use to take advantage of what Ceedling provides).
|
|
217
218
|
|
|
218
219
|
|
|
219
|
-
From scratch install notes:
|
|
220
|
+
From scratch install notes:
|
|
220
221
|
|
|
221
|
-
1. Steps 1-3 are a one time affair for your local environment.
|
|
222
|
-
When steps 1-3 are completed once, only steps 4-6 are needed
|
|
223
|
-
for each new project.
|
|
222
|
+
1. Steps 1-3 are a one time affair for your local environment.
|
|
223
|
+
When steps 1-3 are completed once, only steps 4-6 are needed
|
|
224
|
+
for each new project.
|
|
224
225
|
|
|
225
|
-
2. See the sample starter project for a working setup. When steps
|
|
226
|
-
1-3 are complete and assuming you have gcc in your path (Ceedling's
|
|
227
|
-
default toolchain), you will only need to edit the path within
|
|
228
|
-
the sample Rakefile (see step 5 above) to yield a working,
|
|
229
|
-
albeit simple, project. The default task need not be defined,
|
|
230
|
-
but it's not a bad idea to do so.
|
|
226
|
+
2. See the sample starter project for a working setup. When steps
|
|
227
|
+
1-3 are complete and assuming you have gcc in your path (Ceedling's
|
|
228
|
+
default toolchain), you will only need to edit the path within
|
|
229
|
+
the sample Rakefile (see step 5 above) to yield a working,
|
|
230
|
+
albeit simple, project. The default task need not be defined,
|
|
231
|
+
but it's not a bad idea to do so.
|
|
231
232
|
|
|
232
233
|
|
|
233
234
|
|
|
234
|
-
General notes:
|
|
235
|
+
General notes:
|
|
235
236
|
|
|
236
|
-
1. Certain advanced features of Ceedling rely on gcc and cpp
|
|
237
|
-
as preprocessing tools. In most *nix systems, these tools
|
|
238
|
-
are already available. For Windows environments, we recommend
|
|
239
|
-
the [mingw project](http://www.mingw.org/) (Minimalist
|
|
240
|
-
GNU for Windows). This represents an optional, additional
|
|
241
|
-
setup / installation step to complement the list above. Upon
|
|
242
|
-
installing mingw ensure your system path is updated or set
|
|
243
|
-
[:environment][:path] in your `project.yml` file (see
|
|
244
|
-
environment section later in this document).
|
|
237
|
+
1. Certain advanced features of Ceedling rely on gcc and cpp
|
|
238
|
+
as preprocessing tools. In most *nix systems, these tools
|
|
239
|
+
are already available. For Windows environments, we recommend
|
|
240
|
+
the [mingw project](http://www.mingw.org/) (Minimalist
|
|
241
|
+
GNU for Windows). This represents an optional, additional
|
|
242
|
+
setup / installation step to complement the list above. Upon
|
|
243
|
+
installing mingw ensure your system path is updated or set
|
|
244
|
+
[:environment][:path] in your `project.yml` file (see
|
|
245
|
+
environment section later in this document).
|
|
245
246
|
|
|
246
|
-
2. To use a project file name other than the default `project.yml`
|
|
247
|
-
or place the project file in a directory other than the one
|
|
248
|
-
in which you'll run Rake, create an environment variable
|
|
249
|
-
`CEEDLING_MAIN_PROJECT_FILE` with your desired project
|
|
250
|
-
file path.
|
|
247
|
+
2. To use a project file name other than the default `project.yml`
|
|
248
|
+
or place the project file in a directory other than the one
|
|
249
|
+
in which you'll run Rake, create an environment variable
|
|
250
|
+
`CEEDLING_MAIN_PROJECT_FILE` with your desired project
|
|
251
|
+
file path.
|
|
251
252
|
|
|
252
|
-
3. To better understand Rake conventions, Rake execution,
|
|
253
|
-
and Rakefiles, consult the [Rake tutorial, examples, and
|
|
254
|
-
user guide](http://rubyrake.org/).
|
|
253
|
+
3. To better understand Rake conventions, Rake execution,
|
|
254
|
+
and Rakefiles, consult the [Rake tutorial, examples, and
|
|
255
|
+
user guide](http://rubyrake.org/).
|
|
255
256
|
|
|
256
257
|
|
|
257
258
|
|
|
258
|
-
Now What? How Do I Make It GO?
|
|
259
|
+
Now What? How Do I Make It GO?
|
|
259
260
|
------------------------------
|
|
260
261
|
|
|
261
|
-
We're getting a little ahead of ourselves here, but it's good
|
|
262
|
-
context on how to drive this bus. Everything is done via the command
|
|
263
|
-
line. We'll cover conventions and how to actually configure
|
|
264
|
-
your project in later sections.
|
|
262
|
+
We're getting a little ahead of ourselves here, but it's good
|
|
263
|
+
context on how to drive this bus. Everything is done via the command
|
|
264
|
+
line. We'll cover conventions and how to actually configure
|
|
265
|
+
your project in later sections.
|
|
265
266
|
|
|
266
|
-
To run tests, build your release artifact, etc., you will be interacting
|
|
267
|
-
with Rake on the command line. Ceedling works with Rake to present
|
|
268
|
-
you with named tasks that coordinate the file generation and
|
|
269
|
-
build steps needed to accomplish something useful. You can also
|
|
270
|
-
add your own independent Rake tasks or create plugins to extend
|
|
271
|
-
Ceedling (more on this later).
|
|
267
|
+
To run tests, build your release artifact, etc., you will be interacting
|
|
268
|
+
with Rake on the command line. Ceedling works with Rake to present
|
|
269
|
+
you with named tasks that coordinate the file generation and
|
|
270
|
+
build steps needed to accomplish something useful. You can also
|
|
271
|
+
add your own independent Rake tasks or create plugins to extend
|
|
272
|
+
Ceedling (more on this later).
|
|
272
273
|
|
|
273
274
|
|
|
274
|
-
* `
|
|
275
|
+
* `ceedling [no arguments]`:
|
|
275
276
|
|
|
276
277
|
Run the default Rake task (conveniently recognized by the name default
|
|
277
278
|
by Rake). Neither Rake nor Ceedling provide a default task. Rake will
|
|
@@ -279,45 +280,45 @@ Ceedling (more on this later).
|
|
|
279
280
|
conveniently define a default task in the Rakefile discussed in the
|
|
280
281
|
preceding setup & installation section of this document.
|
|
281
282
|
|
|
282
|
-
* `
|
|
283
|
+
* `ceedling -T`:
|
|
283
284
|
|
|
284
285
|
List all available Rake tasks with descriptions (Rake tasks without
|
|
285
286
|
descriptions are not listed). -T is a command line switch for Rake and
|
|
286
287
|
not the same as tasks that follow.
|
|
287
288
|
|
|
288
|
-
* `
|
|
289
|
+
* `ceedling <tasks...> --trace`:
|
|
289
290
|
|
|
290
291
|
For advanced users troubleshooting a confusing build error, debug
|
|
291
292
|
Ceedling or a plugin, --trace provides a stack trace of dependencies
|
|
292
293
|
walked during task execution and any Ruby failures along the way. Note
|
|
293
294
|
that --trace is a command line switch for Rake and is not the same as
|
|
294
295
|
tasks that follow.
|
|
295
|
-
|
|
296
|
-
* `
|
|
296
|
+
|
|
297
|
+
* `ceedling environment`:
|
|
297
298
|
|
|
298
299
|
List all configured environment variable names and string values. This
|
|
299
300
|
task is helpful in verifying the evaluatio of any Ruby expressions in
|
|
300
301
|
the [:environment] section of your config file.`: Note: Ceedling may
|
|
301
302
|
set some convenience environment variables by default.
|
|
302
303
|
|
|
303
|
-
* `
|
|
304
|
+
* `ceedling paths:*`:
|
|
304
305
|
|
|
305
306
|
List all paths collected from [:paths] entries in your YAML config
|
|
306
307
|
file where * is the name of any section contained in [:paths]. This
|
|
307
308
|
task is helpful in verifying the expansion of path wildcards / globs
|
|
308
309
|
specified in the [:paths] section of your config file.
|
|
309
310
|
|
|
310
|
-
* `
|
|
311
|
-
* `
|
|
312
|
-
* `
|
|
313
|
-
* `
|
|
311
|
+
* `ceedling files:assembly`
|
|
312
|
+
* `ceedling files:header`
|
|
313
|
+
* `ceedling files:source`
|
|
314
|
+
* `ceedling files:test`
|
|
314
315
|
|
|
315
316
|
List all files and file counts collected from the relevant search
|
|
316
317
|
paths specified by the [:paths] entries of your YAML config file. The
|
|
317
318
|
files:assembly task will only be available if assembly support is
|
|
318
319
|
enabled in the [:release_build] section of your configuration file.
|
|
319
320
|
|
|
320
|
-
* `
|
|
321
|
+
* `ceedling options:*`:
|
|
321
322
|
|
|
322
323
|
Load and merge configuration settings into the main project
|
|
323
324
|
configuration. Each task is named after a *.yml file found in the
|
|
@@ -325,11 +326,11 @@ Ceedling (more on this later).
|
|
|
325
326
|
setting [:project][:options_path] and for options files in advanced
|
|
326
327
|
topics.
|
|
327
328
|
|
|
328
|
-
* `
|
|
329
|
+
* `ceedling test:all`:
|
|
329
330
|
|
|
330
331
|
Run all unit tests (rebuilding anything that's changed along the way).
|
|
331
332
|
|
|
332
|
-
* `
|
|
333
|
+
* `ceedling test:delta`:
|
|
333
334
|
|
|
334
335
|
Run only those unit tests for which the source or test files have
|
|
335
336
|
changed (i.e. incremental build). Note: with the
|
|
@@ -337,50 +338,50 @@ Ceedling (more on this later).
|
|
|
337
338
|
runner files are always regenerated limiting the total efficiency this
|
|
338
339
|
text execution option can afford.
|
|
339
340
|
|
|
340
|
-
* `
|
|
341
|
+
* `ceedling test:*`:
|
|
341
342
|
|
|
342
343
|
Execute the named test file or the named source file that has an
|
|
343
|
-
accompanying test. No path. Examples:
|
|
344
|
+
accompanying test. No path. Examples: ceedling test:foo.c or ceed
|
|
344
345
|
test:test_foo.c
|
|
345
346
|
|
|
346
|
-
* `
|
|
347
|
+
* `ceedling test:pattern[*]`:
|
|
347
348
|
|
|
348
349
|
Execute any tests whose name and/or path match the regular expression
|
|
349
|
-
pattern (case sensitive). Example:
|
|
350
|
+
pattern (case sensitive). Example: ceedling "test:pattern[(I|i)nit]" will
|
|
350
351
|
execute all tests named for initialization testing. Note: quotes may
|
|
351
|
-
be necessary around the
|
|
352
|
+
be necessary around the ceedling parameter to distinguish regex characters
|
|
352
353
|
from command line operators.
|
|
353
354
|
|
|
354
|
-
* `
|
|
355
|
+
* `ceedling test:path[*]`:
|
|
355
356
|
|
|
356
357
|
Execute any tests whose path contains the given string (case
|
|
357
|
-
sensitive). Example:
|
|
358
|
+
sensitive). Example: ceedling test:path[foo/bar] will execute all tests
|
|
358
359
|
whose path contains foo/bar. Note: both directory separator characters
|
|
359
360
|
/ and \ are valid.
|
|
360
361
|
|
|
361
|
-
* `
|
|
362
|
+
* `ceedling release`:
|
|
362
363
|
|
|
363
364
|
Build all source into a release artifact (if the release build option
|
|
364
365
|
is configured).
|
|
365
366
|
|
|
366
|
-
* `
|
|
367
|
+
* `ceedling release:compile:*`:
|
|
367
368
|
|
|
368
369
|
Sometimes you just need to compile a single file dagnabit. Example:
|
|
369
|
-
|
|
370
|
+
ceedling release:compile:foo.c
|
|
370
371
|
|
|
371
|
-
* `
|
|
372
|
+
* `ceedling release:assemble:*`:
|
|
372
373
|
|
|
373
374
|
Sometimes you just need to assemble a single file doggonit. Example:
|
|
374
|
-
|
|
375
|
+
ceedling release:assemble:foo.s
|
|
375
376
|
|
|
376
|
-
* `
|
|
377
|
+
* `ceedling logging <tasks...>`:
|
|
377
378
|
|
|
378
379
|
Enable logging to <build path>/logs. Must come before test and release
|
|
379
380
|
tasks to log their steps and output. Log names are a concatenation of
|
|
380
381
|
project, user, and option files loaded. User and option files are
|
|
381
382
|
documented in the advanced topics section of this document.
|
|
382
383
|
|
|
383
|
-
* `
|
|
384
|
+
* `ceedling verbosity[x] <tasks...>`:
|
|
384
385
|
|
|
385
386
|
Change the default verbosity level. [x] ranges from 0 (quiet) to 4
|
|
386
387
|
(obnoxious). Level [3] is the default. The verbosity task must precede
|
|
@@ -388,394 +389,393 @@ Ceedling (more on this later).
|
|
|
388
389
|
seen. Verbosity settings are generally most meaningful in conjunction
|
|
389
390
|
with test and release tasks.
|
|
390
391
|
|
|
391
|
-
* `
|
|
392
|
+
* `ceedling summary`:
|
|
392
393
|
|
|
393
394
|
If plugins are enabled, this task will execute the summary method of
|
|
394
395
|
any plugins supporting it. This task is intended to provide a quick
|
|
395
396
|
roundup of build artifact metrics without re-running any part of the
|
|
396
397
|
build.
|
|
397
398
|
|
|
398
|
-
* `
|
|
399
|
+
* `ceedling clean`:
|
|
399
400
|
|
|
400
401
|
Deletes all toolchain binary artifacts (object files, executables),
|
|
401
402
|
test results, and any temporary files. Clean produces no output at the
|
|
402
403
|
command line unless verbosity has been set to an appreciable level.
|
|
403
404
|
|
|
404
|
-
* `
|
|
405
|
+
* `ceedling clobber`:
|
|
405
406
|
|
|
406
407
|
Extends clean task's behavior to also remove generated files: test
|
|
407
408
|
runners, mocks, preprocessor output. Clobber produces no output at the
|
|
408
409
|
command line unless verbosity has been set to an appreciable level.
|
|
409
410
|
|
|
410
|
-
To better understand Rake conventions, Rake execution, and
|
|
411
|
+
To better understand Rake conventions, Rake execution, and
|
|
411
412
|
Rakefiles, consult the [Rake tutorial, examples, and user guide][guide].
|
|
412
413
|
|
|
413
414
|
[guide]: http://rubyrake.org/
|
|
414
415
|
|
|
415
|
-
At present, none of Ceedling's commands provide persistence.
|
|
416
|
-
That is, they must each be specified at the command line each time
|
|
417
|
-
they are needed. For instance, Ceedling's verbosity command
|
|
418
|
-
only affects output at the time it's run.
|
|
419
|
-
|
|
420
|
-
{text:soft-page-break} Individual test and release file tasks
|
|
421
|
-
are not listed in `-T` output. Because so many files may be present
|
|
422
|
-
it's unwieldy to list them all.
|
|
423
|
-
|
|
424
|
-
Multiple rake tasks can be executed at the command line (order
|
|
425
|
-
is executed as provided). For example, `
|
|
426
|
-
clobber test:all release` will removed all generated files;
|
|
427
|
-
build and run all tests; and then build all source - in that order.
|
|
428
|
-
If any Rake task fails along the way, execution halts before the
|
|
429
|
-
next task.
|
|
430
|
-
|
|
431
|
-
The `clobber` task removes certain build directories in the
|
|
432
|
-
course of deleting generated files. In general, it's best not
|
|
433
|
-
to add to source control any Ceedling generated directories
|
|
434
|
-
below the root of your top-level build directory. That is, leave
|
|
435
|
-
anything Ceedling & its accompanying tools generate out of source
|
|
436
|
-
control (but go ahead and add the top-level build directory that
|
|
437
|
-
holds all that stuff). Also, since Ceedling is pretty smart about
|
|
438
|
-
what it rebuilds and regenerates, you needn't clobber often.
|
|
439
|
-
|
|
440
|
-
Important Conventions
|
|
416
|
+
At present, none of Ceedling's commands provide persistence.
|
|
417
|
+
That is, they must each be specified at the command line each time
|
|
418
|
+
they are needed. For instance, Ceedling's verbosity command
|
|
419
|
+
only affects output at the time it's run.
|
|
420
|
+
|
|
421
|
+
{text:soft-page-break} Individual test and release file tasks
|
|
422
|
+
are not listed in `-T` output. Because so many files may be present
|
|
423
|
+
it's unwieldy to list them all.
|
|
424
|
+
|
|
425
|
+
Multiple rake tasks can be executed at the command line (order
|
|
426
|
+
is executed as provided). For example, `ceed
|
|
427
|
+
clobber test:all release` will removed all generated files;
|
|
428
|
+
build and run all tests; and then build all source - in that order.
|
|
429
|
+
If any Rake task fails along the way, execution halts before the
|
|
430
|
+
next task.
|
|
431
|
+
|
|
432
|
+
The `clobber` task removes certain build directories in the
|
|
433
|
+
course of deleting generated files. In general, it's best not
|
|
434
|
+
to add to source control any Ceedling generated directories
|
|
435
|
+
below the root of your top-level build directory. That is, leave
|
|
436
|
+
anything Ceedling & its accompanying tools generate out of source
|
|
437
|
+
control (but go ahead and add the top-level build directory that
|
|
438
|
+
holds all that stuff). Also, since Ceedling is pretty smart about
|
|
439
|
+
what it rebuilds and regenerates, you needn't clobber often.
|
|
440
|
+
|
|
441
|
+
Important Conventions
|
|
441
442
|
=====================
|
|
442
443
|
|
|
443
|
-
Directory Structure, Filenames & Extensions
|
|
444
|
+
Directory Structure, Filenames & Extensions
|
|
444
445
|
-------------------------------------------
|
|
445
446
|
|
|
446
|
-
Much of Ceedling's functionality is driven by collecting files
|
|
447
|
-
matching certain patterns inside the paths it's configured
|
|
448
|
-
to search. See the documentation for the [:extensions] section
|
|
449
|
-
of your configuration file (found later in this document) to
|
|
450
|
-
configure the file extensions Ceedling uses to match and collect
|
|
451
|
-
files. Test file naming is covered later in this section.
|
|
447
|
+
Much of Ceedling's functionality is driven by collecting files
|
|
448
|
+
matching certain patterns inside the paths it's configured
|
|
449
|
+
to search. See the documentation for the [:extensions] section
|
|
450
|
+
of your configuration file (found later in this document) to
|
|
451
|
+
configure the file extensions Ceedling uses to match and collect
|
|
452
|
+
files. Test file naming is covered later in this section.
|
|
452
453
|
|
|
453
|
-
Test files and source files must be segregated by directories.
|
|
454
|
-
Any directory structure will do. Tests can be held in subdirectories
|
|
455
|
-
within source directories, or tests and source directories
|
|
456
|
-
can be wholly separated at the top of your project's directory
|
|
457
|
-
tree.
|
|
454
|
+
Test files and source files must be segregated by directories.
|
|
455
|
+
Any directory structure will do. Tests can be held in subdirectories
|
|
456
|
+
within source directories, or tests and source directories
|
|
457
|
+
can be wholly separated at the top of your project's directory
|
|
458
|
+
tree.
|
|
458
459
|
|
|
459
|
-
Search Path Order
|
|
460
|
+
Search Path Order
|
|
460
461
|
-----------------
|
|
461
462
|
|
|
462
|
-
When Ceedling searches for files (e.g. looking for header files
|
|
463
|
-
to mock) or when it provides search paths to any of the default
|
|
464
|
-
gcc toolchain executables, it organizes / prioritizes its search
|
|
465
|
-
paths. The order is always: test paths, support paths, source
|
|
466
|
-
paths, and then include paths. This can be useful, for instance,
|
|
467
|
-
in certain testing scenarios where we desire Ceedling or a compiler
|
|
468
|
-
to find a stand-in header file in our support directory before
|
|
469
|
-
the actual source header file of the same name.
|
|
470
|
-
|
|
471
|
-
This convention only holds when Ceedling is using its default
|
|
472
|
-
tool configurations and / or when tests are involved. If you define
|
|
473
|
-
your own tools in the configuration file (see the [:tools] section
|
|
474
|
-
documented later in this here document), you have complete control
|
|
475
|
-
over what directories are searched and in what order. Further,
|
|
476
|
-
test and support directories are only searched when appropriate.
|
|
477
|
-
That is, when running a release build, test and support directories
|
|
478
|
-
are not used at all.
|
|
479
|
-
|
|
480
|
-
Source Files & Binary Release Artifacts
|
|
463
|
+
When Ceedling searches for files (e.g. looking for header files
|
|
464
|
+
to mock) or when it provides search paths to any of the default
|
|
465
|
+
gcc toolchain executables, it organizes / prioritizes its search
|
|
466
|
+
paths. The order is always: test paths, support paths, source
|
|
467
|
+
paths, and then include paths. This can be useful, for instance,
|
|
468
|
+
in certain testing scenarios where we desire Ceedling or a compiler
|
|
469
|
+
to find a stand-in header file in our support directory before
|
|
470
|
+
the actual source header file of the same name.
|
|
471
|
+
|
|
472
|
+
This convention only holds when Ceedling is using its default
|
|
473
|
+
tool configurations and / or when tests are involved. If you define
|
|
474
|
+
your own tools in the configuration file (see the [:tools] section
|
|
475
|
+
documented later in this here document), you have complete control
|
|
476
|
+
over what directories are searched and in what order. Further,
|
|
477
|
+
test and support directories are only searched when appropriate.
|
|
478
|
+
That is, when running a release build, test and support directories
|
|
479
|
+
are not used at all.
|
|
480
|
+
|
|
481
|
+
Source Files & Binary Release Artifacts
|
|
481
482
|
---------------------------------------
|
|
482
483
|
|
|
483
|
-
Your binary release artifact results from the compilation and
|
|
484
|
-
linking of all source files Ceedling finds in the specified source
|
|
485
|
-
directories. At present only source files with a single (configurable)
|
|
486
|
-
extension are recognized. That is, *.c and *.cc files will not
|
|
487
|
-
both be recognized - only one or the other. See the configuration
|
|
488
|
-
options and defaults in the documentation for the [:extensions]
|
|
489
|
-
sections of your configuration file (found later in this document).
|
|
484
|
+
Your binary release artifact results from the compilation and
|
|
485
|
+
linking of all source files Ceedling finds in the specified source
|
|
486
|
+
directories. At present only source files with a single (configurable)
|
|
487
|
+
extension are recognized. That is, *.c and *.cc files will not
|
|
488
|
+
both be recognized - only one or the other. See the configuration
|
|
489
|
+
options and defaults in the documentation for the [:extensions]
|
|
490
|
+
sections of your configuration file (found later in this document).
|
|
490
491
|
|
|
491
|
-
Test Files & Executable Test Fixtures
|
|
492
|
+
Test Files & Executable Test Fixtures
|
|
492
493
|
-------------------------------------
|
|
493
494
|
|
|
494
|
-
Ceedling builds each individual test file with its accompanying
|
|
495
|
-
source file(s) into a single, monolithic test fixture executable.
|
|
496
|
-
Test files are recognized by a naming convention: a (configurable)
|
|
497
|
-
prefix such as "`test_`" in the file name with the same file extension
|
|
498
|
-
as used by your C source files. See the configuration options
|
|
499
|
-
and defaults in the documentation for the [:project] and [:extensions]
|
|
500
|
-
sections of your configuration file (found later in this document).
|
|
501
|
-
Depending on your configuration options, Ceedling can recognize
|
|
502
|
-
a variety of test file naming patterns in your test search paths.
|
|
503
|
-
For example: `test_some_super_functionality.c`, `TestYourSourceFile.cc`,
|
|
504
|
-
or `testing_MyAwesomeCode.C` could each be valid test file
|
|
505
|
-
names. Note, however, that Ceedling can recognize only one test
|
|
506
|
-
file naming convention per project.
|
|
507
|
-
|
|
508
|
-
Ceedling knows what files to compile and link into each individual
|
|
509
|
-
test executable by way of the #include list contained in each
|
|
510
|
-
test file. Any C source files in the configured search directories
|
|
511
|
-
that correspond to the header files included in a test file will
|
|
512
|
-
be compiled and linked into the resulting test fixture executable.
|
|
513
|
-
From this same #include list, Ceedling knows which files to mock
|
|
514
|
-
and compile and link into the test executable (if you use mocks
|
|
515
|
-
in your tests). That was a lot of clauses and information in a very
|
|
516
|
-
few sentences; the example that follows in a bit will make it clearer.
|
|
517
|
-
|
|
518
|
-
By naming your test functions according to convention, Ceedling
|
|
519
|
-
will extract and collect into a runner C file calls to all your
|
|
520
|
-
test case functions. This runner file handles all the execution
|
|
521
|
-
minutiae so that your test file can be quite simple and so that
|
|
522
|
-
you never forget to wire up a test function to be executed. In this
|
|
523
|
-
generated runner lives the `main()` entry point for the resulting
|
|
524
|
-
test executable. There are no configuration options for the
|
|
525
|
-
naming convention of your test case functions. A test case function
|
|
526
|
-
signature must have these three elements: void return, void
|
|
527
|
-
parameter list, and the function name prepended with lowercase
|
|
528
|
-
"`test`". In other words, a test function signature should look
|
|
529
|
-
like this: `void test``[any name you like]``(void)`.
|
|
530
|
-
|
|
531
|
-
A commented sample test file follows on the next page. Also, see
|
|
532
|
-
the sample project contained in the Ceedling documentation
|
|
533
|
-
bundle.
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
or
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
the test executable
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
495
|
+
Ceedling builds each individual test file with its accompanying
|
|
496
|
+
source file(s) into a single, monolithic test fixture executable.
|
|
497
|
+
Test files are recognized by a naming convention: a (configurable)
|
|
498
|
+
prefix such as "`test_`" in the file name with the same file extension
|
|
499
|
+
as used by your C source files. See the configuration options
|
|
500
|
+
and defaults in the documentation for the [:project] and [:extensions]
|
|
501
|
+
sections of your configuration file (found later in this document).
|
|
502
|
+
Depending on your configuration options, Ceedling can recognize
|
|
503
|
+
a variety of test file naming patterns in your test search paths.
|
|
504
|
+
For example: `test_some_super_functionality.c`, `TestYourSourceFile.cc`,
|
|
505
|
+
or `testing_MyAwesomeCode.C` could each be valid test file
|
|
506
|
+
names. Note, however, that Ceedling can recognize only one test
|
|
507
|
+
file naming convention per project.
|
|
508
|
+
|
|
509
|
+
Ceedling knows what files to compile and link into each individual
|
|
510
|
+
test executable by way of the #include list contained in each
|
|
511
|
+
test file. Any C source files in the configured search directories
|
|
512
|
+
that correspond to the header files included in a test file will
|
|
513
|
+
be compiled and linked into the resulting test fixture executable.
|
|
514
|
+
From this same #include list, Ceedling knows which files to mock
|
|
515
|
+
and compile and link into the test executable (if you use mocks
|
|
516
|
+
in your tests). That was a lot of clauses and information in a very
|
|
517
|
+
few sentences; the example that follows in a bit will make it clearer.
|
|
518
|
+
|
|
519
|
+
By naming your test functions according to convention, Ceedling
|
|
520
|
+
will extract and collect into a runner C file calls to all your
|
|
521
|
+
test case functions. This runner file handles all the execution
|
|
522
|
+
minutiae so that your test file can be quite simple and so that
|
|
523
|
+
you never forget to wire up a test function to be executed. In this
|
|
524
|
+
generated runner lives the `main()` entry point for the resulting
|
|
525
|
+
test executable. There are no configuration options for the
|
|
526
|
+
naming convention of your test case functions. A test case function
|
|
527
|
+
signature must have these three elements: void return, void
|
|
528
|
+
parameter list, and the function name prepended with lowercase
|
|
529
|
+
"`test`". In other words, a test function signature should look
|
|
530
|
+
like this: `void test``[any name you like]``(void)`.
|
|
531
|
+
|
|
532
|
+
A commented sample test file follows on the next page. Also, see
|
|
533
|
+
the sample project contained in the Ceedling documentation
|
|
534
|
+
bundle.
|
|
535
|
+
|
|
536
|
+
```c
|
|
537
|
+
// test_foo.c -----------------------------------------------
|
|
538
|
+
#include "unity.h" // compile/link in Unity test framework
|
|
539
|
+
#include "types.h" // header file with no *.c file -- no compilation/linking
|
|
540
|
+
#include "foo.h" // source file foo.c under test
|
|
541
|
+
#include "mock_bar.h" // bar.h will be found and mocked as mock_bar.c + compiled/linked in;
|
|
542
|
+
// foo.c includes bar.h and uses functions declared in it
|
|
543
|
+
#include "mock_baz.h" // baz.h will be found and mocked as mock_baz.c + compiled/linked in
|
|
544
|
+
// foo.c includes baz.h and uses functions declared in it
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
void setUp(void) {} // every test file requires this function;
|
|
548
|
+
// setUp() is called by the generated runner before each test case function
|
|
549
|
+
|
|
550
|
+
void tearDown(void) {} // every test file requires this function;
|
|
551
|
+
// tearDown() is called by the generated runner before each test case function
|
|
552
|
+
|
|
553
|
+
// a test case function
|
|
554
|
+
void test_Foo_Function1_should_Call_Bar_AndGrill(void)
|
|
555
|
+
{
|
|
556
|
+
Bar_AndGrill_Expect(); // setup function from mock_bar.c that instructs our
|
|
557
|
+
// framework to expect Bar_AndGrill() to be called once
|
|
558
|
+
TEST_ASSERT_EQUAL(0xFF, Foo_Function1()); // assertion provided by Unity
|
|
559
|
+
// Foo_Function1() calls Bar_AndGrill() & returns a byte
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// another test case function
|
|
563
|
+
void test_Foo_Function2_should_Call_Baz_Tec(void)
|
|
564
|
+
{
|
|
565
|
+
Baz_Tec_ExpectAnd_Return(1); // setup function provided by mock_baz.c that instructs our
|
|
566
|
+
// framework to expect Baz_Tec() to be called once and return 1
|
|
567
|
+
TEST_ASSERT_TRUE(Foo_Function2()); // assertion provided by Unity
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// end of test_foo.c ----------------------------------------
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
From the test file specified above Ceedling will generate `test_foo_runner.c`;
|
|
574
|
+
this runner file will contain `main()` and call both of the example
|
|
575
|
+
test case functions.
|
|
576
|
+
|
|
577
|
+
The final test executable will be `test_foo.exe` (for Windows
|
|
578
|
+
machines or `test_foo.out` for *nix systems - depending on default
|
|
579
|
+
or configured file extensions). Based on the #include list above,
|
|
580
|
+
the test executable will be the output of the linker having processed
|
|
581
|
+
`unity.o`, `foo.o`, `mock_bar.o`, `mock_baz.o`, `test_foo.o`,
|
|
582
|
+
and `test_foo_runner.o`. Ceedling finds the files, generates
|
|
583
|
+
mocks, generates a runner, compiles all the files, and links
|
|
584
|
+
everything into the test executable. Ceedling will then run
|
|
585
|
+
the test executable and collect test results from it to be reported
|
|
586
|
+
to the developer at the command line.
|
|
587
|
+
|
|
588
|
+
For more on the assertions and mocks shown, consult the documentation
|
|
589
|
+
for Unity and CMock.
|
|
590
|
+
|
|
591
|
+
The Magic of Dependency Tracking
|
|
590
592
|
--------------------------------
|
|
591
593
|
|
|
592
|
-
Ceedling is pretty smart in using Rake to build up your project's
|
|
593
|
-
dependencies. This means that Ceedling automagically rebuilds
|
|
594
|
-
all the appropriate files in your project when necessary: when
|
|
595
|
-
your configuration changes, Ceedling or any of the other tools
|
|
596
|
-
are updated, or your source or test files change. For instance,
|
|
597
|
-
if you modify a header file that is mocked, Ceedling will ensure
|
|
598
|
-
that the mock is regenerated and all tests that use that mock are
|
|
599
|
-
rebuilt and re-run when you initiate a relevant testing task.
|
|
600
|
-
When you see things rebuilding, it's for a good reason. Ceedling
|
|
601
|
-
attempts to regenerate and rebuild only what's needed for a given
|
|
602
|
-
execution of a task. In the case of large projects, assembling
|
|
603
|
-
dependencies and acting upon them can cause some delay in executing
|
|
604
|
-
tasks.
|
|
605
|
-
|
|
606
|
-
With one exception, the trigger to rebuild or regenerate a file
|
|
607
|
-
is always a disparity in timestamps between a target file and
|
|
608
|
-
its source - if an input file is newer than its target dependency,
|
|
609
|
-
the target is rebuilt or regenerated. For example, if the C source
|
|
610
|
-
file from which an object file is compiled is newer than that object
|
|
611
|
-
file on disk, recompilation will occur (of course, if no object
|
|
612
|
-
file exists on disk, compilation will always occur). The one
|
|
613
|
-
exception to this dependency behavior is specific to your input
|
|
614
|
-
configuration. Only if your logical configuration changes
|
|
615
|
-
will a system-wide rebuild occur. Reorganizing your input configuration
|
|
616
|
-
or otherwise updating its file timestamp without modifying
|
|
617
|
-
the values within the file will not trigger a rebuild. This behavior
|
|
618
|
-
handles the various ways in which your input configuration can
|
|
619
|
-
change (discussed later in this document) without having changed
|
|
620
|
-
your actual project YAML file.
|
|
621
|
-
|
|
622
|
-
Ceedling needs a bit of help to accomplish its magic with deep
|
|
623
|
-
dependencies. Shallow dependencies are straightforward:
|
|
624
|
-
a mock is dependent on the header file from which it's generated,
|
|
625
|
-
a test file is dependent upon the source files it includes (see
|
|
626
|
-
the preceding conventions section), etc. Ceedling handles
|
|
627
|
-
these "out of the box." Deep dependencies are specifically a
|
|
628
|
-
C-related phenomenon and occur as a consequence of include statements
|
|
629
|
-
within C source files. Say a source file includes a header file
|
|
630
|
-
and that header file in turn includes another header file which
|
|
631
|
-
includes still another header file. A change to the deepest header
|
|
632
|
-
file should trigger a recompilation of the source file, a relinking
|
|
633
|
-
of all the object files comprising a test fixture, and a new execution
|
|
634
|
-
of that test fixture.
|
|
635
|
-
|
|
636
|
-
Ceedling can handle deep dependencies but only with the help
|
|
637
|
-
of a C preprocessor. Ceedling is quite capable, but a full C preprocessor
|
|
638
|
-
it ain't. Your project can be configured to use a C preprocessor
|
|
639
|
-
or not. Simple projects or large projects constructed so as to
|
|
640
|
-
be quite flat in their include structure generally don't need
|
|
641
|
-
deep dependency preprocessing - and can enjoy the benefits of
|
|
642
|
-
faster execution. Legacy code, on the other hand, will almost
|
|
643
|
-
always want to be tested with deep preprocessing enabled. Set
|
|
644
|
-
up of the C preprocessor is covered in the documentation for the
|
|
645
|
-
[:project] and [:tools] section of the configuration file (later
|
|
646
|
-
in this document). Ceedling contains all the configuration
|
|
647
|
-
necessary to use the gcc preprocessor by default. That is, as
|
|
648
|
-
long as gcc is in your system search path, deep preprocessing
|
|
649
|
-
of deep dependencies is available to you by simply enabling it
|
|
650
|
-
in your project configuration file.
|
|
651
|
-
|
|
652
|
-
Ceedling's Build Output
|
|
594
|
+
Ceedling is pretty smart in using Rake to build up your project's
|
|
595
|
+
dependencies. This means that Ceedling automagically rebuilds
|
|
596
|
+
all the appropriate files in your project when necessary: when
|
|
597
|
+
your configuration changes, Ceedling or any of the other tools
|
|
598
|
+
are updated, or your source or test files change. For instance,
|
|
599
|
+
if you modify a header file that is mocked, Ceedling will ensure
|
|
600
|
+
that the mock is regenerated and all tests that use that mock are
|
|
601
|
+
rebuilt and re-run when you initiate a relevant testing task.
|
|
602
|
+
When you see things rebuilding, it's for a good reason. Ceedling
|
|
603
|
+
attempts to regenerate and rebuild only what's needed for a given
|
|
604
|
+
execution of a task. In the case of large projects, assembling
|
|
605
|
+
dependencies and acting upon them can cause some delay in executing
|
|
606
|
+
tasks.
|
|
607
|
+
|
|
608
|
+
With one exception, the trigger to rebuild or regenerate a file
|
|
609
|
+
is always a disparity in timestamps between a target file and
|
|
610
|
+
its source - if an input file is newer than its target dependency,
|
|
611
|
+
the target is rebuilt or regenerated. For example, if the C source
|
|
612
|
+
file from which an object file is compiled is newer than that object
|
|
613
|
+
file on disk, recompilation will occur (of course, if no object
|
|
614
|
+
file exists on disk, compilation will always occur). The one
|
|
615
|
+
exception to this dependency behavior is specific to your input
|
|
616
|
+
configuration. Only if your logical configuration changes
|
|
617
|
+
will a system-wide rebuild occur. Reorganizing your input configuration
|
|
618
|
+
or otherwise updating its file timestamp without modifying
|
|
619
|
+
the values within the file will not trigger a rebuild. This behavior
|
|
620
|
+
handles the various ways in which your input configuration can
|
|
621
|
+
change (discussed later in this document) without having changed
|
|
622
|
+
your actual project YAML file.
|
|
623
|
+
|
|
624
|
+
Ceedling needs a bit of help to accomplish its magic with deep
|
|
625
|
+
dependencies. Shallow dependencies are straightforward:
|
|
626
|
+
a mock is dependent on the header file from which it's generated,
|
|
627
|
+
a test file is dependent upon the source files it includes (see
|
|
628
|
+
the preceding conventions section), etc. Ceedling handles
|
|
629
|
+
these "out of the box." Deep dependencies are specifically a
|
|
630
|
+
C-related phenomenon and occur as a consequence of include statements
|
|
631
|
+
within C source files. Say a source file includes a header file
|
|
632
|
+
and that header file in turn includes another header file which
|
|
633
|
+
includes still another header file. A change to the deepest header
|
|
634
|
+
file should trigger a recompilation of the source file, a relinking
|
|
635
|
+
of all the object files comprising a test fixture, and a new execution
|
|
636
|
+
of that test fixture.
|
|
637
|
+
|
|
638
|
+
Ceedling can handle deep dependencies but only with the help
|
|
639
|
+
of a C preprocessor. Ceedling is quite capable, but a full C preprocessor
|
|
640
|
+
it ain't. Your project can be configured to use a C preprocessor
|
|
641
|
+
or not. Simple projects or large projects constructed so as to
|
|
642
|
+
be quite flat in their include structure generally don't need
|
|
643
|
+
deep dependency preprocessing - and can enjoy the benefits of
|
|
644
|
+
faster execution. Legacy code, on the other hand, will almost
|
|
645
|
+
always want to be tested with deep preprocessing enabled. Set
|
|
646
|
+
up of the C preprocessor is covered in the documentation for the
|
|
647
|
+
[:project] and [:tools] section of the configuration file (later
|
|
648
|
+
in this document). Ceedling contains all the configuration
|
|
649
|
+
necessary to use the gcc preprocessor by default. That is, as
|
|
650
|
+
long as gcc is in your system search path, deep preprocessing
|
|
651
|
+
of deep dependencies is available to you by simply enabling it
|
|
652
|
+
in your project configuration file.
|
|
653
|
+
|
|
654
|
+
Ceedling's Build Output
|
|
653
655
|
-----------------------
|
|
654
656
|
|
|
655
|
-
Ceedling requires a top-level build directory for all the stuff
|
|
656
|
-
that it, the accompanying test tools, and your toolchain generate.
|
|
657
|
-
That build directory's location is configured in the [:project]
|
|
658
|
-
section of your configuration file (discussed later). There
|
|
659
|
-
can be a ton of generated files. By and large, you can live a full
|
|
660
|
-
and meaningful life knowing absolutely nothing at all about
|
|
661
|
-
the files and directories generated below the root build directory.
|
|
662
|
-
|
|
663
|
-
As noted already, it's good practice to add your top-level build
|
|
664
|
-
directory to source control but nothing generated beneath it.
|
|
665
|
-
You'll spare yourself headache if you let Ceedling delete and
|
|
666
|
-
regenerate files and directories in a non-versioned corner
|
|
667
|
-
of your project's filesystem beneath the top-level build directory.
|
|
668
|
-
|
|
669
|
-
The `artifacts` directory is the one and only directory you may
|
|
670
|
-
want to know about beneath the top-level build directory. The
|
|
671
|
-
subdirectories beneath `artifacts` will hold your binary release
|
|
672
|
-
target output (if your project is configured for release builds)
|
|
673
|
-
and will serve as the conventional location for plugin output.
|
|
674
|
-
This directory structure was chosen specifically because it
|
|
675
|
-
tends to work nicely with Continuous Integration setups that
|
|
676
|
-
recognize and list build artifacts for retrieval / download.
|
|
677
|
-
|
|
678
|
-
The Almighty Project Configuration File (in Glorious YAML)
|
|
657
|
+
Ceedling requires a top-level build directory for all the stuff
|
|
658
|
+
that it, the accompanying test tools, and your toolchain generate.
|
|
659
|
+
That build directory's location is configured in the [:project]
|
|
660
|
+
section of your configuration file (discussed later). There
|
|
661
|
+
can be a ton of generated files. By and large, you can live a full
|
|
662
|
+
and meaningful life knowing absolutely nothing at all about
|
|
663
|
+
the files and directories generated below the root build directory.
|
|
664
|
+
|
|
665
|
+
As noted already, it's good practice to add your top-level build
|
|
666
|
+
directory to source control but nothing generated beneath it.
|
|
667
|
+
You'll spare yourself headache if you let Ceedling delete and
|
|
668
|
+
regenerate files and directories in a non-versioned corner
|
|
669
|
+
of your project's filesystem beneath the top-level build directory.
|
|
670
|
+
|
|
671
|
+
The `artifacts` directory is the one and only directory you may
|
|
672
|
+
want to know about beneath the top-level build directory. The
|
|
673
|
+
subdirectories beneath `artifacts` will hold your binary release
|
|
674
|
+
target output (if your project is configured for release builds)
|
|
675
|
+
and will serve as the conventional location for plugin output.
|
|
676
|
+
This directory structure was chosen specifically because it
|
|
677
|
+
tends to work nicely with Continuous Integration setups that
|
|
678
|
+
recognize and list build artifacts for retrieval / download.
|
|
679
|
+
|
|
680
|
+
The Almighty Project Configuration File (in Glorious YAML)
|
|
679
681
|
----------------------------------------------------------
|
|
680
682
|
|
|
681
|
-
Please consult YAML documentation for the finer points of format
|
|
682
|
-
and to understand details of our YAML-based configuration file.
|
|
683
|
-
We recommend [Wikipedia's entry on YAML](http://en.wikipedia.org/wiki/Yaml)
|
|
684
|
-
for this. A few highlights from that reference page:
|
|
683
|
+
Please consult YAML documentation for the finer points of format
|
|
684
|
+
and to understand details of our YAML-based configuration file.
|
|
685
|
+
We recommend [Wikipedia's entry on YAML](http://en.wikipedia.org/wiki/Yaml)
|
|
686
|
+
for this. A few highlights from that reference page:
|
|
685
687
|
|
|
686
|
-
* YAML streams are encoded using the set of printable Unicode
|
|
687
|
-
characters, either in UTF-8 or UTF-16
|
|
688
|
+
* YAML streams are encoded using the set of printable Unicode
|
|
689
|
+
characters, either in UTF-8 or UTF-16
|
|
688
690
|
|
|
689
|
-
* Whitespace indentation is used to denote structure; however
|
|
690
|
-
tab characters are never allowed as indentation
|
|
691
|
+
* Whitespace indentation is used to denote structure; however
|
|
692
|
+
tab characters are never allowed as indentation
|
|
691
693
|
|
|
692
|
-
* Comments begin with the number sign ( # ), can start anywhere
|
|
693
|
-
on a line, and continue until the end of the line unless enclosed
|
|
694
|
-
by quotes
|
|
694
|
+
* Comments begin with the number sign ( # ), can start anywhere
|
|
695
|
+
on a line, and continue until the end of the line unless enclosed
|
|
696
|
+
by quotes
|
|
695
697
|
|
|
696
|
-
* List members are denoted by a leading hyphen ( - ) with one member
|
|
697
|
-
per line, or enclosed in square brackets ( [ ] ) and separated
|
|
698
|
-
by comma space ( , )
|
|
698
|
+
* List members are denoted by a leading hyphen ( - ) with one member
|
|
699
|
+
per line, or enclosed in square brackets ( [ ] ) and separated
|
|
700
|
+
by comma space ( , )
|
|
699
701
|
|
|
700
|
-
* Hashes are represented using the colon space ( : ) in the form
|
|
701
|
-
key: value, either one per line or enclosed in curly braces
|
|
702
|
-
( { } ) and separated by comma space ( , )
|
|
702
|
+
* Hashes are represented using the colon space ( : ) in the form
|
|
703
|
+
key: value, either one per line or enclosed in curly braces
|
|
704
|
+
( { } ) and separated by comma space ( , )
|
|
703
705
|
|
|
704
|
-
* Strings (scalars) are ordinarily unquoted, but may be enclosed
|
|
705
|
-
in double-quotes ( " ), or single-quotes ( ' )
|
|
706
|
+
* Strings (scalars) are ordinarily unquoted, but may be enclosed
|
|
707
|
+
in double-quotes ( " ), or single-quotes ( ' )
|
|
706
708
|
|
|
707
|
-
* YAML requires that colons and commas used as list separators
|
|
708
|
-
be followed by a space so that scalar values containing embedded
|
|
709
|
-
punctuation can generally be represented without needing
|
|
710
|
-
to be enclosed in quotes
|
|
709
|
+
* YAML requires that colons and commas used as list separators
|
|
710
|
+
be followed by a space so that scalar values containing embedded
|
|
711
|
+
punctuation can generally be represented without needing
|
|
712
|
+
to be enclosed in quotes
|
|
711
713
|
|
|
712
|
-
* Repeated nodes are initially denoted by an ampersand ( & ) and
|
|
713
|
-
thereafter referenced with an asterisk ( * )
|
|
714
|
+
* Repeated nodes are initially denoted by an ampersand ( & ) and
|
|
715
|
+
thereafter referenced with an asterisk ( * )
|
|
714
716
|
|
|
715
717
|
|
|
718
|
+
Notes on what follows:
|
|
716
719
|
|
|
717
|
-
|
|
720
|
+
* Each of the following sections represent top-level entries
|
|
721
|
+
in the YAML configuration file.
|
|
718
722
|
|
|
719
|
-
*
|
|
720
|
-
|
|
723
|
+
* Unless explicitly specified in the configuration file, default
|
|
724
|
+
values are used by Ceedling.
|
|
721
725
|
|
|
722
|
-
*
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
* These three settings, at minimum, must be specified:
|
|
726
|
-
* [:project][:build_root]
|
|
726
|
+
* These three settings, at minimum, must be specified:
|
|
727
|
+
* [:project][:build_root]
|
|
727
728
|
* [:paths][:source]
|
|
728
729
|
* [:paths][:test]
|
|
729
730
|
|
|
730
|
-
* As much as is possible, Ceedling validates your settings in
|
|
731
|
-
properly formed YAML.
|
|
732
|
-
|
|
733
|
-
* Improperly formed YAML will cause a Ruby error when the YAML
|
|
734
|
-
is parsed. This is usually accompanied by a complaint with
|
|
735
|
-
line and column number pointing into the project file.
|
|
731
|
+
* As much as is possible, Ceedling validates your settings in
|
|
732
|
+
properly formed YAML.
|
|
736
733
|
|
|
737
|
-
*
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
(Minimalist GNU for Windows).
|
|
734
|
+
* Improperly formed YAML will cause a Ruby error when the YAML
|
|
735
|
+
is parsed. This is usually accompanied by a complaint with
|
|
736
|
+
line and column number pointing into the project file.
|
|
741
737
|
|
|
742
|
-
*
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
of Ceedling itself is skewed towards supporting testing though
|
|
747
|
-
Ceedling can, of course, build your binary release artifact
|
|
748
|
-
as well. Note that complex binary release artifacts (e.g.
|
|
749
|
-
application + bootloader or multiple libraries) are beyond
|
|
750
|
-
Ceedling's release build ability.
|
|
738
|
+
* Certain advanced features rely on gcc and cpp as preprocessing
|
|
739
|
+
tools. In most *nix systems, these tools are already available.
|
|
740
|
+
For Windows environments, we recommend the [mingw project](http://www.mingw.org/)
|
|
741
|
+
(Minimalist GNU for Windows).
|
|
751
742
|
|
|
743
|
+
* Ceedling is primarily meant as a build tool to support automated
|
|
744
|
+
unit testing. All the heavy lifting is involved there. Creating
|
|
745
|
+
a simple binary release build artifact is quite trivial in
|
|
746
|
+
comparison. Consequently, most default options and the construction
|
|
747
|
+
of Ceedling itself is skewed towards supporting testing though
|
|
748
|
+
Ceedling can, of course, build your binary release artifact
|
|
749
|
+
as well. Note that complex binary release artifacts (e.g.
|
|
750
|
+
application + bootloader or multiple libraries) are beyond
|
|
751
|
+
Ceedling's release build ability.
|
|
752
752
|
|
|
753
|
-
Conventions / features of Ceedling-specific YAML:
|
|
754
753
|
|
|
755
|
-
|
|
756
|
-
in `_path` or `_paths` are automagically processed like all
|
|
757
|
-
Ceedling-specific paths in the YAML to have consistent directory
|
|
758
|
-
separators (i.e. "/") and to take advantage of inline Ruby
|
|
759
|
-
string expansion (see [:environment] setting below for further
|
|
760
|
-
explanation of string expansion).
|
|
754
|
+
Conventions / features of Ceedling-specific YAML:
|
|
761
755
|
|
|
756
|
+
* Any second tier setting keys anywhere in YAML whose names end
|
|
757
|
+
in `_path` or `_paths` are automagically processed like all
|
|
758
|
+
Ceedling-specific paths in the YAML to have consistent directory
|
|
759
|
+
separators (i.e. "/") and to take advantage of inline Ruby
|
|
760
|
+
string expansion (see [:environment] setting below for further
|
|
761
|
+
explanation of string expansion).
|
|
762
762
|
|
|
763
763
|
|
|
764
|
-
**Let's Be Careful Out There:** Ceedling performs validation
|
|
765
|
-
on the values you set in your configuration file (this assumes
|
|
766
|
-
your YAML is correct and will not fail format parsing, of course).
|
|
767
|
-
That said, validation is limited to only those settings Ceedling
|
|
768
|
-
uses and those that can be reasonably validated. Ceedling does
|
|
769
|
-
not limit what can exist within your configuration file. In this
|
|
770
|
-
way, you can take full advantage of YAML as well as add sections
|
|
771
|
-
and values for use in your own custom plugins (documented later).
|
|
772
|
-
The consequence of this is simple but important. A misspelled
|
|
773
|
-
configuration section name or value name is unlikely to cause
|
|
774
|
-
Ceedling any trouble. Ceedling will happily process that section
|
|
775
|
-
or value and simply use the properly spelled default maintained
|
|
776
|
-
internally - thus leading to unexpected behavior without warning.
|
|
764
|
+
**Let's Be Careful Out There:** Ceedling performs validation
|
|
765
|
+
on the values you set in your configuration file (this assumes
|
|
766
|
+
your YAML is correct and will not fail format parsing, of course).
|
|
767
|
+
That said, validation is limited to only those settings Ceedling
|
|
768
|
+
uses and those that can be reasonably validated. Ceedling does
|
|
769
|
+
not limit what can exist within your configuration file. In this
|
|
770
|
+
way, you can take full advantage of YAML as well as add sections
|
|
771
|
+
and values for use in your own custom plugins (documented later).
|
|
772
|
+
The consequence of this is simple but important. A misspelled
|
|
773
|
+
configuration section name or value name is unlikely to cause
|
|
774
|
+
Ceedling any trouble. Ceedling will happily process that section
|
|
775
|
+
or value and simply use the properly spelled default maintained
|
|
776
|
+
internally - thus leading to unexpected behavior without warning.
|
|
777
777
|
|
|
778
|
-
project: global project settings
|
|
778
|
+
project: global project settings
|
|
779
779
|
|
|
780
780
|
|
|
781
781
|
* `build_root`:
|
|
@@ -809,14 +809,14 @@ project: global project settings
|
|
|
809
809
|
conditional compilation statements (e.g. #ifdef) and header files you
|
|
810
810
|
wish to mock that contain conditional preprocessor statements and/or
|
|
811
811
|
macros.
|
|
812
|
-
|
|
812
|
+
|
|
813
813
|
Ceedling and CMock are advanced tools with sophisticated parsers.
|
|
814
814
|
However, they do not include entire C language preprocessors.
|
|
815
815
|
Consequently, with this option enabled, Ceedling will use gcc's
|
|
816
816
|
preprocessing mode and the cpp preprocessor tool to strip down /
|
|
817
817
|
expand test files and headers to their applicable content which can
|
|
818
818
|
then be processed by Ceedling and CMock.
|
|
819
|
-
|
|
819
|
+
|
|
820
820
|
With this option enabled, the gcc & cpp tools must exist in an
|
|
821
821
|
accessible system search path and test runner files are always
|
|
822
822
|
regenerated.
|
|
@@ -833,7 +833,7 @@ project: global project settings
|
|
|
833
833
|
changes in a header file three levels of #include statements deep,
|
|
834
834
|
this option allows the appropriate incremental build actions to occur
|
|
835
835
|
for both test execution and release builds.
|
|
836
|
-
|
|
836
|
+
|
|
837
837
|
This is accomplished by using the dependencies discovery mode of gcc.
|
|
838
838
|
With this option enabled, gcc must exist in an accessible system
|
|
839
839
|
search path.
|
|
@@ -845,7 +845,7 @@ project: global project settings
|
|
|
845
845
|
Ceedling collects test files by convention from within the test file
|
|
846
846
|
search paths. The convention includes a unique name prefix and a file
|
|
847
847
|
extension matching that of source files.
|
|
848
|
-
|
|
848
|
+
|
|
849
849
|
Why not simply recognize all files in test directories as test files?
|
|
850
850
|
By using the given convention, we have greater flexibility in what we
|
|
851
851
|
do with C files in the test directories.
|
|
@@ -856,13 +856,13 @@ project: global project settings
|
|
|
856
856
|
|
|
857
857
|
Just as you may have various build configurations for your source
|
|
858
858
|
codebase, you may need variations of your project configuration.
|
|
859
|
-
|
|
859
|
+
|
|
860
860
|
By specifying options paths, Ceedling will search for other project
|
|
861
|
-
YAML files, make command line tasks available (
|
|
861
|
+
YAML files, make command line tasks available (ceedling options:variation
|
|
862
862
|
for a variation.yml file), and merge the project configuration of
|
|
863
863
|
these option files in with the main project file at runtime. See
|
|
864
864
|
advanced topics.
|
|
865
|
-
|
|
865
|
+
|
|
866
866
|
Note these Rake tasks at the command line - like verbosity or logging
|
|
867
867
|
control - must come before the test or release task they are meant to
|
|
868
868
|
modify.
|
|
@@ -874,30 +874,32 @@ project: global project settings
|
|
|
874
874
|
When enabled, a release Rake task is exposed. This configuration
|
|
875
875
|
option requires a corresponding release compiler and linker to be
|
|
876
876
|
defined (gcc is used as the default).
|
|
877
|
-
|
|
877
|
+
|
|
878
878
|
More release configuration options are available in the release_build
|
|
879
879
|
section.
|
|
880
880
|
|
|
881
881
|
**Default**: FALSE
|
|
882
882
|
|
|
883
883
|
|
|
884
|
-
Example `[:project]` YAML blurb
|
|
884
|
+
Example `[:project]` YAML blurb
|
|
885
885
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
886
|
+
```yaml
|
|
887
|
+
:project:
|
|
888
|
+
:build_root: project_awesome/build
|
|
889
|
+
:use_exceptions: FALSE
|
|
890
|
+
:use_test_preprocessor: TRUE
|
|
891
|
+
:use_deep_dependencies: TRUE
|
|
892
|
+
:options_paths:
|
|
893
|
+
- project/options
|
|
894
|
+
- external/shared/options
|
|
895
|
+
:release_build: TRUE
|
|
896
|
+
```
|
|
895
897
|
|
|
896
|
-
Ceedling is primarily concerned with facilitating the somewhat
|
|
897
|
-
complicated mechanics of automating unit tests. The same mechanisms
|
|
898
|
-
are easily capable of building a final release binary artifact
|
|
899
|
-
(i.e. non test code; the thing that is your final working software
|
|
900
|
-
that you execute on target hardware).
|
|
898
|
+
Ceedling is primarily concerned with facilitating the somewhat
|
|
899
|
+
complicated mechanics of automating unit tests. The same mechanisms
|
|
900
|
+
are easily capable of building a final release binary artifact
|
|
901
|
+
(i.e. non test code; the thing that is your final working software
|
|
902
|
+
that you execute on target hardware).
|
|
901
903
|
|
|
902
904
|
|
|
903
905
|
* `output`:
|
|
@@ -934,18 +936,18 @@ that you execute on target hardware).
|
|
|
934
936
|
|
|
935
937
|
**Default**: [] (empty)
|
|
936
938
|
|
|
937
|
-
Example `[:release_build]` YAML blurb
|
|
938
|
-
|
|
939
|
-
:release_build:
|
|
940
|
-
:output: top_secret.bin
|
|
941
|
-
:use_assembly: TRUE
|
|
942
|
-
:artifacts:
|
|
943
|
-
- build/release/out/c/top_secret.s19
|
|
944
|
-
|
|
945
|
-
**paths**: options controlling search paths for source and header
|
|
946
|
-
(and assembly) files
|
|
939
|
+
Example `[:release_build]` YAML blurb
|
|
947
940
|
|
|
941
|
+
```yaml
|
|
942
|
+
:release_build:
|
|
943
|
+
:output: top_secret.bin
|
|
944
|
+
:use_assembly: TRUE
|
|
945
|
+
:artifacts:
|
|
946
|
+
- build/release/out/c/top_secret.s19
|
|
947
|
+
```
|
|
948
948
|
|
|
949
|
+
**paths**: options controlling search paths for source and header
|
|
950
|
+
(and assembly) files
|
|
949
951
|
|
|
950
952
|
* `test`:
|
|
951
953
|
|
|
@@ -996,7 +998,7 @@ Example `[:release_build]` YAML blurb
|
|
|
996
998
|
* `release_toolchain_include`:
|
|
997
999
|
|
|
998
1000
|
Same as preceding albeit related to the release toolchain.
|
|
999
|
-
|
|
1001
|
+
|
|
1000
1002
|
**Default**: [] (empty)
|
|
1001
1003
|
|
|
1002
1004
|
* `<custom>`
|
|
@@ -1007,7 +1009,7 @@ Example `[:release_build]` YAML blurb
|
|
|
1007
1009
|
build collections of files contained in those paths. A custom list is
|
|
1008
1010
|
just that - a custom list of paths.
|
|
1009
1011
|
|
|
1010
|
-
Notes on path grammar within the [:paths] section:
|
|
1012
|
+
Notes on path grammar within the [:paths] section:
|
|
1011
1013
|
|
|
1012
1014
|
* Order of search paths listed in [:paths] is preserved when used by an
|
|
1013
1015
|
entry in the [:tools] section
|
|
@@ -1021,44 +1023,44 @@ Notes on path grammar within the [:paths] section:
|
|
|
1021
1023
|
|
|
1022
1024
|
* Paths:
|
|
1023
1025
|
|
|
1024
|
-
1. can be absolute or relative
|
|
1026
|
+
1. can be absolute or relative
|
|
1025
1027
|
|
|
1026
|
-
2. can be singly explicit - a single fully specified path
|
|
1028
|
+
2. can be singly explicit - a single fully specified path
|
|
1027
1029
|
|
|
1028
|
-
3. can include a glob operator (more on this below)
|
|
1030
|
+
3. can include a glob operator (more on this below)
|
|
1029
1031
|
|
|
1030
|
-
4. can use inline Ruby string replacement (see [:environment]
|
|
1031
|
-
section for more)
|
|
1032
|
+
4. can use inline Ruby string replacement (see [:environment]
|
|
1033
|
+
section for more)
|
|
1032
1034
|
|
|
1033
|
-
5. default as an addition to a specific search list (more on this
|
|
1034
|
-
in the examples)
|
|
1035
|
+
5. default as an addition to a specific search list (more on this
|
|
1036
|
+
in the examples)
|
|
1035
1037
|
|
|
1036
|
-
6. can act to subtract from a glob included in the path list (more
|
|
1037
|
-
on this in the examples)
|
|
1038
|
+
6. can act to subtract from a glob included in the path list (more
|
|
1039
|
+
on this in the examples)
|
|
1038
1040
|
|
|
1039
1041
|
|
|
1040
|
-
[Globs](http://ruby.about.com/od/beginningruby/a/dir2.htm)
|
|
1041
|
-
as used by Ceedling are wildcards for specifying directories
|
|
1042
|
-
without the need to list each and every required search path.
|
|
1043
|
-
Ceedling globs operate just as Ruby globs except that they are
|
|
1044
|
-
limited to matching directories and not files. Glob operators
|
|
1045
|
-
include the following * ** ? [-] {,} (note: this list is space separated
|
|
1046
|
-
and not comma separated as commas are used within the bracket
|
|
1047
|
-
operators).
|
|
1042
|
+
[Globs](http://ruby.about.com/od/beginningruby/a/dir2.htm)
|
|
1043
|
+
as used by Ceedling are wildcards for specifying directories
|
|
1044
|
+
without the need to list each and every required search path.
|
|
1045
|
+
Ceedling globs operate just as Ruby globs except that they are
|
|
1046
|
+
limited to matching directories and not files. Glob operators
|
|
1047
|
+
include the following * ** ? [-] {,} (note: this list is space separated
|
|
1048
|
+
and not comma separated as commas are used within the bracket
|
|
1049
|
+
operators).
|
|
1048
1050
|
|
|
1049
|
-
*
|
|
1051
|
+
* `*`:
|
|
1050
1052
|
|
|
1051
1053
|
All subdirectories of depth 1 below the parent path and including the
|
|
1052
1054
|
parent path
|
|
1053
1055
|
|
|
1054
|
-
*
|
|
1056
|
+
* `**`:
|
|
1055
1057
|
|
|
1056
1058
|
All subdirectories recursively discovered below the parent path and
|
|
1057
1059
|
including the parent path
|
|
1058
1060
|
|
|
1059
|
-
*
|
|
1061
|
+
* `?`:
|
|
1060
1062
|
|
|
1061
|
-
Single alphanumeric character wildcard
|
|
1063
|
+
Single alphanumeric character wildcard
|
|
1062
1064
|
|
|
1063
1065
|
* `[x-y]`:
|
|
1064
1066
|
|
|
@@ -1066,41 +1068,43 @@ operators).
|
|
|
1066
1068
|
|
|
1067
1069
|
* `{x,y}`:
|
|
1068
1070
|
|
|
1069
|
-
Single alphanumeric character from the specified list
|
|
1070
|
-
|
|
1071
|
-
Example [:paths] YAML blurbs
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
your
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
from
|
|
1071
|
+
Single alphanumeric character from the specified list
|
|
1072
|
+
|
|
1073
|
+
Example [:paths] YAML blurbs
|
|
1074
|
+
|
|
1075
|
+
```yaml
|
|
1076
|
+
:paths:
|
|
1077
|
+
:source: #together the following comprise all source search paths
|
|
1078
|
+
- project/source/* #expansion yields all subdirectories of depth 1 plus parent directory
|
|
1079
|
+
- project/lib #single path
|
|
1080
|
+
:test: #all test search paths
|
|
1081
|
+
- project/**/test? #expansion yields any subdirectory found anywhere in the project that
|
|
1082
|
+
#begins with "test" and contains 5 characters
|
|
1083
|
+
|
|
1084
|
+
:paths:
|
|
1085
|
+
:source: #all source search paths
|
|
1086
|
+
- +:project/source/** #all subdirectories recursively discovered plus parent directory
|
|
1087
|
+
- -:project/source/os/generated #subtract os/generated directory from expansion of above glob
|
|
1088
|
+
#note that '+:' notation is merely aesthetic; default is to add
|
|
1089
|
+
|
|
1090
|
+
:test: #all test search paths
|
|
1091
|
+
- project/test/bootloader #explicit, single search paths (searched in the order specified)
|
|
1092
|
+
- project/test/application
|
|
1093
|
+
- project/test/utilities
|
|
1094
|
+
|
|
1095
|
+
:custom: #custom path list
|
|
1096
|
+
- "#{PROJECT_ROOT}/other" #inline Ruby string expansion
|
|
1097
|
+
```
|
|
1098
|
+
|
|
1099
|
+
Globs and inline Ruby string expansion can require trial and
|
|
1100
|
+
error to arrive at your intended results. Use the `ceedling paths:*`
|
|
1101
|
+
command line options (documented in preceding section) to verify
|
|
1102
|
+
your settings.
|
|
1103
|
+
|
|
1104
|
+
Ceedling relies on file collections automagically assembled
|
|
1105
|
+
from paths, globs, and file extensions. File collections greatly
|
|
1106
|
+
simplify project set up. However, sometimes you need to remove
|
|
1107
|
+
from or add individual files to those collections.
|
|
1104
1108
|
|
|
1105
1109
|
|
|
1106
1110
|
* `test`:
|
|
@@ -1134,67 +1138,69 @@ from or add individual files to those collections.
|
|
|
1134
1138
|
**Default**: [] (empty)
|
|
1135
1139
|
|
|
1136
1140
|
|
|
1137
|
-
Note: All path grammar documented in [:paths] section applies
|
|
1138
|
-
to [:files] path entries - albeit at the file path level and not
|
|
1139
|
-
the directory level.
|
|
1140
|
-
|
|
1141
|
-
Example [:files] YAML blurb
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1141
|
+
Note: All path grammar documented in [:paths] section applies
|
|
1142
|
+
to [:files] path entries - albeit at the file path level and not
|
|
1143
|
+
the directory level.
|
|
1144
|
+
|
|
1145
|
+
Example [:files] YAML blurb
|
|
1146
|
+
|
|
1147
|
+
```yaml
|
|
1148
|
+
:files:
|
|
1149
|
+
:source:
|
|
1150
|
+
- callbacks/comm.c # entry defaults to file addition
|
|
1151
|
+
- +:callbacks/comm*.c # add all comm files matching glob pattern
|
|
1152
|
+
- -:source/board/atm134.c # not our board
|
|
1153
|
+
:test:
|
|
1154
|
+
- -:test/io/test_output_manager.c # remove unit tests from test build
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
**environment:** inserts environment variables into the shell
|
|
1158
|
+
instance executing configured tools
|
|
1159
|
+
|
|
1160
|
+
Ceedling creates environment variables from any key / value
|
|
1161
|
+
pairs in the environment section. Keys become an environment
|
|
1162
|
+
variable name in uppercase. The values are strings assigned
|
|
1163
|
+
to those environment variables. These value strings are either
|
|
1164
|
+
simple string values in YAML or the concatenation of a YAML array.
|
|
1165
|
+
|
|
1166
|
+
Ceedling is able to execute inline Ruby string substitution
|
|
1167
|
+
code to set environment variables. This evaluation occurs when
|
|
1168
|
+
the project file is first processed for any environment pair's
|
|
1169
|
+
value string including the Ruby string substitution pattern
|
|
1170
|
+
`#{…}`. Note that environment value strings that _begin_ with
|
|
1171
|
+
this pattern should always be enclosed in quotes. YAML defaults
|
|
1172
|
+
to processing unquoted text as a string; quoting text is optional.
|
|
1173
|
+
If an environment pair's value string begins with the Ruby string
|
|
1174
|
+
substitution pattern, YAML will interpret the string as a Ruby
|
|
1175
|
+
comment (because of the `#`). Enclosing each environment value
|
|
1176
|
+
string in quotes is a safe practice.
|
|
1177
|
+
|
|
1178
|
+
[:environment] entries are processed in the configured order
|
|
1179
|
+
(later entries can reference earlier entries).
|
|
1180
|
+
|
|
1181
|
+
Special case: PATH handling
|
|
1182
|
+
|
|
1183
|
+
In the specific case of specifying an environment key named _path_,
|
|
1184
|
+
an array of string values will be concatenated with the appropriate
|
|
1185
|
+
platform-specific path separation character (e.g. ':' on *nix,
|
|
1186
|
+
';' on Windows). All other instances of environment keys assigned
|
|
1187
|
+
YAML arrays use simple concatenation.
|
|
1188
|
+
|
|
1189
|
+
Example [:environment] YAML blurb
|
|
1190
|
+
|
|
1191
|
+
```yaml
|
|
1192
|
+
:environment:
|
|
1193
|
+
- :license_server: gizmo.intranet #LICENSE_SERVER set with value "gizmo.intranet"
|
|
1194
|
+
- :license: "#{`license.exe`}" #LICENSE set to string generated from shelling out to
|
|
1195
|
+
#execute license.exe; note use of enclosing quotes
|
|
1196
|
+
|
|
1197
|
+
- :path: #concatenated with path separator (see special case above)
|
|
1198
|
+
- Tools/gizmo/bin #prepend existing PATH with gizmo path
|
|
1199
|
+
- "#{ENV['PATH']}" #pattern #{…} triggers ruby evaluation string substitution
|
|
1200
|
+
#note: value string must be quoted because of '#'
|
|
1201
|
+
|
|
1202
|
+
- :logfile: system/logs/thingamabob.log #LOGFILE set with path for a log file
|
|
1203
|
+
```
|
|
1198
1204
|
|
|
1199
1205
|
**extension**: configure file name extensions used to collect lists of files searched in [:paths]
|
|
1200
1206
|
|
|
@@ -1227,7 +1233,7 @@ Example [:environment] YAML blurb
|
|
|
1227
1233
|
Binary executable to be loaded and executed upon target hardware
|
|
1228
1234
|
|
|
1229
1235
|
**Default**: .exe or .out (Win or *nix)
|
|
1230
|
-
|
|
1236
|
+
|
|
1231
1237
|
* `testpass`:
|
|
1232
1238
|
|
|
1233
1239
|
Test results file (not likely to ever need a new value)
|
|
@@ -1247,7 +1253,7 @@ Example [:environment] YAML blurb
|
|
|
1247
1253
|
**Default**: .d
|
|
1248
1254
|
|
|
1249
1255
|
|
|
1250
|
-
Example [:extension] YAML blurb
|
|
1256
|
+
Example [:extension] YAML blurb
|
|
1251
1257
|
|
|
1252
1258
|
:extension:
|
|
1253
1259
|
:source: .cc
|
|
@@ -1258,10 +1264,10 @@ Example [:extension] YAML blurb
|
|
|
1258
1264
|
* `test`:
|
|
1259
1265
|
|
|
1260
1266
|
Defines needed for testing. Useful for:
|
|
1261
|
-
|
|
1267
|
+
|
|
1262
1268
|
1. test files containing conditional compilation statements (i.e.
|
|
1263
1269
|
tests active in only certain contexts)
|
|
1264
|
-
|
|
1270
|
+
|
|
1265
1271
|
2. testing legacy source wherein the isolation of source under test
|
|
1266
1272
|
afforded by Ceedling and its complementary tools leaves certain
|
|
1267
1273
|
symbols unset when source files are compiled in isolation
|
|
@@ -1281,7 +1287,7 @@ Example [:extension] YAML blurb
|
|
|
1281
1287
|
* `release`:
|
|
1282
1288
|
|
|
1283
1289
|
Defines needed for the release build binary artifact.
|
|
1284
|
-
|
|
1290
|
+
|
|
1285
1291
|
**Default**: [] (empty)
|
|
1286
1292
|
|
|
1287
1293
|
* `release_preprocess`:
|
|
@@ -1290,20 +1296,22 @@ Example [:extension] YAML blurb
|
|
|
1290
1296
|
a certain way, the gcc preprocessor may need symbol definitions to
|
|
1291
1297
|
properly preprocess files for incremental release builds due to deep
|
|
1292
1298
|
dependencies.
|
|
1293
|
-
|
|
1299
|
+
|
|
1294
1300
|
**Default**: [] (empty)
|
|
1295
1301
|
|
|
1296
1302
|
|
|
1297
|
-
Example [:defines] YAML blurb
|
|
1303
|
+
Example [:defines] YAML blurb
|
|
1298
1304
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1305
|
+
```yaml
|
|
1306
|
+
:defines:
|
|
1307
|
+
:test:
|
|
1308
|
+
- UNIT_TESTING #for select cases in source to allow testing with a changed behavior or interface
|
|
1309
|
+
- OFF=0
|
|
1310
|
+
- ON=1
|
|
1311
|
+
- FEATURE_X=ON
|
|
1312
|
+
:source:
|
|
1313
|
+
- FEATURE_X=ON
|
|
1314
|
+
```
|
|
1307
1315
|
|
|
1308
1316
|
**flags**: configure per-file compilation and linking flags
|
|
1309
1317
|
|
|
@@ -1322,47 +1330,49 @@ argument substitution to achieve this.
|
|
|
1322
1330
|
|
|
1323
1331
|
[:compile] or [:link] flags for test build
|
|
1324
1332
|
|
|
1325
|
-
Notes:
|
|
1333
|
+
Notes:
|
|
1326
1334
|
|
|
1327
|
-
* Ceedling works with the [:release] and [:test] build contexts
|
|
1328
|
-
as-is; plugins can add additional contexts
|
|
1335
|
+
* Ceedling works with the [:release] and [:test] build contexts
|
|
1336
|
+
as-is; plugins can add additional contexts
|
|
1329
1337
|
|
|
1330
|
-
* Only [:compile] and [:link] are recognized operations beneath
|
|
1331
|
-
a context
|
|
1338
|
+
* Only [:compile] and [:link] are recognized operations beneath
|
|
1339
|
+
a context
|
|
1332
1340
|
|
|
1333
|
-
* File specifiers do not include a path or file extension
|
|
1341
|
+
* File specifiers do not include a path or file extension
|
|
1334
1342
|
|
|
1335
|
-
* File specifiers are case sensitive (must match original file
|
|
1336
|
-
name)
|
|
1343
|
+
* File specifiers are case sensitive (must match original file
|
|
1344
|
+
name)
|
|
1337
1345
|
|
|
1338
|
-
* '*' is a special (optional) file specifier to provide flags
|
|
1339
|
-
to all files not otherwise specified
|
|
1346
|
+
* '*' is a special (optional) file specifier to provide flags
|
|
1347
|
+
to all files not otherwise specified
|
|
1340
1348
|
|
|
1341
1349
|
|
|
1342
|
-
Example [:flags] YAML blurb
|
|
1350
|
+
Example [:flags] YAML blurb
|
|
1343
1351
|
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1352
|
+
```yaml
|
|
1353
|
+
:flags:
|
|
1354
|
+
:release:
|
|
1355
|
+
:compile:
|
|
1356
|
+
:main: # add '-Wall' to compilation of main.c
|
|
1357
|
+
- -Wall
|
|
1358
|
+
:fan: # add '--O2' to compilation of fan.c
|
|
1359
|
+
- --O2
|
|
1360
|
+
:*: # add '-foo' to compilation of all files not main.c or fan.c
|
|
1361
|
+
- -foo
|
|
1362
|
+
:test:
|
|
1363
|
+
:compile:
|
|
1364
|
+
:main: # add '--O1' to compilation of main.c as part of test builds including main.c
|
|
1365
|
+
- --O1
|
|
1366
|
+
:link:
|
|
1367
|
+
:test_main: # add '--bar --baz' to linking of test_main.exe
|
|
1368
|
+
- --bar
|
|
1369
|
+
- --baz
|
|
1370
|
+
```
|
|
1361
1371
|
|
|
1362
|
-
Ceedling sets values for a subset of CMock settings. All CMock
|
|
1363
|
-
options are available to be set, but only those options set by
|
|
1364
|
-
Ceedling in an automated fashion are documented below. See CMock
|
|
1365
|
-
documentation.
|
|
1372
|
+
Ceedling sets values for a subset of CMock settings. All CMock
|
|
1373
|
+
options are available to be set, but only those options set by
|
|
1374
|
+
Ceedling in an automated fashion are documented below. See CMock
|
|
1375
|
+
documentation.
|
|
1366
1376
|
|
|
1367
1377
|
**cmock**: configure CMock's code generation options and set symbols used to modify CMock's compiled features
|
|
1368
1378
|
Ceedling sets values for a subset of CMock settings. All CMock options are available to be set, but only those options set by Ceedling in an automated fashion are documented below. See CMock documentation.
|
|
@@ -1414,15 +1424,15 @@ Ceedling sets values for a subset of CMock settings. All CMock options are avail
|
|
|
1414
1424
|
mocks as #include statements.
|
|
1415
1425
|
|
|
1416
1426
|
|
|
1417
|
-
The last four settings above are directly tied to other Ceedling
|
|
1418
|
-
settings; hence, why they are listed and explained here. The
|
|
1419
|
-
first setting above, [:enforce_strict_ordering], defaults
|
|
1420
|
-
to FALSE within CMock. It is set to TRUE by default in Ceedling
|
|
1421
|
-
as our way of encouraging you to use strict ordering. It's a teeny
|
|
1422
|
-
bit more expensive in terms of code generated, test execution
|
|
1423
|
-
time, and complication in deciphering test failures. However,
|
|
1424
|
-
it's good practice. And, of course, you can always disable it
|
|
1425
|
-
by overriding the value in the Ceedling YAML configuration file.
|
|
1427
|
+
The last four settings above are directly tied to other Ceedling
|
|
1428
|
+
settings; hence, why they are listed and explained here. The
|
|
1429
|
+
first setting above, [:enforce_strict_ordering], defaults
|
|
1430
|
+
to FALSE within CMock. It is set to TRUE by default in Ceedling
|
|
1431
|
+
as our way of encouraging you to use strict ordering. It's a teeny
|
|
1432
|
+
bit more expensive in terms of code generated, test execution
|
|
1433
|
+
time, and complication in deciphering test failures. However,
|
|
1434
|
+
it's good practice. And, of course, you can always disable it
|
|
1435
|
+
by overriding the value in the Ceedling YAML configuration file.
|
|
1426
1436
|
|
|
1427
1437
|
|
|
1428
1438
|
**cexception**: configure symbols used to modify CException's compiled features
|
|
@@ -1449,7 +1459,7 @@ by overriding the value in the Ceedling YAML configuration file.
|
|
|
1449
1459
|
**Default**: [] (empty)
|
|
1450
1460
|
|
|
1451
1461
|
|
|
1452
|
-
Notes on Unity configuration:
|
|
1462
|
+
Notes on Unity configuration:
|
|
1453
1463
|
|
|
1454
1464
|
* **Verification** - Ceedling does no verification of your configuration
|
|
1455
1465
|
values. In a properly configured setup, your Unity configuration
|
|
@@ -1470,35 +1480,36 @@ Notes on Unity configuration:
|
|
|
1470
1480
|
and shell documentation.
|
|
1471
1481
|
|
|
1472
1482
|
|
|
1473
|
-
Example [:unity] YAML blurbs
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1483
|
+
Example [:unity] YAML blurbs
|
|
1484
|
+
|
|
1485
|
+
```yaml
|
|
1486
|
+
:unity: #itty bitty processor & toolchain with limited test execution options
|
|
1487
|
+
:defines:
|
|
1488
|
+
- UNITY_INT_WIDTH=16 #16 bit processor without support for 32 bit instructions
|
|
1489
|
+
- UNITY_EXCLUDE_FLOAT #no floating point unit
|
|
1490
|
+
#let's say environment & tools provide no way to run tests on desktop so we gotta go on target
|
|
1491
|
+
#replace putchar() with write_usart() via command line specified macro (gcc style)
|
|
1492
|
+
#note escaped quotes for our hypothetical shell that doesn't like parens in arguments
|
|
1493
|
+
#transformed into -D"UNITY_OUTPUT_CHAR(a)=write_usart(a)" at command line by [:tools] entry
|
|
1494
|
+
- "\"UNITY_OUTPUT_CHAR(a)=write_usart(a)\""
|
|
1495
|
+
|
|
1496
|
+
:unity: #great big gorilla processor that grunts and scratches
|
|
1497
|
+
:defines:
|
|
1498
|
+
- UNITY_SUPPORT_64 #big memory, big counters, big registers
|
|
1499
|
+
- UNITY_LINE_TYPE=\"unsigned int\" #apparently we're using really long test files,
|
|
1500
|
+
- UNITY_COUNTER_TYPE=\"unsigned int\" #and we've got a ton of test cases in those test files
|
|
1501
|
+
- UNITY_FLOAT_TYPE=\"double\" #you betcha
|
|
1502
|
+
```
|
|
1503
|
+
|
|
1504
|
+
**tools**: a means for representing command line tools for use under
|
|
1505
|
+
Ceedling's automation framework
|
|
1506
|
+
|
|
1507
|
+
Ceedling requires a variety of tools to work its magic. By default,
|
|
1508
|
+
the GNU toolchain (gcc, cpp, as) are configured and ready for
|
|
1509
|
+
use with no additions to the project configuration YAML file.
|
|
1510
|
+
However, as most work will require a project-specific toolchain,
|
|
1511
|
+
Ceedling provides a generic means for specifying / overriding
|
|
1512
|
+
tools.
|
|
1502
1513
|
|
|
1503
1514
|
* `test_compiler`:
|
|
1504
1515
|
|
|
@@ -1571,30 +1582,30 @@ tools.
|
|
|
1571
1582
|
**Default**: gcc
|
|
1572
1583
|
|
|
1573
1584
|
|
|
1574
|
-
A Ceedling tool has a handful of configurable elements:
|
|
1585
|
+
A Ceedling tool has a handful of configurable elements:
|
|
1575
1586
|
|
|
1576
|
-
1. [:executable] (required) - Command line executable having
|
|
1577
|
-
the form of:
|
|
1587
|
+
1. [:executable] (required) - Command line executable having
|
|
1588
|
+
the form of:
|
|
1578
1589
|
|
|
1579
|
-
2. [:arguments] (required) - List of command line arguments
|
|
1580
|
-
and substitutions
|
|
1590
|
+
2. [:arguments] (required) - List of command line arguments
|
|
1591
|
+
and substitutions
|
|
1581
1592
|
|
|
1582
|
-
3. [:name] - Simple name (e.g. "nickname") of tool beyond its
|
|
1583
|
-
executable name (if not explicitly set then Ceedling will
|
|
1584
|
-
form a name from the tool's YAML entry name)
|
|
1593
|
+
3. [:name] - Simple name (e.g. "nickname") of tool beyond its
|
|
1594
|
+
executable name (if not explicitly set then Ceedling will
|
|
1595
|
+
form a name from the tool's YAML entry name)
|
|
1585
1596
|
|
|
1586
|
-
4. [:stderr_redirect] - Control of capturing $stderr messages
|
|
1587
|
-
{:none, :auto, :win, :unix, :tcsh}. {text:line-break}
|
|
1588
|
-
Defaults to :none if unspecified; create a custom entry by
|
|
1589
|
-
specifying a simple string instead of any of the available
|
|
1590
|
-
symbols.
|
|
1597
|
+
4. [:stderr_redirect] - Control of capturing $stderr messages
|
|
1598
|
+
{:none, :auto, :win, :unix, :tcsh}. {text:line-break}
|
|
1599
|
+
Defaults to :none if unspecified; create a custom entry by
|
|
1600
|
+
specifying a simple string instead of any of the available
|
|
1601
|
+
symbols.
|
|
1591
1602
|
|
|
1592
|
-
5. [:background_exec] - Control execution as background process
|
|
1593
|
-
{:none, :auto, :win, :unix}. {text:line-break} Defaults
|
|
1594
|
-
to :none if unspecified.
|
|
1603
|
+
5. [:background_exec] - Control execution as background process
|
|
1604
|
+
{:none, :auto, :win, :unix}. {text:line-break} Defaults
|
|
1605
|
+
to :none if unspecified.
|
|
1595
1606
|
|
|
1596
1607
|
|
|
1597
|
-
Tool Element Runtime Substitution
|
|
1608
|
+
Tool Element Runtime Substitution
|
|
1598
1609
|
---------------------------------
|
|
1599
1610
|
|
|
1600
1611
|
To accomplish useful work on multiple files, a configured tool will most
|
|
@@ -1605,7 +1616,7 @@ provides two kinds of inline Ruby execution and a notation for
|
|
|
1605
1616
|
populating elements with dynamically gathered values within the build
|
|
1606
1617
|
environment.
|
|
1607
1618
|
|
|
1608
|
-
Tool Element Runtime Substitution: Inline Ruby Execution
|
|
1619
|
+
Tool Element Runtime Substitution: Inline Ruby Execution
|
|
1609
1620
|
--------------------------------------------------------
|
|
1610
1621
|
|
|
1611
1622
|
In-line Ruby execution works similarly to that demonstrated for the
|
|
@@ -1633,14 +1644,14 @@ executed and not at the time the configuration file is first scanned.
|
|
|
1633
1644
|
Ceedling feature to insert Ruby code that iterates those paths and
|
|
1634
1645
|
escapes those spaces in the array as used by the tool of this example.
|
|
1635
1646
|
|
|
1636
|
-
Tool Element Runtime Substitution: Notational Substitution
|
|
1647
|
+
Tool Element Runtime Substitution: Notational Substitution
|
|
1637
1648
|
----------------------------------------------------------
|
|
1638
1649
|
|
|
1639
1650
|
A Ceedling tool's other form of dynamic substitution relies on a '$'
|
|
1640
1651
|
notation. These '$' operators can exist anywhere in a string and can be
|
|
1641
1652
|
decorated in any way needed. To use a literal '$', escape it as '\\$'.
|
|
1642
1653
|
|
|
1643
|
-
*
|
|
1654
|
+
* `$`:
|
|
1644
1655
|
|
|
1645
1656
|
Simple substitution for value(s) globally available within the runtime
|
|
1646
1657
|
(most often a string or an array).
|
|
@@ -1661,40 +1672,41 @@ decorated in any way needed. To use a literal '$', escape it as '\\$'.
|
|
|
1661
1672
|
binary input file given to a simulator in its arguments.
|
|
1662
1673
|
|
|
1663
1674
|
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1675
|
+
Example [:tools] YAML blurbs
|
|
1676
|
+
|
|
1677
|
+
```yaml
|
|
1678
|
+
:tools:
|
|
1679
|
+
:test_compiler:
|
|
1680
|
+
:executable: compiler #exists in system search path
|
|
1681
|
+
:name: 'acme test compiler'
|
|
1682
|
+
:arguments:
|
|
1683
|
+
- -I"$”: COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
|
|
1684
|
+
- -I"$”: COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
|
|
1685
|
+
- -D$: COLLECTION_TEST_DEFINES #expands to all -D defined symbols
|
|
1686
|
+
- --network-license #simple command line argument
|
|
1687
|
+
- -optimize-level 4 #simple command line argument
|
|
1688
|
+
- "#{`args.exe -m acme.prj`}" #in-line ruby sub to shell out & build string of arguments
|
|
1689
|
+
- -c ${1} #source code input file (Ruby method call param list sub)
|
|
1690
|
+
- -o ${2} #object file output (Ruby method call param list sub)
|
|
1691
|
+
:test_linker:
|
|
1692
|
+
:executable: /programs/acme/bin/linker.exe #absolute file path
|
|
1693
|
+
:name: 'acme test linker'
|
|
1694
|
+
:arguments:
|
|
1695
|
+
- ${1} #list of object files to link (Ruby method call param list sub)
|
|
1696
|
+
- -l$-lib: #inline yaml array substitution to link in foo-lib and bar-lib
|
|
1697
|
+
- foo
|
|
1698
|
+
- bar
|
|
1699
|
+
- -o ${2} #executable file output (Ruby method call param list sub)
|
|
1700
|
+
:test_fixture:
|
|
1701
|
+
:executable: tools/bin/acme_simulator.exe #relative file path to command line simulator
|
|
1702
|
+
:name: 'acme test fixture'
|
|
1703
|
+
:stderr_redirect: :win #inform Ceedling what model of $stderr capture to use
|
|
1704
|
+
:arguments:
|
|
1705
|
+
- -mem large #simple command line argument
|
|
1706
|
+
- -f "${1}" #binary executable input file to simulator (Ruby method call param list sub)
|
|
1707
|
+
```
|
|
1708
|
+
|
|
1709
|
+
Resulting command line constructions from preceding example [:tools] YAML blurbs
|
|
1698
1710
|
|
|
1699
1711
|
> compiler -I"/usr/include” -I”project/tests”
|
|
1700
1712
|
-I"project/tests/support” -I”project/source” -I”project/include”
|
|
@@ -1702,18 +1714,18 @@ Resulting command line constructions from preceding example [:tools] YAML blurbs
|
|
|
1702
1714
|
arg-bar arg-baz -c project/source/source.c -o
|
|
1703
1715
|
build/tests/out/source.o
|
|
1704
1716
|
|
|
1705
|
-
[notes: (1.) "arg-foo arg-bar arg-baz" is a fabricated example
|
|
1706
|
-
string collected from $stdout as a result of shell execution
|
|
1707
|
-
of args.exe {text:line-break} (2.) the -c and -o arguments are
|
|
1708
|
-
fabricated examples simulating a single compilation step for
|
|
1709
|
-
a test; ${1} & ${2} are single files]
|
|
1717
|
+
[notes: (1.) "arg-foo arg-bar arg-baz" is a fabricated example
|
|
1718
|
+
string collected from $stdout as a result of shell execution
|
|
1719
|
+
of args.exe {text:line-break} (2.) the -c and -o arguments are
|
|
1720
|
+
fabricated examples simulating a single compilation step for
|
|
1721
|
+
a test; ${1} & ${2} are single files]
|
|
1710
1722
|
|
|
1711
1723
|
> \programs\acme\bin\linker.exe thing.o unity.o
|
|
1712
1724
|
test_thing_runner.o test_thing.o mock_foo.o mock_bar.o -lfoo-lib
|
|
1713
1725
|
-lbar-lib -o build\tests\out\test_thing.exe
|
|
1714
1726
|
|
|
1715
|
-
[note: in this scenario ${1} is an array of all the object files
|
|
1716
|
-
needed to link a test fixture executable]
|
|
1727
|
+
[note: in this scenario ${1} is an array of all the object files
|
|
1728
|
+
needed to link a test fixture executable]
|
|
1717
1729
|
|
|
1718
1730
|
> tools\bin\acme_simulator.exe -mem large -f "build\tests\out\test_thing.bin 2>&1”
|
|
1719
1731
|
|
|
@@ -1723,26 +1735,26 @@ $stderr redirection to allow us to capture simulator error messages to
|
|
|
1723
1735
|
$stdout for display at the run's conclusion]
|
|
1724
1736
|
|
|
1725
1737
|
|
|
1726
|
-
Notes:
|
|
1738
|
+
Notes:
|
|
1727
1739
|
|
|
1728
|
-
* The upper case names are Ruby global constants that Ceedling
|
|
1729
|
-
builds
|
|
1740
|
+
* The upper case names are Ruby global constants that Ceedling
|
|
1741
|
+
builds
|
|
1730
1742
|
|
|
1731
|
-
* "COLLECTION_" indicates that Ceedling did some work to assemble
|
|
1732
|
-
the list. For instance, expanding path globs, {text:soft-page-break}
|
|
1733
|
-
combining multiple path globs into a convenient summation,
|
|
1734
|
-
etc.
|
|
1743
|
+
* "COLLECTION_" indicates that Ceedling did some work to assemble
|
|
1744
|
+
the list. For instance, expanding path globs, {text:soft-page-break}
|
|
1745
|
+
combining multiple path globs into a convenient summation,
|
|
1746
|
+
etc.
|
|
1735
1747
|
|
|
1736
|
-
* At present, $stderr redirection is primarily used to capture
|
|
1737
|
-
errors from test fixtures so that they can be displayed at the
|
|
1738
|
-
conclusion of a test run. For instance, if a simulator detects
|
|
1739
|
-
a memory access violation or a divide by zero error, this notice
|
|
1740
|
-
might go unseen in all the output scrolling past in a terminal.
|
|
1748
|
+
* At present, $stderr redirection is primarily used to capture
|
|
1749
|
+
errors from test fixtures so that they can be displayed at the
|
|
1750
|
+
conclusion of a test run. For instance, if a simulator detects
|
|
1751
|
+
a memory access violation or a divide by zero error, this notice
|
|
1752
|
+
might go unseen in all the output scrolling past in a terminal.
|
|
1741
1753
|
|
|
1742
|
-
* The preprocessing tools can each be overridden with non-gcc
|
|
1743
|
-
equivalents. However, this is an advanced feature not yet
|
|
1744
|
-
documented and requires that the replacement toolchain conform
|
|
1745
|
-
to the same conventions used by gcc.
|
|
1754
|
+
* The preprocessing tools can each be overridden with non-gcc
|
|
1755
|
+
equivalents. However, this is an advanced feature not yet
|
|
1756
|
+
documented and requires that the replacement toolchain conform
|
|
1757
|
+
to the same conventions used by gcc.
|
|
1746
1758
|
|
|
1747
1759
|
**Ceedling Collection Used in Compilation**:
|
|
1748
1760
|
|
|
@@ -1801,10 +1813,10 @@ Notes:
|
|
|
1801
1813
|
[:cexception][:defines] if exceptions are ena bled
|
|
1802
1814
|
|
|
1803
1815
|
|
|
1804
|
-
Notes:
|
|
1816
|
+
Notes:
|
|
1805
1817
|
|
|
1806
|
-
* Other collections exist within Ceedling. However, they are
|
|
1807
|
-
only useful for advanced features not yet documented.
|
|
1818
|
+
* Other collections exist within Ceedling. However, they are
|
|
1819
|
+
only useful for advanced features not yet documented.
|
|
1808
1820
|
|
|
1809
1821
|
* Wherever multiple path lists are combined for use Ceedling prioritizes
|
|
1810
1822
|
path groups as follows: {text:line-break} test paths, support paths,
|
|
@@ -1837,17 +1849,18 @@ used to format test results. However, if no reporting plugins are
|
|
|
1837
1849
|
specified, Ceedling will print to `$stdout` the (quite readable) raw
|
|
1838
1850
|
test results from all test fixtures executed.
|
|
1839
1851
|
|
|
1840
|
-
Example [:plugins] YAML blurb
|
|
1852
|
+
Example [:plugins] YAML blurb
|
|
1841
1853
|
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1854
|
+
```yaml
|
|
1855
|
+
:plugins:
|
|
1856
|
+
:load_paths:
|
|
1857
|
+
- project/tools/ceedling/plugins #home to your collection of plugin directories
|
|
1858
|
+
- project/support #maybe home to some ruby code your custom plugins share
|
|
1859
|
+
:enabled:
|
|
1860
|
+
- stdout_pretty_tests_report #nice test results at your command line
|
|
1861
|
+
- our_custom_code_metrics_report #maybe you needed line count and complexity metrics, so you
|
|
1862
|
+
#created a plugin to scan all your code and collect that info
|
|
1863
|
+
```
|
|
1851
1864
|
|
|
1852
1865
|
* `stdout_pretty_tests_report`:
|
|
1853
1866
|
|
|
@@ -1900,37 +1913,37 @@ Example [:plugins] YAML blurb
|
|
|
1900
1913
|
release build, or even `bullseye/` for bullseye runs).
|
|
1901
1914
|
|
|
1902
1915
|
|
|
1903
|
-
Advanced Topics (Coming)
|
|
1916
|
+
Advanced Topics (Coming)
|
|
1904
1917
|
========================
|
|
1905
1918
|
|
|
1906
|
-
Modifying Your Configuration without Modifying Your Project File: Option Files & User Files
|
|
1919
|
+
Modifying Your Configuration without Modifying Your Project File: Option Files & User Files
|
|
1907
1920
|
-------------------------------------------------------------------------------------------
|
|
1908
1921
|
|
|
1909
|
-
Modifying your project file without modifying your project file
|
|
1922
|
+
Modifying your project file without modifying your project file
|
|
1910
1923
|
|
|
1911
|
-
Debugging and/or printf()
|
|
1924
|
+
Debugging and/or printf()
|
|
1912
1925
|
-------------------------
|
|
1913
1926
|
|
|
1914
|
-
When you gotta get your hands dirty...
|
|
1927
|
+
When you gotta get your hands dirty...
|
|
1915
1928
|
|
|
1916
|
-
Ceedling Plays Nice with Others - Using Ceedling for Tests Alongside Another Release Build Setup
|
|
1929
|
+
Ceedling Plays Nice with Others - Using Ceedling for Tests Alongside Another Release Build Setup
|
|
1917
1930
|
------------------------------------------------------------------------------------------------
|
|
1918
1931
|
|
|
1919
|
-
You've got options.
|
|
1932
|
+
You've got options.
|
|
1920
1933
|
|
|
1921
|
-
Adding Handy Rake Tasks for Your Project (without Fancy Pants Custom Plugins)
|
|
1934
|
+
Adding Handy Rake Tasks for Your Project (without Fancy Pants Custom Plugins)
|
|
1922
1935
|
-----------------------------------------------------------------------------
|
|
1923
1936
|
|
|
1924
|
-
Simple as snot.
|
|
1937
|
+
Simple as snot.
|
|
1925
1938
|
|
|
1926
|
-
Working with Non-Desktop Testing Environments
|
|
1939
|
+
Working with Non-Desktop Testing Environments
|
|
1927
1940
|
---------------------------------------------
|
|
1928
1941
|
|
|
1929
1942
|
For those crazy platforms lacking command line simulators and for which
|
|
1930
1943
|
cross-compiling on the desktop just ain't gonna get it done.
|
|
1931
1944
|
|
|
1932
|
-
Creating Custom Plugins
|
|
1945
|
+
Creating Custom Plugins
|
|
1933
1946
|
-----------------------
|
|
1934
1947
|
|
|
1935
|
-
Oh boy. This is going to take some explaining.
|
|
1948
|
+
Oh boy. This is going to take some explaining.
|
|
1936
1949
|
|