ceedling 0.28.1 → 0.28.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ceedling +3 -2
- data/docs/CeedlingPacket.md +4 -0
- data/lib/ceedling/configurator_builder.rb +26 -0
- data/lib/ceedling/configurator_setup.rb +1 -0
- data/lib/ceedling/file_finder.rb +7 -1
- data/lib/ceedling/flaginator.rb +28 -8
- data/lib/ceedling/rules_release.rake +3 -3
- data/lib/ceedling/rules_release_deep_dependencies.rake +1 -1
- data/lib/ceedling/version.rb +3 -3
- data/plugins/gcov/config/defaults.yml +4 -3
- data/plugins/module_generator/lib/module_generator.rb +1 -1
- data/plugins/subprojects/README.md +63 -63
- data/plugins/subprojects/config/defaults.yml +33 -33
- data/plugins/subprojects/lib/subprojects.rb +92 -92
- data/plugins/subprojects/subprojects.rake +78 -78
- data/vendor/cmock/docs/CMock_Summary.md +75 -60
- data/vendor/cmock/lib/cmock_config.rb +1 -0
- data/vendor/cmock/lib/cmock_generator.rb +13 -1
- data/vendor/cmock/lib/cmock_generator_plugin_expect.rb +1 -1
- data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +0 -14
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +4 -0
- data/vendor/cmock/lib/cmock_generator_utils.rb +4 -5
- data/vendor/cmock/lib/cmock_header_parser.rb +26 -28
- data/vendor/cmock/lib/cmock_plugin_manager.rb +27 -12
- data/vendor/cmock/scripts/create_makefile.rb +5 -4
- data/vendor/cmock/scripts/test_summary.rb +1 -1
- data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +167 -0
- data/vendor/cmock/test/system/test_interactions/ignore_strict_mock_calling.yml +37 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +14 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +25 -24
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +101 -3
- data/vendor/unity/README.md +11 -0
- data/vendor/unity/auto/generate_module.rb +3 -3
- data/vendor/unity/auto/stylize_as_junit.rb +0 -0
- data/vendor/unity/docs/UnityAssertionsReference.md +54 -0
- data/vendor/unity/examples/unity_config.h +6 -4
- data/vendor/unity/extras/fixture/rakefile_helper.rb +1 -1
- data/vendor/unity/extras/fixture/test/Makefile +1 -0
- data/vendor/unity/src/unity.c +121 -73
- data/vendor/unity/src/unity.h +60 -0
- data/vendor/unity/src/unity_internals.h +47 -7
- data/vendor/unity/test/Makefile +1 -0
- data/vendor/unity/test/rakefile_helper.rb +1 -1
- data/vendor/unity/test/tests/testunity.c +508 -164
- metadata +3 -423
- data/out.fail +0 -21
- data/plugins/fake_function_framework/vendor/fff/LICENSE +0 -25
- data/plugins/fake_function_framework/vendor/fff/Makefile +0 -10
- data/plugins/fake_function_framework/vendor/fff/README.md +0 -454
- data/plugins/fake_function_framework/vendor/fff/buildandtest +0 -15
- data/plugins/fake_function_framework/vendor/fff/examples/Makefile +0 -7
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/Makefile +0 -64
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c +0 -24
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.h +0 -11
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.cpp +0 -50
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.fff.cpp +0 -62
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/hardware_abstraction.h +0 -15
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/registers.h +0 -13
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/DISPLAY.h +0 -17
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Kata.txt +0 -25
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Makefile +0 -67
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/SYSTEM.h +0 -21
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.c +0 -48
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.h +0 -12
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_ansic.c +0 -183
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_cpp.cpp +0 -136
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/test_suite_template.c +0 -34
- data/plugins/fake_function_framework/vendor/fff/fakegen.rb +0 -420
- data/plugins/fake_function_framework/vendor/fff/fff.h +0 -5112
- data/plugins/fake_function_framework/vendor/fff/gtest/Makefile +0 -22
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest-all.cc +0 -9118
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest-main.cc +0 -6
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest.h +0 -19537
- data/plugins/fake_function_framework/vendor/fff/test/Makefile +0 -81
- data/plugins/fake_function_framework/vendor/fff/test/c_test_framework.h +0 -15
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_c.c +0 -108
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_cpp.cpp +0 -45
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_c.c +0 -76
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_cpp.cpp +0 -23
- data/plugins/fake_function_framework/vendor/fff/test/global_fakes.c +0 -13
- data/plugins/fake_function_framework/vendor/fff/test/global_fakes.h +0 -37
- data/plugins/fake_function_framework/vendor/fff/test/test_cases.include +0 -276
- data/vendor/c_exception/vendor/unity/README.md +0 -220
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +0 -118
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +0 -39
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +0 -36
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +0 -308
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +0 -437
- data/vendor/c_exception/vendor/unity/auto/parse_output.rb +0 -220
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +0 -252
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +0 -25
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +0 -6
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +0 -139
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +0 -136
- data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +0 -146
- data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +0 -207
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +0 -716
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +0 -398
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +0 -191
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +0 -242
- data/vendor/c_exception/vendor/unity/docs/license.txt +0 -21
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +0 -71
- data/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +0 -5
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +0 -24
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +0 -3
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +0 -11
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +0 -2
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +0 -62
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +0 -31
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +0 -53
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +0 -57
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +0 -70
- data/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +0 -5
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +0 -24
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +0 -3
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +0 -11
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +0 -2
- data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +0 -64
- data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +0 -33
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +0 -9
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +0 -11
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +0 -12
- data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +0 -10
- data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +0 -12
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -43
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +0 -249
- data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +0 -13
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +0 -24
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +0 -3
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +0 -11
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +0 -2
- data/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +0 -46
- data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +0 -62
- data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +0 -31
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +0 -237
- data/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +0 -26
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +0 -48
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
- data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +0 -9
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +0 -432
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +0 -83
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -51
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -47
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +0 -74
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +0 -22
- data/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +0 -39
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -543
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -57
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -57
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
- data/vendor/c_exception/vendor/unity/release/build.info +0 -2
- data/vendor/c_exception/vendor/unity/release/version.info +0 -2
- data/vendor/c_exception/vendor/unity/src/unity.c +0 -1517
- data/vendor/c_exception/vendor/unity/src/unity.h +0 -339
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +0 -784
- data/vendor/c_exception/vendor/unity/test/Makefile +0 -63
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +0 -61
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +0 -57
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +0 -55
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +0 -15
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -80
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +0 -76
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +0 -75
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +0 -13
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +0 -77
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -90
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +0 -67
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +0 -70
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +0 -58
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +0 -67
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +0 -70
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +0 -71
- data/vendor/c_exception/vendor/unity/test/rakefile +0 -125
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +0 -260
- data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +0 -158
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -78
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +0 -78
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +0 -49
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +0 -50
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +0 -47
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -59
- data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +0 -47
- data/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +0 -101
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +0 -90
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +0 -80
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +0 -80
- data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -94
- data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +0 -84
- data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +0 -95
- data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +0 -86
- data/vendor/c_exception/vendor/unity/test/testdata/CException.h +0 -11
- data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +0 -8
- data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +0 -14
- data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +0 -13
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +0 -183
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +0 -67
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +0 -192
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +0 -1252
- data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +0 -110
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +0 -4993
- data/vendor/cmock/vendor/c_exception/Gemfile +0 -4
- data/vendor/cmock/vendor/c_exception/Gemfile.lock +0 -12
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +0 -30
- data/vendor/cmock/vendor/c_exception/README.md +0 -162
- data/vendor/cmock/vendor/c_exception/Rakefile +0 -42
- data/vendor/cmock/vendor/c_exception/docs/CException.md +0 -292
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +0 -207
- data/vendor/cmock/vendor/c_exception/lib/CException.c +0 -46
- data/vendor/cmock/vendor/c_exception/lib/CException.h +0 -110
- data/vendor/cmock/vendor/c_exception/makefile +0 -24
- data/vendor/cmock/vendor/c_exception/release/build.info +0 -2
- data/vendor/cmock/vendor/c_exception/release/version.info +0 -2
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +0 -46
- data/vendor/cmock/vendor/c_exception/test/TestException.c +0 -391
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +0 -67
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +0 -220
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +0 -118
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +0 -39
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +0 -36
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +0 -308
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +0 -437
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +0 -220
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +0 -252
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +0 -25
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +0 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +0 -139
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +0 -136
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +0 -146
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +0 -207
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +0 -716
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +0 -398
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +0 -191
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +0 -242
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +0 -21
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +0 -71
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +0 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +0 -24
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +0 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +0 -11
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +0 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +0 -62
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +0 -31
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +0 -53
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +0 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +0 -70
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +0 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +0 -24
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +0 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +0 -11
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +0 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +0 -64
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +0 -33
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +0 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +0 -11
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +0 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +0 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +0 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -43
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +0 -249
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +0 -13
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +0 -24
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +0 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +0 -11
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +0 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +0 -46
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +0 -62
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +0 -31
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +0 -237
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +0 -26
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +0 -48
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +0 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +0 -432
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +0 -83
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -51
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -47
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +0 -74
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +0 -22
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +0 -39
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -543
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +0 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +0 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +0 -1517
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +0 -339
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +0 -784
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +0 -63
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +0 -61
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +0 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +0 -55
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +0 -15
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -80
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +0 -76
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +0 -75
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +0 -13
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -89
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -89
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +0 -77
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -89
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -89
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -90
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +0 -67
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +0 -70
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +0 -58
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +0 -67
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +0 -70
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +0 -71
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +0 -125
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +0 -260
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +0 -158
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -78
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +0 -78
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +0 -49
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +0 -50
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +0 -47
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -59
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +0 -47
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +0 -101
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +0 -90
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +0 -80
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +0 -80
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -94
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +0 -84
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +0 -95
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +0 -86
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/CException.h +0 -11
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/Defs.h +0 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/cmock.h +0 -14
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +0 -13
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +0 -183
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +0 -67
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +0 -192
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +0 -1252
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +0 -110
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +0 -4993
- data/vendor/cmock/vendor/unity/README.md +0 -220
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +0 -118
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +0 -39
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +0 -36
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +0 -308
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +0 -437
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +0 -220
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +0 -252
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +0 -25
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +0 -6
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +0 -139
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +0 -136
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +0 -146
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +0 -207
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +0 -716
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +0 -398
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +0 -191
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +0 -242
- data/vendor/cmock/vendor/unity/docs/license.txt +0 -21
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +0 -71
- data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +0 -5
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +0 -24
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +0 -3
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +0 -11
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +0 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +0 -62
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +0 -31
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +0 -53
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +0 -57
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +0 -70
- data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +0 -5
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +0 -24
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +0 -3
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +0 -11
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +0 -2
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +0 -64
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +0 -33
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +0 -9
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +0 -11
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +0 -12
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +0 -10
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +0 -12
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +0 -43
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +0 -249
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +0 -13
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +0 -24
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +0 -3
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +0 -11
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +0 -2
- data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +0 -46
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +0 -62
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +0 -31
- data/vendor/cmock/vendor/unity/examples/unity_config.h +0 -237
- data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +0 -26
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +0 -48
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
- data/vendor/cmock/vendor/unity/extras/fixture/readme.txt +0 -9
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +0 -432
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +0 -83
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -51
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -47
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +0 -74
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +0 -22
- data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +0 -39
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -543
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -57
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -57
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
- data/vendor/cmock/vendor/unity/release/build.info +0 -2
- data/vendor/cmock/vendor/unity/release/version.info +0 -2
- data/vendor/cmock/vendor/unity/src/unity.c +0 -1517
- data/vendor/cmock/vendor/unity/src/unity.h +0 -339
- data/vendor/cmock/vendor/unity/src/unity_internals.h +0 -784
- data/vendor/cmock/vendor/unity/test/Makefile +0 -63
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +0 -61
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +0 -57
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +0 -55
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +0 -15
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -80
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +0 -76
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +0 -75
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +0 -13
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +0 -77
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -90
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +0 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +0 -70
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +0 -58
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +0 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +0 -70
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +0 -71
- data/vendor/cmock/vendor/unity/test/rakefile +0 -125
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +0 -260
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +0 -158
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -78
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +0 -78
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +0 -49
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +0 -50
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +0 -47
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -59
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +0 -47
- data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +0 -101
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +0 -90
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +0 -80
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +0 -80
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -94
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +0 -84
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +0 -95
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +0 -86
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +0 -11
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +0 -8
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +0 -14
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +0 -13
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +0 -183
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +0 -67
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +0 -192
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +0 -1252
- data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +0 -110
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +0 -4993
@@ -1,92 +1,92 @@
|
|
1
|
-
require 'ceedling/plugin'
|
2
|
-
require 'ceedling/constants'
|
3
|
-
|
4
|
-
SUBPROJECTS_ROOT_NAME = 'subprojects'
|
5
|
-
SUBPROJECTS_TASK_ROOT = SUBPROJECTS_ROOT_NAME + ':'
|
6
|
-
SUBPROJECTS_SYM = SUBPROJECTS_ROOT_NAME.to_sym
|
7
|
-
|
8
|
-
class Subprojects < Plugin
|
9
|
-
|
10
|
-
def setup
|
11
|
-
@plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
12
|
-
|
13
|
-
# Add to the test paths
|
14
|
-
SUBPROJECTS_PATHS.each do |subproj|
|
15
|
-
subproj[:source].each do |path|
|
16
|
-
COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR << path
|
17
|
-
end
|
18
|
-
subproj[:include].each do |path|
|
19
|
-
COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR << path
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
#gather information about the subprojects
|
24
|
-
@subprojects = {}
|
25
|
-
@subproject_lookup_by_path = {}
|
26
|
-
SUBPROJECTS_PATHS.each do |subproj|
|
27
|
-
@subprojects[ subproj[:name] ] = subproj.clone
|
28
|
-
@subprojects[ subproj[:name] ][:c] = []
|
29
|
-
@subprojects[ subproj[:name] ][:asm] = []
|
30
|
-
subproj[:source].each do |path|
|
31
|
-
search_path = "#{path[-1].match(/\\|\//) ? path : "#{path}/"}*#{EXTENSION_SOURCE}"
|
32
|
-
@subprojects[ subproj[:name] ][:c] += Dir[search_path]
|
33
|
-
if (EXTENSION_ASSEMBLY && !EXTENSION_ASSEMBLY.empty?)
|
34
|
-
search_path = "#{path[-1].match(/\\|\//) ? path : "#{path}/"}*#{EXTENSION_ASSEMBLY}"
|
35
|
-
@subprojects[ subproj[:name] ][:asm] += Dir[search_path]
|
36
|
-
end
|
37
|
-
end
|
38
|
-
@subproject_lookup_by_path[ subproj[:build_root] ] = subproj[:name]
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def find_my_project( c_file, file_type = :c )
|
43
|
-
@subprojects.each_pair do |subprojname, subproj|
|
44
|
-
return subprojname if (subproj[file_type].include?(c_file))
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def find_my_paths( c_file, file_type = :c )
|
49
|
-
@subprojects.each_pair do |subprojname, subproj|
|
50
|
-
return (subproj[:source] + (subproj[:include] || [])) if (subproj[file_type].include?(c_file))
|
51
|
-
end
|
52
|
-
return []
|
53
|
-
end
|
54
|
-
|
55
|
-
def find_my_defines( c_file, file_type = :c )
|
56
|
-
@subprojects.each_pair do |subprojname, subproj|
|
57
|
-
return (subproj[:defines] || []) if (subproj[file_type].include?(c_file))
|
58
|
-
end
|
59
|
-
return []
|
60
|
-
end
|
61
|
-
|
62
|
-
def list_all_object_files_for_subproject( lib_name )
|
63
|
-
subproj = File.basename(lib_name, EXTENSION_SUBPROJECTS)
|
64
|
-
objpath = "#{@subprojects[subproj][:build_root]}/out/c"
|
65
|
-
bbb = @subprojects[subproj][:c].map{|f| "#{objpath}/#{File.basename(f,EXTENSION_SOURCE)}#{EXTENSION_OBJECT}" }
|
66
|
-
bbb
|
67
|
-
end
|
68
|
-
|
69
|
-
def find_library_source_file_for_object( obj_name )
|
70
|
-
cname = "#{File.basename(obj_name, EXTENSION_OBJECT)}#{EXTENSION_SOURCE}"
|
71
|
-
dname = File.dirname(obj_name)[0..-7]
|
72
|
-
pname = @subproject_lookup_by_path[dname]
|
73
|
-
return @ceedling[:file_finder].find_file_from_list(cname, @subprojects[pname][:c], :error)
|
74
|
-
end
|
75
|
-
|
76
|
-
def find_library_assembly_file_for_object( obj_name )
|
77
|
-
cname = "#{File.basename(obj_name, EXTENSION_OBJECT)}#{EXTENSION_ASEMBLY}"
|
78
|
-
dname = File.dirname(obj_name)[0..-7]
|
79
|
-
pname = @subproject_lookup_by_path[dname]
|
80
|
-
return @ceedling[:file_finder].find_file_from_list(cname, @subprojects[pname][:asm], :error)
|
81
|
-
end
|
82
|
-
|
83
|
-
def replace_constant(constant, new_value)
|
84
|
-
Object.send(:remove_const, constant.to_sym) if (Object.const_defined? constant)
|
85
|
-
Object.const_set(constant, new_value)
|
86
|
-
end
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
# end blocks always executed following rake run
|
91
|
-
END {
|
92
|
-
}
|
1
|
+
require 'ceedling/plugin'
|
2
|
+
require 'ceedling/constants'
|
3
|
+
|
4
|
+
SUBPROJECTS_ROOT_NAME = 'subprojects'
|
5
|
+
SUBPROJECTS_TASK_ROOT = SUBPROJECTS_ROOT_NAME + ':'
|
6
|
+
SUBPROJECTS_SYM = SUBPROJECTS_ROOT_NAME.to_sym
|
7
|
+
|
8
|
+
class Subprojects < Plugin
|
9
|
+
|
10
|
+
def setup
|
11
|
+
@plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
12
|
+
|
13
|
+
# Add to the test paths
|
14
|
+
SUBPROJECTS_PATHS.each do |subproj|
|
15
|
+
subproj[:source].each do |path|
|
16
|
+
COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR << path
|
17
|
+
end
|
18
|
+
subproj[:include].each do |path|
|
19
|
+
COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR << path
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
#gather information about the subprojects
|
24
|
+
@subprojects = {}
|
25
|
+
@subproject_lookup_by_path = {}
|
26
|
+
SUBPROJECTS_PATHS.each do |subproj|
|
27
|
+
@subprojects[ subproj[:name] ] = subproj.clone
|
28
|
+
@subprojects[ subproj[:name] ][:c] = []
|
29
|
+
@subprojects[ subproj[:name] ][:asm] = []
|
30
|
+
subproj[:source].each do |path|
|
31
|
+
search_path = "#{path[-1].match(/\\|\//) ? path : "#{path}/"}*#{EXTENSION_SOURCE}"
|
32
|
+
@subprojects[ subproj[:name] ][:c] += Dir[search_path]
|
33
|
+
if (EXTENSION_ASSEMBLY && !EXTENSION_ASSEMBLY.empty?)
|
34
|
+
search_path = "#{path[-1].match(/\\|\//) ? path : "#{path}/"}*#{EXTENSION_ASSEMBLY}"
|
35
|
+
@subprojects[ subproj[:name] ][:asm] += Dir[search_path]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
@subproject_lookup_by_path[ subproj[:build_root] ] = subproj[:name]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def find_my_project( c_file, file_type = :c )
|
43
|
+
@subprojects.each_pair do |subprojname, subproj|
|
44
|
+
return subprojname if (subproj[file_type].include?(c_file))
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def find_my_paths( c_file, file_type = :c )
|
49
|
+
@subprojects.each_pair do |subprojname, subproj|
|
50
|
+
return (subproj[:source] + (subproj[:include] || [])) if (subproj[file_type].include?(c_file))
|
51
|
+
end
|
52
|
+
return []
|
53
|
+
end
|
54
|
+
|
55
|
+
def find_my_defines( c_file, file_type = :c )
|
56
|
+
@subprojects.each_pair do |subprojname, subproj|
|
57
|
+
return (subproj[:defines] || []) if (subproj[file_type].include?(c_file))
|
58
|
+
end
|
59
|
+
return []
|
60
|
+
end
|
61
|
+
|
62
|
+
def list_all_object_files_for_subproject( lib_name )
|
63
|
+
subproj = File.basename(lib_name, EXTENSION_SUBPROJECTS)
|
64
|
+
objpath = "#{@subprojects[subproj][:build_root]}/out/c"
|
65
|
+
bbb = @subprojects[subproj][:c].map{|f| "#{objpath}/#{File.basename(f,EXTENSION_SOURCE)}#{EXTENSION_OBJECT}" }
|
66
|
+
bbb
|
67
|
+
end
|
68
|
+
|
69
|
+
def find_library_source_file_for_object( obj_name )
|
70
|
+
cname = "#{File.basename(obj_name, EXTENSION_OBJECT)}#{EXTENSION_SOURCE}"
|
71
|
+
dname = File.dirname(obj_name)[0..-7]
|
72
|
+
pname = @subproject_lookup_by_path[dname]
|
73
|
+
return @ceedling[:file_finder].find_file_from_list(cname, @subprojects[pname][:c], :error)
|
74
|
+
end
|
75
|
+
|
76
|
+
def find_library_assembly_file_for_object( obj_name )
|
77
|
+
cname = "#{File.basename(obj_name, EXTENSION_OBJECT)}#{EXTENSION_ASEMBLY}"
|
78
|
+
dname = File.dirname(obj_name)[0..-7]
|
79
|
+
pname = @subproject_lookup_by_path[dname]
|
80
|
+
return @ceedling[:file_finder].find_file_from_list(cname, @subprojects[pname][:asm], :error)
|
81
|
+
end
|
82
|
+
|
83
|
+
def replace_constant(constant, new_value)
|
84
|
+
Object.send(:remove_const, constant.to_sym) if (Object.const_defined? constant)
|
85
|
+
Object.const_set(constant, new_value)
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
# end blocks always executed following rake run
|
91
|
+
END {
|
92
|
+
}
|
@@ -1,78 +1,78 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
SUBPROJECTS_PATHS.each do |subproj|
|
4
|
-
|
5
|
-
subproj_source = subproj[:source]
|
6
|
-
subproj_include = subproj[:include]
|
7
|
-
subproj_name = subproj[:name]
|
8
|
-
subproj_build_root = subproj[:build_root]
|
9
|
-
subproj_build_out = "#{subproj[:build_root]}/out"
|
10
|
-
subproj_build_c = "#{subproj[:build_root]}/out/c"
|
11
|
-
subproj_build_asm = "#{subproj[:build_root]}/out/asm"
|
12
|
-
subproj_directories = [ subproj_build_root, subproj_build_out, subproj_build_c, subproj_build_asm ]
|
13
|
-
|
14
|
-
subproj_directories.each do |subdir|
|
15
|
-
directory(subdir)
|
16
|
-
end
|
17
|
-
|
18
|
-
CLEAN.include(File.join(subproj_build_root, '*'))
|
19
|
-
CLEAN.include(File.join(subproj_build_out, '*'))
|
20
|
-
|
21
|
-
CLOBBER.include(File.join(subproj_build_root, '**/*'))
|
22
|
-
|
23
|
-
# Add a rule for building the actual static library from our object files
|
24
|
-
rule(/#{subproj_build_root}#{'.+\\'+EXTENSION_SUBPROJECTS}$/ => [
|
25
|
-
proc do |task_name|
|
26
|
-
@ceedling[SUBPROJECTS_SYM].list_all_object_files_for_subproject(task_name)
|
27
|
-
end
|
28
|
-
]) do |bin_file|
|
29
|
-
@ceedling[:generator].generate_executable_file(
|
30
|
-
TOOLS_SUBPROJECTS_LINKER,
|
31
|
-
SUBPROJECTS_SYM,
|
32
|
-
bin_file.prerequisites,
|
33
|
-
bin_file.name,
|
34
|
-
@ceedling[:file_path_utils].form_test_build_map_filepath(bin_file.name))
|
35
|
-
end
|
36
|
-
|
37
|
-
# Add a rule for building object files from assembly files to link into a library
|
38
|
-
if (RELEASE_BUILD_USE_ASSEMBLY)
|
39
|
-
rule(/#{subproj_build_asm}#{'.+\\'+EXTENSION_OBJECT}$/ => [
|
40
|
-
proc do |task_name|
|
41
|
-
@ceedling[SUBPROJECTS_SYM].find_library_assembly_file_for_object(task_name)
|
42
|
-
end
|
43
|
-
]) do |object|
|
44
|
-
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_PATHS_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_paths(object.source, :asm))
|
45
|
-
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_DEFINES_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_defines(object.source, :asm))
|
46
|
-
@ceedling[:generator].generate_object_file(
|
47
|
-
TOOLS_SUBPROJECTS_ASSEMBLER,
|
48
|
-
OPERATION_ASSEMBLE_SYM,
|
49
|
-
SUBPROJECTS_SYM,
|
50
|
-
object.source,
|
51
|
-
object.name )
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# Add a rule for building object files from C files to link into a library
|
56
|
-
rule(/#{subproj_build_c}#{'.+\\'+EXTENSION_OBJECT}$/ => [
|
57
|
-
proc do |task_name|
|
58
|
-
@ceedling[SUBPROJECTS_SYM].find_library_source_file_for_object(task_name)
|
59
|
-
end
|
60
|
-
]) do |object|
|
61
|
-
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_PATHS_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_paths(object.source, :c))
|
62
|
-
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_DEFINES_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_defines(object.source, :c))
|
63
|
-
@ceedling[:generator].generate_object_file(
|
64
|
-
TOOLS_SUBPROJECTS_COMPILER,
|
65
|
-
OPERATION_COMPILE_SYM,
|
66
|
-
SUBPROJECTS_SYM,
|
67
|
-
object.source,
|
68
|
-
object.name,
|
69
|
-
@ceedling[:file_path_utils].form_release_build_c_list_filepath( object.name ) )
|
70
|
-
end
|
71
|
-
|
72
|
-
# Add the subdirectories involved to our list of those that should be autogenerated
|
73
|
-
task :directories => subproj_directories.clone
|
74
|
-
|
75
|
-
# Finally, add the static library to our RELEASE build dependency list
|
76
|
-
task RELEASE_SYM => ["#{subproj_build_root}/#{subproj_name}#{EXTENSION_SUBPROJECTS}"]
|
77
|
-
end
|
78
|
-
|
1
|
+
|
2
|
+
|
3
|
+
SUBPROJECTS_PATHS.each do |subproj|
|
4
|
+
|
5
|
+
subproj_source = subproj[:source]
|
6
|
+
subproj_include = subproj[:include]
|
7
|
+
subproj_name = subproj[:name]
|
8
|
+
subproj_build_root = subproj[:build_root]
|
9
|
+
subproj_build_out = "#{subproj[:build_root]}/out"
|
10
|
+
subproj_build_c = "#{subproj[:build_root]}/out/c"
|
11
|
+
subproj_build_asm = "#{subproj[:build_root]}/out/asm"
|
12
|
+
subproj_directories = [ subproj_build_root, subproj_build_out, subproj_build_c, subproj_build_asm ]
|
13
|
+
|
14
|
+
subproj_directories.each do |subdir|
|
15
|
+
directory(subdir)
|
16
|
+
end
|
17
|
+
|
18
|
+
CLEAN.include(File.join(subproj_build_root, '*'))
|
19
|
+
CLEAN.include(File.join(subproj_build_out, '*'))
|
20
|
+
|
21
|
+
CLOBBER.include(File.join(subproj_build_root, '**/*'))
|
22
|
+
|
23
|
+
# Add a rule for building the actual static library from our object files
|
24
|
+
rule(/#{subproj_build_root}#{'.+\\'+EXTENSION_SUBPROJECTS}$/ => [
|
25
|
+
proc do |task_name|
|
26
|
+
@ceedling[SUBPROJECTS_SYM].list_all_object_files_for_subproject(task_name)
|
27
|
+
end
|
28
|
+
]) do |bin_file|
|
29
|
+
@ceedling[:generator].generate_executable_file(
|
30
|
+
TOOLS_SUBPROJECTS_LINKER,
|
31
|
+
SUBPROJECTS_SYM,
|
32
|
+
bin_file.prerequisites,
|
33
|
+
bin_file.name,
|
34
|
+
@ceedling[:file_path_utils].form_test_build_map_filepath(bin_file.name))
|
35
|
+
end
|
36
|
+
|
37
|
+
# Add a rule for building object files from assembly files to link into a library
|
38
|
+
if (RELEASE_BUILD_USE_ASSEMBLY)
|
39
|
+
rule(/#{subproj_build_asm}#{'.+\\'+EXTENSION_OBJECT}$/ => [
|
40
|
+
proc do |task_name|
|
41
|
+
@ceedling[SUBPROJECTS_SYM].find_library_assembly_file_for_object(task_name)
|
42
|
+
end
|
43
|
+
]) do |object|
|
44
|
+
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_PATHS_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_paths(object.source, :asm))
|
45
|
+
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_DEFINES_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_defines(object.source, :asm))
|
46
|
+
@ceedling[:generator].generate_object_file(
|
47
|
+
TOOLS_SUBPROJECTS_ASSEMBLER,
|
48
|
+
OPERATION_ASSEMBLE_SYM,
|
49
|
+
SUBPROJECTS_SYM,
|
50
|
+
object.source,
|
51
|
+
object.name )
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# Add a rule for building object files from C files to link into a library
|
56
|
+
rule(/#{subproj_build_c}#{'.+\\'+EXTENSION_OBJECT}$/ => [
|
57
|
+
proc do |task_name|
|
58
|
+
@ceedling[SUBPROJECTS_SYM].find_library_source_file_for_object(task_name)
|
59
|
+
end
|
60
|
+
]) do |object|
|
61
|
+
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_PATHS_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_paths(object.source, :c))
|
62
|
+
@ceedling[SUBPROJECTS_SYM].replace_constant(:COLLECTION_DEFINES_SUBPROJECTS, @ceedling[SUBPROJECTS_SYM].find_my_defines(object.source, :c))
|
63
|
+
@ceedling[:generator].generate_object_file(
|
64
|
+
TOOLS_SUBPROJECTS_COMPILER,
|
65
|
+
OPERATION_COMPILE_SYM,
|
66
|
+
SUBPROJECTS_SYM,
|
67
|
+
object.source,
|
68
|
+
object.name,
|
69
|
+
@ceedling[:file_path_utils].form_release_build_c_list_filepath( object.name ) )
|
70
|
+
end
|
71
|
+
|
72
|
+
# Add the subdirectories involved to our list of those that should be autogenerated
|
73
|
+
task :directories => subproj_directories.clone
|
74
|
+
|
75
|
+
# Finally, add the static library to our RELEASE build dependency list
|
76
|
+
task RELEASE_SYM => ["#{subproj_build_root}/#{subproj_name}#{EXTENSION_SUBPROJECTS}"]
|
77
|
+
end
|
78
|
+
|
@@ -68,15 +68,15 @@ Installing
|
|
68
68
|
==========
|
69
69
|
|
70
70
|
The first thing you need to do to install CMock is to get yourself
|
71
|
-
a copy of Ruby. If you're on linux or osx, you probably already
|
71
|
+
a copy of Ruby. If you're on linux or osx, you probably already
|
72
72
|
have it. You can prove it by typing the following:
|
73
73
|
|
74
74
|
ruby --version
|
75
|
-
|
75
|
+
|
76
76
|
|
77
77
|
If it replied in a way that implies ignorance, then you're going to
|
78
|
-
need to install it. You can go to [ruby-lang](https://ruby-lang.org)
|
79
|
-
to get the latest version. You're also going to need to do that if it
|
78
|
+
need to install it. You can go to [ruby-lang](https://ruby-lang.org)
|
79
|
+
to get the latest version. You're also going to need to do that if it
|
80
80
|
replied with a version that is older than 2.0.0. Go ahead. We'll wait.
|
81
81
|
|
82
82
|
Once you have Ruby, you have three options:
|
@@ -128,12 +128,12 @@ if there are some.
|
|
128
128
|
Array:
|
129
129
|
------
|
130
130
|
|
131
|
-
An ExpectWithArray is another variant of Expect. Like expect, it cares about
|
132
|
-
the number of times a mock is called, the arguments it is called with, and the
|
133
|
-
values it is to return. This variant has another feature, though. For anything
|
134
|
-
that resembles a pointer or array, it breaks the argument into TWO arguments.
|
131
|
+
An ExpectWithArray is another variant of Expect. Like expect, it cares about
|
132
|
+
the number of times a mock is called, the arguments it is called with, and the
|
133
|
+
values it is to return. This variant has another feature, though. For anything
|
134
|
+
that resembles a pointer or array, it breaks the argument into TWO arguments.
|
135
135
|
The first is the original pointer. The second specify the number of elements
|
136
|
-
it is to verify of that array. If you specify 1, it'll check one object. If 2,
|
136
|
+
it is to verify of that array. If you specify 1, it'll check one object. If 2,
|
137
137
|
it'll assume your pointer is pointing at the first of two elements in an array.
|
138
138
|
If you specify zero elements, it will check just the pointer if
|
139
139
|
`:smart` mode is configured or fail if `:compare_data` is set.
|
@@ -151,9 +151,9 @@ Maybe you don't care about the number of times a particular function is called o
|
|
151
151
|
the actual arguments it is called with. In that case, you want to use Ignore. Ignore
|
152
152
|
only needs to be called once per test. It will then ignore any further calls to that
|
153
153
|
particular mock. The IgnoreAndReturn works similarly, except that it has the added
|
154
|
-
benefit of knowing what to return when that call happens. If the mock is called more
|
154
|
+
benefit of knowing what to return when that call happens. If the mock is called more
|
155
155
|
times than IgnoreAndReturn was called, it will keep returning the last value without
|
156
|
-
complaint. If it's called less times, it will also ignore that. You SAID you didn't
|
156
|
+
complaint. If it's called less times, it will also ignore that. You SAID you didn't
|
157
157
|
care how many times it was called, right?
|
158
158
|
|
159
159
|
* `void func(void)` => `void func_Ignore(void)`
|
@@ -179,7 +179,7 @@ ReturnThruPtr:
|
|
179
179
|
--------------
|
180
180
|
|
181
181
|
Another option which operates on a particular argument of a function is the ReturnThruPtr
|
182
|
-
plugin. For every argument that resembles a pointer or reference, CMock generates an
|
182
|
+
plugin. For every argument that resembles a pointer or reference, CMock generates an
|
183
183
|
instance of this function. Just as the AndReturn functions support injecting one or more
|
184
184
|
return values into a queue, this function lets you specify one or more return values which
|
185
185
|
are queued up and copied into the space being pointed at each time the mock is called.
|
@@ -195,7 +195,7 @@ Callback:
|
|
195
195
|
If all those other options don't work, and you really need to do something custom, you
|
196
196
|
still have a choice. As soon as you stub a callback in a test, it will call the callback
|
197
197
|
whenever the mock is encountered and return the retval returned from the callback (if any)
|
198
|
-
instead of performing the usual expect checks. It can be configured to check the arguments
|
198
|
+
instead of performing the usual expect checks. It can be configured to check the arguments
|
199
199
|
first (like expects) or just jump directly to the callback.
|
200
200
|
|
201
201
|
* `void func(void)` => `void func_StubWithCallback(CMOCK_func_CALLBACK callback)`
|
@@ -211,8 +211,8 @@ where `CMOCK_func_CALLBACK` looks like: `retval func(params, int NumCalls)`
|
|
211
211
|
Cexception:
|
212
212
|
-----------
|
213
213
|
|
214
|
-
Finally, if you are using Cexception for error handling, you can use this to throw errors
|
215
|
-
from inside mocks. Like Expects, it remembers which call was supposed to throw the error,
|
214
|
+
Finally, if you are using Cexception for error handling, you can use this to throw errors
|
215
|
+
from inside mocks. Like Expects, it remembers which call was supposed to throw the error,
|
216
216
|
and it still checks parameters first.
|
217
217
|
|
218
218
|
* `void func(void)` => `void func_ExpectAndThrow(value_to_throw)`
|
@@ -295,8 +295,8 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
295
295
|
These are attributes that CMock should ignore for you for testing
|
296
296
|
purposes. Custom compiler extensions and externs are handy things to
|
297
297
|
put here. If your compiler is choking on some extended syntax, this
|
298
|
-
is often a good place to look.
|
299
|
-
|
298
|
+
is often a good place to look.
|
299
|
+
|
300
300
|
* defaults: ['__ramfunc', '__irq', '__fiq', 'register', 'extern']
|
301
301
|
* **note:** this option will reinsert these attributes onto the mock's calls.
|
302
302
|
If that isn't what you are looking for, check out :strippables.
|
@@ -306,16 +306,16 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
306
306
|
might show up in your codebase. If it encounters something it doesn't
|
307
307
|
recognize, it's not going to mock it. We have the most common covered,
|
308
308
|
but there are many compilers out there, and therefore many other options.
|
309
|
-
|
309
|
+
|
310
310
|
* defaults: ['__stdcall', '__cdecl', '__fastcall']
|
311
311
|
* **note:** this option will reinsert these attributes onto the mock's calls.
|
312
312
|
If that isn't what you are looking for, check out :strippables.
|
313
313
|
|
314
314
|
* `:callback_after_arg_check`:
|
315
315
|
Tell `:callback` plugin to do the normal argument checking **before** it
|
316
|
-
calls the callback function by setting this to true.
|
316
|
+
calls the callback function by setting this to true. When false, the
|
317
317
|
callback function is called **instead** of the argument verification.
|
318
|
-
|
318
|
+
|
319
319
|
* default: false
|
320
320
|
|
321
321
|
* `:callback_include_count`:
|
@@ -323,14 +323,14 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
323
323
|
number of times the callback has been called. If set to false, the
|
324
324
|
callback has the same interface as the mocked function. This can be
|
325
325
|
handy when you're wanting to use callback as a stub.
|
326
|
-
|
326
|
+
|
327
327
|
* default: true
|
328
328
|
|
329
329
|
* `:cexception_include`:
|
330
330
|
Tell `:cexception` plugin where to find CException.h... You only need to
|
331
331
|
define this if it's not in your build path already... which it usually
|
332
332
|
will be for the purpose of your builds.
|
333
|
-
|
333
|
+
|
334
334
|
* default: *nil*
|
335
335
|
|
336
336
|
* `:enforce_strict_ordering`:
|
@@ -339,14 +339,14 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
339
339
|
will verify that the sizes are in the order you specified. You might
|
340
340
|
*also* want to make sure that all different functions are called in a
|
341
341
|
particular order. If so, set this to true.
|
342
|
-
|
342
|
+
|
343
343
|
* default: false
|
344
344
|
|
345
345
|
* `:framework`:
|
346
346
|
Currently the only option is `:unity.` Eventually if we support other
|
347
347
|
unity test frameworks (or if you write one for us), they'll get added
|
348
348
|
here.
|
349
|
-
|
349
|
+
|
350
350
|
: default: :unity
|
351
351
|
|
352
352
|
* `:includes`:
|
@@ -354,11 +354,11 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
354
354
|
mocks. Useful for global types and definitions used in your project.
|
355
355
|
There are more specific versions if you care WHERE in the mock files
|
356
356
|
the includes get placed. You can define any or all of these options.
|
357
|
-
|
357
|
+
|
358
358
|
* `:includes`
|
359
359
|
* `:includes_h_pre_orig_header`
|
360
360
|
* `:includes_h_post_orig_header`
|
361
|
-
* `:includes_c_pre_header`
|
361
|
+
* `:includes_c_pre_header`
|
362
362
|
* `:includes_c_post_header`
|
363
363
|
* default: nil #for all 5 options
|
364
364
|
|
@@ -368,60 +368,60 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
368
368
|
the time (though it tries its best). If it comes across a type it doesn't
|
369
369
|
recognize, you have a choice on how you want it to handle it. It can either
|
370
370
|
perform a raw memory comparison and report any differences, or it can fail
|
371
|
-
with a meaningful message. Either way, this feature will only happen after
|
371
|
+
with a meaningful message. Either way, this feature will only happen after
|
372
372
|
all other mechanisms have failed (The thing encountered isn't a standard
|
373
373
|
type. It isn't in the :treat_as list. It isn't in a custom unity_helper).
|
374
374
|
|
375
375
|
* default: true
|
376
|
-
|
376
|
+
|
377
377
|
* `:mock_path`:
|
378
378
|
The directory where you would like the mock files generated to be
|
379
379
|
placed.
|
380
|
-
|
380
|
+
|
381
381
|
* default: mocks
|
382
382
|
|
383
383
|
* `:mock_prefix`:
|
384
384
|
The prefix to prepend to your mock files. For example, if it's “Mock”, a file
|
385
385
|
“USART.h” will get a mock called “MockUSART.c”. This CAN be used with a suffix
|
386
386
|
at the same time.
|
387
|
-
|
387
|
+
|
388
388
|
* default: Mock
|
389
389
|
|
390
390
|
* `:mock_suffix`:
|
391
391
|
The suffix to append to your mock files. For example, it it's "_Mock", a file
|
392
392
|
"USART.h" will get a mock called "USART_Mock.h". This CAN be used with a prefix
|
393
393
|
at the same time.
|
394
|
-
|
394
|
+
|
395
395
|
* default: ""
|
396
396
|
|
397
397
|
* `:plugins`:
|
398
398
|
An array of which plugins to enable. ':expect' is always active. Also
|
399
399
|
available currently:
|
400
|
-
|
401
|
-
* `:ignore`
|
402
|
-
* `:ignore_arg`
|
400
|
+
|
401
|
+
* `:ignore`
|
402
|
+
* `:ignore_arg`
|
403
403
|
* `:expect_any_args`
|
404
404
|
* `:array`
|
405
|
-
* `:cexception`
|
406
|
-
* `:callback`
|
405
|
+
* `:cexception`
|
406
|
+
* `:callback`
|
407
407
|
* `:return_thru_ptr`
|
408
408
|
|
409
409
|
* `:strippables`:
|
410
410
|
An array containing a list of items to remove from the header
|
411
411
|
before deciding what should be mocked. This can be something simple
|
412
412
|
like a compiler extension CMock wouldn't recognize, or could be a
|
413
|
-
regex to reject certain function name patterns. This is a great way to
|
413
|
+
regex to reject certain function name patterns. This is a great way to
|
414
414
|
get rid of compiler extensions when your test compiler doesn't support
|
415
415
|
them. For example, use `:strippables: ['(?:functionName\s*\(+.*?\)+)']`
|
416
416
|
to prevent a function `functionName` from being mocked. By default, it
|
417
417
|
is ignoring all gcc attribute extensions.
|
418
|
-
|
418
|
+
|
419
419
|
* default: ['(?:__attribute__\s*\(+.*?\)+)']
|
420
|
-
|
420
|
+
|
421
421
|
* `:subdir`:
|
422
|
-
This is a relative subdirectory for your mocks. Set this to e.g. "sys" in
|
422
|
+
This is a relative subdirectory for your mocks. Set this to e.g. "sys" in
|
423
423
|
order to create a mock for `sys/types.h` in `(:mock_path)/sys/`.
|
424
|
-
|
424
|
+
|
425
425
|
* default: ""
|
426
426
|
|
427
427
|
* `:treat_as`:
|
@@ -432,11 +432,11 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
432
432
|
did that one for you). Maybe you have a type that is a pointer to an
|
433
433
|
array of unsigned characters? No problem, just add 'UINT8_T*' =>
|
434
434
|
'HEX8*'
|
435
|
-
|
436
|
-
* NOTE: unlike the other options, your specifications MERGE with the
|
435
|
+
|
436
|
+
* NOTE: unlike the other options, your specifications MERGE with the
|
437
437
|
default list. Therefore, if you want to override something, you must
|
438
438
|
reassign it to something else (or to *nil* if you don't want it)
|
439
|
-
|
439
|
+
|
440
440
|
* default:
|
441
441
|
* 'int': 'INT'
|
442
442
|
* 'char': 'INT8'
|
@@ -483,14 +483,14 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
483
483
|
We've seen "fun" legacy systems typedef 'void' with a custom type,
|
484
484
|
like MY_VOID. Add any instances of those to this list to help CMock
|
485
485
|
understand how to deal with your code.
|
486
|
-
|
486
|
+
|
487
487
|
* default: []
|
488
488
|
|
489
489
|
* `:treat_externs`:
|
490
490
|
This specifies how you want CMock to handle functions that have been
|
491
491
|
marked as extern in the header file. Should it mock them?
|
492
|
-
|
493
|
-
* `:include` will mock externed functions
|
492
|
+
|
493
|
+
* `:include` will mock externed functions
|
494
494
|
* `:exclude` will ignore externed functions (default).
|
495
495
|
|
496
496
|
* `:unity_helper_path`:
|
@@ -500,23 +500,23 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
500
500
|
trick is that you make sure you follow the naming convention:
|
501
501
|
`UNITY_TEST_ASSERT_EQUAL_YourType`. If it finds macros of the right
|
502
502
|
shape that match that pattern, it'll use them.
|
503
|
-
|
503
|
+
|
504
504
|
* default: []
|
505
505
|
|
506
506
|
* `:verbosity`:
|
507
|
-
How loud
|
508
|
-
|
507
|
+
How loud should CMock be?
|
508
|
+
|
509
509
|
* 0 for errors only
|
510
510
|
* 1 for errors and warnings
|
511
|
-
* 2 for normal (default)
|
511
|
+
* 2 for normal (default)
|
512
512
|
* 3 for verbose
|
513
513
|
|
514
514
|
* `:weak`:
|
515
|
-
When set this to some value, the generated mocks are defined as weak
|
515
|
+
When set this to some value, the generated mocks are defined as weak
|
516
516
|
symbols using the configured format. This allows them to be overridden
|
517
|
-
in particular tests.
|
518
|
-
|
519
|
-
* Set to '__attribute ((weak))' for weak mocks when using GCC.
|
517
|
+
in particular tests.
|
518
|
+
|
519
|
+
* Set to '__attribute ((weak))' for weak mocks when using GCC.
|
520
520
|
* Set to any non-empty string for weak mocks when using IAR.
|
521
521
|
* default: ""
|
522
522
|
|
@@ -525,7 +525,7 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
525
525
|
it, it usually contains function prototypes (otherwise what was the
|
526
526
|
point?). You can control what happens when this isn't true. You can
|
527
527
|
set this to `:warn,` `:ignore,` or `:error`
|
528
|
-
|
528
|
+
|
529
529
|
* default: :warn
|
530
530
|
|
531
531
|
* `:when_ptr`:
|
@@ -538,15 +538,30 @@ from the defaults. We've tried to specify what the defaults are below.
|
|
538
538
|
single element of what is being pointed to. So if you have a pointer
|
539
539
|
to a struct called ORGAN_T, it will compare one ORGAN_T (whatever that
|
540
540
|
is).
|
541
|
-
|
541
|
+
|
542
542
|
* default: :smart
|
543
543
|
|
544
|
+
* `:fail_on_unexpected_calls`:
|
545
|
+
By default, CMock will fail a test if a mock is called without _Expect and _Ignore
|
546
|
+
called first. While this forces test writers to be more explicit in their expectations,
|
547
|
+
it can clutter tests with _Expect or _Ignore calls for functions which are not the focus
|
548
|
+
of the test. While this is a good indicator that this module should be refactored, some
|
549
|
+
users are not fans of the additional noise.
|
550
|
+
|
551
|
+
Therefore, :fail_on_unexpected_calls can be set to false to force all mocks to start with
|
552
|
+
the assumption that they are operating as _Ignore unless otherwise specified.
|
553
|
+
|
554
|
+
* default: true
|
555
|
+
* **note:**
|
556
|
+
If this option is disabled, the mocked functions will return
|
557
|
+
a default value (0) when called (and only if they have to return something of course).
|
558
|
+
|
544
559
|
|
545
560
|
Compiled Options:
|
546
561
|
-----------------
|
547
562
|
|
548
563
|
A number of #defines also exist for customizing the cmock experience.
|
549
|
-
Feel free to pass these into your compiler or whatever is most
|
564
|
+
Feel free to pass these into your compiler or whatever is most
|
550
565
|
convenient. CMock will otherwise do its best to guess what you want
|
551
566
|
based on other settings, particularly Unity's settings.
|
552
567
|
|
@@ -580,9 +595,9 @@ based on other settings, particularly Unity's settings.
|
|
580
595
|
Examples
|
581
596
|
========
|
582
597
|
|
583
|
-
You can look in the examples directory for a couple of examples on how
|
598
|
+
You can look in the [examples directory](/examples/) for a couple of examples on how
|
584
599
|
you might tool CMock into your build process. You may also want to consider
|
585
600
|
using [Ceedling](https://throwtheswitch.org/Ceedling). Please note that
|
586
|
-
these examples are meant to show how the build process works. They have
|
601
|
+
these examples are meant to show how the build process works. They have
|
587
602
|
failing tests ON PURPOSE to show what that would look like. Don't be alarmed. ;)
|
588
603
|
|