ceedling 0.25.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/project_as_gem.yml +13 -0
- data/assets/project_with_guts.yml +13 -0
- data/bin/ceedling +91 -67
- data/docs/CeedlingPacket.md +61 -23
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +4 -1
- data/lib/ceedling/configurator.rb +14 -1
- data/lib/ceedling/configurator_builder.rb +2 -1
- data/lib/ceedling/configurator_validator.rb +12 -3
- data/lib/ceedling/constants.rb +3 -1
- data/lib/ceedling/defaults.rb +12 -1
- data/lib/ceedling/file_finder.rb +3 -0
- data/lib/ceedling/file_path_utils.rb +1 -1
- data/lib/ceedling/file_wrapper.rb +4 -4
- data/lib/ceedling/generator.rb +12 -3
- data/lib/ceedling/preprocessinator_helper.rb +5 -5
- data/lib/ceedling/preprocessinator_includes_handler.rb +10 -1
- data/lib/ceedling/project_config_manager.rb +1 -2
- data/lib/ceedling/project_file_loader.rb +27 -9
- data/lib/ceedling/rakefile.rb +6 -6
- data/lib/ceedling/release_invoker.rb +21 -6
- data/lib/ceedling/rules_release.rake +9 -5
- data/lib/ceedling/rules_tests.rake +6 -1
- data/lib/ceedling/setupinator.rb +1 -0
- data/lib/ceedling/tasks_base.rake +3 -0
- data/lib/ceedling/tasks_filesystem.rake +10 -7
- data/lib/ceedling/tasks_release.rake +3 -1
- data/lib/ceedling/test_includes_extractor.rb +16 -12
- data/lib/ceedling/test_invoker.rb +40 -0
- data/lib/ceedling/version.rb +3 -3
- data/lib/ceedling/version.rb.erb +1 -1
- data/plugins/command_hooks/lib/command_hooks.rb +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +1 -0
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +4 -0
- data/plugins/fake_function_framework/spec/{fff_mock_generator_spec.rb → fff_mock_header_generator_spec.rb} +34 -194
- data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +149 -0
- data/plugins/fake_function_framework/spec/header_generator.rb +51 -0
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +115 -0
- data/plugins/subprojects/README.md +63 -0
- data/plugins/subprojects/config/defaults.yml +33 -0
- data/plugins/subprojects/lib/subprojects.rb +92 -0
- data/plugins/subprojects/subprojects.rake +78 -0
- data/spec/preprocessinator_includes_handler_spec.rb +15 -5
- data/spec/spec_helper.rb +2 -2
- data/spec/spec_system_helper.rb +49 -1
- data/spec/system/deployment_spec.rb +29 -0
- data/vendor/c_exception/README.md +8 -2
- data/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
- data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/vendor/unity/README.md +19 -10
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +396 -330
- data/vendor/c_exception/vendor/unity/src/unity.h +50 -4
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/c_exception/vendor/unity/test/Makefile +17 -17
- data/vendor/c_exception/vendor/unity/test/rakefile +63 -3
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/cmock/README.md +10 -1
- data/vendor/cmock/config/test_environment.rb +7 -7
- data/vendor/cmock/docs/CMock_Summary.md +325 -128
- data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/examples/make_example/Makefile +2 -2
- data/vendor/cmock/examples/temp_sensor/gcc.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/iar_v4.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/iar_v5.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/rakefile.rb +11 -1
- data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +12 -10
- data/vendor/cmock/lib/cmock.rb +0 -3
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +6 -2
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -1
- data/vendor/cmock/lib/cmock_header_parser.rb +5 -6
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/scripts/create_makefile.rb +4 -2
- data/vendor/cmock/scripts/test_summary.rb +17 -9
- data/vendor/cmock/src/cmock.c +1 -0
- data/vendor/cmock/src/cmock.h +1 -1
- data/vendor/cmock/src/cmock_internals.h +14 -1
- data/vendor/cmock/test/c/TestCMockC.yml +4 -4
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +4 -4
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_FLASH.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_RAM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_SIM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_FLASH.xcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_RAM.xcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/ioat91sam7x256.ddf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.dep +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewd +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewp +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.eww +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X-EK.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.inc +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.rdf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.tcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256_inc.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/ioat91sam7x256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/lib_AT91SAM7X256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup.s79 +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup_SAM7.c +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_FLASH.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_RAM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_SIM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_FLASH.icf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_RAM.icf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.dep +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewd +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewp +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.eww +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X-EK.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X256_inc.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/lib_AT91SAM7X256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/project.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_Binary.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_RAM_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup.s +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup_SAM7.c +0 -0
- data/vendor/cmock/{Rakefile → test/rakefile} +9 -9
- data/vendor/cmock/{rakefile_helper.rb → test/rakefile_helper.rb} +13 -13
- data/vendor/cmock/test/system/test_compilation/config.yml +4 -4
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +2 -0
- data/vendor/cmock/{targets → test/targets}/clang_strict.yml +11 -11
- data/vendor/cmock/{targets → test/targets}/gcc.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/gcc_64.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/gcc_tiny.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/iar_arm_v4.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/iar_arm_v5.yml +10 -10
- data/vendor/cmock/test/test_helper.rb +4 -8
- data/vendor/cmock/test/unit/cmock_config_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +3 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +15 -2
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +6 -10
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +1 -1
- data/vendor/cmock/vendor/c_exception/README.md +8 -2
- data/vendor/cmock/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +19 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +396 -330
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +50 -4
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +17 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +63 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/cmock/vendor/unity/README.md +19 -10
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/cmock/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/cmock/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +396 -330
- data/vendor/cmock/vendor/unity/src/unity.h +50 -4
- data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/cmock/vendor/unity/test/Makefile +17 -17
- data/vendor/cmock/vendor/unity/test/rakefile +63 -3
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/deep_merge/Rakefile +1 -1
- data/vendor/unity/README.md +19 -10
- data/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +396 -330
- data/vendor/unity/src/unity.h +50 -4
- data/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/unity/test/Makefile +17 -17
- data/vendor/unity/test/rakefile +63 -3
- data/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/unity/test/tests/testunity.c +1338 -151
- metadata +102 -157
- data/test_graveyard/integration/paths.yml +0 -17
- data/test_graveyard/integration/paths_test.rb +0 -80
- data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +0 -75
- data/test_graveyard/integration/rake_rules_cmock_test.rb +0 -74
- data/test_graveyard/integration/rake_rules_preprocess_test.rb +0 -178
- data/test_graveyard/integration/rake_rules_test.rb +0 -268
- data/test_graveyard/integration/rake_tasks_test.rb +0 -103
- data/test_graveyard/integration_test_helper.rb +0 -34
- data/test_graveyard/rakefile_rules.rb +0 -10
- data/test_graveyard/rakefile_rules_aux_dependencies.rb +0 -10
- data/test_graveyard/rakefile_rules_cmock.rb +0 -10
- data/test_graveyard/rakefile_rules_preprocess.rb +0 -10
- data/test_graveyard/rakefile_tasks.rb +0 -10
- data/test_graveyard/system/file_system_dependencies.yml +0 -20
- data/test_graveyard/system/file_system_kitchen_sink.yml +0 -20
- data/test_graveyard/system/file_system_mocks.yml +0 -20
- data/test_graveyard/system/file_system_preprocess.yml +0 -20
- data/test_graveyard/system/file_system_simple.yml +0 -20
- data/test_graveyard/system/file_system_test.rb +0 -78
- data/test_graveyard/system/mocks/include/a_file.h +0 -2
- data/test_graveyard/system/mocks/include/other_stuff.h +0 -2
- data/test_graveyard/system/mocks/include/stuff.h +0 -3
- data/test_graveyard/system/mocks/source/a_file.c +0 -9
- data/test_graveyard/system/mocks/test/test_a_file.c +0 -41
- data/test_graveyard/system/mocks/test/test_no_file.c +0 -14
- data/test_graveyard/system/project_mocks.yml +0 -43
- data/test_graveyard/system/project_mocks_test.rb +0 -38
- data/test_graveyard/system/project_simple.yml +0 -36
- data/test_graveyard/system/project_simple_test.rb +0 -39
- data/test_graveyard/system/rule_mocks_test.rb +0 -44
- data/test_graveyard/system/rule_runners_test.rb +0 -44
- data/test_graveyard/system/simple/include/other_stuff.h +0 -2
- data/test_graveyard/system/simple/include/stuff.h +0 -3
- data/test_graveyard/system/simple/source/other_stuff.c +0 -6
- data/test_graveyard/system/simple/source/stuff.c +0 -7
- data/test_graveyard/system/simple/test/test_other_stuff.c +0 -30
- data/test_graveyard/system/simple/test/test_stuff.c +0 -51
- data/test_graveyard/system_test_helper.rb +0 -73
- data/test_graveyard/test_helper.rb +0 -93
- data/test_graveyard/unit/busted/configurator_builder_test.rb +0 -569
- data/test_graveyard/unit/busted/configurator_helper_test.rb +0 -234
- data/test_graveyard/unit/busted/configurator_test.rb +0 -232
- data/test_graveyard/unit/busted/configurator_validator_test.rb +0 -169
- data/test_graveyard/unit/busted/deep_merge_fix_test.rb +0 -55
- data/test_graveyard/unit/busted/dependinator_test.rb +0 -129
- data/test_graveyard/unit/busted/file_finder_helper_test.rb +0 -45
- data/test_graveyard/unit/busted/file_finder_test.rb +0 -114
- data/test_graveyard/unit/busted/file_path_utils_test.rb +0 -97
- data/test_graveyard/unit/busted/file_system_utils_test.rb +0 -21
- data/test_graveyard/unit/busted/generator_test.rb +0 -187
- data/test_graveyard/unit/busted/generator_test_results_test.rb +0 -129
- data/test_graveyard/unit/busted/generator_test_runner_test.rb +0 -475
- data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +0 -39
- data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +0 -156
- data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +0 -93
- data/test_graveyard/unit/busted/preprocessinator_test.rb +0 -57
- data/test_graveyard/unit/busted/project_file_loader_test.rb +0 -142
- data/test_graveyard/unit/busted/setupinator_test.rb +0 -45
- data/test_graveyard/unit/busted/streaminator_test.rb +0 -49
- data/test_graveyard/unit/busted/task_invoker_test.rb +0 -69
- data/test_graveyard/unit/busted/test_includes_extractor_test.rb +0 -111
- data/test_graveyard/unit/busted/test_invoker_helper_test.rb +0 -62
- data/test_graveyard/unit/busted/test_invoker_test.rb +0 -47
- data/test_graveyard/unit/busted/tool_executor_helper_test.rb +0 -100
- data/test_graveyard/unit/busted/tool_executor_test.rb +0 -351
- data/test_graveyard/unit/busted/verbosinator_test.rb +0 -65
- data/test_graveyard/unit/preprocessinator_extractor_test.rb +0 -731
- data/test_graveyard/unit_test_helper.rb +0 -16
- data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/cmock/docs/CMock Summary.odt +0 -0
- data/vendor/cmock/docs/CMock Summary.pdf +0 -0
- 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/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
@@ -25,12 +25,17 @@ end
|
|
25
25
|
|
26
26
|
|
27
27
|
rule(/#{PROJECT_TEST_BUILD_OUTPUT_PATH}\/#{'.+\\'+EXTENSION_EXECUTABLE}$/) do |bin_file|
|
28
|
+
|
29
|
+
lib_args = ((defined? LIBRARIES_SYSTEM) ? LIBRARIES_SYSTEM : [])
|
30
|
+
lib_args.map! {|v| LIBRARIES_FLAG.gsub(/\$\{1\}/, v) } if (defined? LIBRARIES_FLAG)
|
31
|
+
|
28
32
|
@ceedling[:generator].generate_executable_file(
|
29
33
|
TOOLS_TEST_LINKER,
|
30
34
|
TEST_SYM,
|
31
35
|
bin_file.prerequisites,
|
32
36
|
bin_file.name,
|
33
|
-
@ceedling[:file_path_utils].form_test_build_map_filepath( bin_file.name )
|
37
|
+
@ceedling[:file_path_utils].form_test_build_map_filepath( bin_file.name ),
|
38
|
+
lib_args )
|
34
39
|
end
|
35
40
|
|
36
41
|
|
data/lib/ceedling/setupinator.rb
CHANGED
@@ -24,6 +24,7 @@ class Setupinator
|
|
24
24
|
@ceedling[:configurator].populate_unity_defaults( config_hash )
|
25
25
|
@ceedling[:configurator].populate_cmock_defaults( config_hash )
|
26
26
|
@ceedling[:configurator].find_and_merge_plugins( config_hash )
|
27
|
+
@ceedling[:configurator].merge_imports( config_hash )
|
27
28
|
@ceedling[:configurator].tools_setup( config_hash )
|
28
29
|
@ceedling[:configurator].eval_environment_variables( config_hash )
|
29
30
|
@ceedling[:configurator].eval_paths( config_hash )
|
@@ -92,6 +92,9 @@ namespace :options do
|
|
92
92
|
# @ceedling[:setupinator].reset_defaults( @ceedling[:setupinator].config_hash )
|
93
93
|
hash = @ceedling[:project_config_manager].merge_options( @ceedling[:setupinator].config_hash, option_path )
|
94
94
|
@ceedling[:setupinator].do_setup( hash )
|
95
|
+
if @ceedling[:configurator].project_release_build
|
96
|
+
load(File.join(CEEDLING_LIB, 'ceedling', 'rules_release.rake'))
|
97
|
+
end
|
95
98
|
end
|
96
99
|
end
|
97
100
|
|
@@ -18,6 +18,9 @@ CLOBBER.include(File.join(PROJECT_BUILD_RELEASE_ROOT, '**/*'))
|
|
18
18
|
CLOBBER.include(File.join(PROJECT_LOG_PATH, '**/*'))
|
19
19
|
CLOBBER.include(File.join(PROJECT_TEMP_PATH, '**/*'))
|
20
20
|
|
21
|
+
# just in case they're using git, let's make sure we allow them to preserved the build directory if desired.
|
22
|
+
CLOBBER.exclude(File.join(TESTS_BASE_PATH), '**/.gitkeep')
|
23
|
+
|
21
24
|
# because of cmock config, mock path can optionally exist apart from standard test build paths
|
22
25
|
CLOBBER.include(File.join(CMOCK_MOCK_PATH, '*'))
|
23
26
|
|
@@ -49,35 +52,35 @@ task(:directories => PROJECT_BUILD_PATHS) { @ceedling[:dependinator].touch_force
|
|
49
52
|
|
50
53
|
# list paths discovered at load time
|
51
54
|
namespace :paths do
|
52
|
-
|
55
|
+
|
53
56
|
paths = @ceedling[:setupinator].config_hash[:paths]
|
54
57
|
paths.each_key do |section|
|
55
58
|
name = section.to_s.downcase
|
56
59
|
path_list = Object.const_get("COLLECTION_PATHS_#{name.upcase}")
|
57
|
-
|
60
|
+
|
58
61
|
if (path_list.size != 0)
|
59
62
|
desc "List all collected #{name} paths."
|
60
63
|
task(name.to_sym) { puts "#{name} paths:"; path_list.sort.each {|path| puts " - #{path}" } }
|
61
64
|
end
|
62
65
|
end
|
63
|
-
|
66
|
+
|
64
67
|
end
|
65
68
|
|
66
69
|
|
67
70
|
# list files & file counts discovered at load time
|
68
71
|
namespace :files do
|
69
|
-
|
72
|
+
|
70
73
|
categories = [
|
71
74
|
['test', COLLECTION_ALL_TESTS],
|
72
75
|
['source', COLLECTION_ALL_SOURCE],
|
73
76
|
['header', COLLECTION_ALL_HEADERS]
|
74
77
|
]
|
75
78
|
categories << ['assembly', COLLECTION_ALL_ASSEMBLY] if (RELEASE_BUILD_USE_ASSEMBLY)
|
76
|
-
|
79
|
+
|
77
80
|
categories.each do |category|
|
78
81
|
name = category[0]
|
79
82
|
collection = category[1]
|
80
|
-
|
83
|
+
|
81
84
|
desc "List all collected #{name} files."
|
82
85
|
task(name.to_sym) do
|
83
86
|
puts "#{name} files:"
|
@@ -85,7 +88,7 @@ namespace :files do
|
|
85
88
|
puts "file count: #{collection.size}"
|
86
89
|
end
|
87
90
|
end
|
88
|
-
|
91
|
+
|
89
92
|
end
|
90
93
|
|
91
94
|
|
@@ -19,7 +19,9 @@ task RELEASE_SYM => [:directories] do
|
|
19
19
|
# if assembler use isn't enabled, COLLECTION_ALL_ASSEMBLY is empty array & nothing happens
|
20
20
|
core_objects.concat( @ceedling[:release_invoker].setup_and_invoke_asm_objects( COLLECTION_ALL_ASSEMBLY ) )
|
21
21
|
|
22
|
-
|
22
|
+
# if we're using libraries, we need to add those to our collection as well
|
23
|
+
library_objects = (defined? LIBRARIES_RELEASE && !LIBRARIES_RELEASE.empty?) ? LIBRARIES_RELEASE.flatten.compact : []
|
24
|
+
file( PROJECT_RELEASE_BUILD_TARGET => (core_objects + extra_objects + library_objects) )
|
23
25
|
Rake::Task[PROJECT_RELEASE_BUILD_TARGET].invoke
|
24
26
|
ensure
|
25
27
|
@ceedling[:plugin_manager].post_release
|
@@ -3,7 +3,6 @@ class TestIncludesExtractor
|
|
3
3
|
|
4
4
|
constructor :configurator, :yaml_wrapper, :file_wrapper
|
5
5
|
|
6
|
-
|
7
6
|
def setup
|
8
7
|
@includes = {}
|
9
8
|
@mocks = {}
|
@@ -26,16 +25,16 @@ class TestIncludesExtractor
|
|
26
25
|
return [] if @mocks[file_key].nil?
|
27
26
|
return @mocks[file_key]
|
28
27
|
end
|
29
|
-
|
28
|
+
|
30
29
|
# includes with file extension
|
31
30
|
def lookup_includes_list(file)
|
32
31
|
file_key = form_file_key(file)
|
33
32
|
return [] if (@includes[file_key]).nil?
|
34
33
|
return @includes[file_key]
|
35
34
|
end
|
36
|
-
|
35
|
+
|
37
36
|
private #################################
|
38
|
-
|
37
|
+
|
39
38
|
def form_file_key(filepath)
|
40
39
|
return File.basename(filepath).to_sym
|
41
40
|
end
|
@@ -43,21 +42,26 @@ class TestIncludesExtractor
|
|
43
42
|
def extract_from_file(file)
|
44
43
|
includes = []
|
45
44
|
header_extension = @configurator.extension_header
|
46
|
-
|
45
|
+
|
47
46
|
contents = @file_wrapper.read(file)
|
48
47
|
|
49
48
|
# remove line comments
|
50
49
|
contents = contents.gsub(/\/\/.*$/, '')
|
51
50
|
# remove block comments
|
52
51
|
contents = contents.gsub(/\/\*.*?\*\//m, '')
|
53
|
-
|
52
|
+
|
54
53
|
contents.split("\n").each do |line|
|
55
54
|
# look for include statement
|
56
55
|
scan_results = line.scan(/#include\s+\"\s*(.+#{'\\'+header_extension})\s*\"/)
|
57
|
-
|
56
|
+
|
57
|
+
includes << scan_results[0][0] if (scan_results.size > 0)
|
58
|
+
|
59
|
+
# look for TEST_FILE statement
|
60
|
+
scan_results = line.scan(/TEST_FILE\(\s*\"\s*(.+\.\w+)\s*\"\s*\)/)
|
61
|
+
|
58
62
|
includes << scan_results[0][0] if (scan_results.size > 0)
|
59
63
|
end
|
60
|
-
|
64
|
+
|
61
65
|
return includes.uniq
|
62
66
|
end
|
63
67
|
|
@@ -66,16 +70,16 @@ class TestIncludesExtractor
|
|
66
70
|
header_extension = @configurator.extension_header
|
67
71
|
file_key = form_file_key(file)
|
68
72
|
@mocks[file_key] = []
|
69
|
-
|
73
|
+
|
70
74
|
# add includes to lookup hash
|
71
75
|
@includes[file_key] = includes
|
72
|
-
|
73
|
-
includes.each do |include_file|
|
76
|
+
|
77
|
+
includes.each do |include_file|
|
74
78
|
# check if include is a mock
|
75
79
|
scan_results = include_file.scan(/(#{mock_prefix}.+)#{'\\'+header_extension}/)
|
76
80
|
# add mock to lookup hash
|
77
81
|
@mocks[file_key] << scan_results[0][0] if (scan_results.size > 0)
|
78
82
|
end
|
79
83
|
end
|
80
|
-
|
84
|
+
|
81
85
|
end
|
@@ -23,6 +23,37 @@ class TestInvoker
|
|
23
23
|
@mocks = []
|
24
24
|
end
|
25
25
|
|
26
|
+
def get_test_definition_str(test)
|
27
|
+
return "-D" + File.basename(test, File.extname(test)).upcase.sub(/@.*$/, "")
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_tools_compilers
|
31
|
+
tools_compilers = Hash.new
|
32
|
+
tools_compilers["for unit test"] = TOOLS_TEST_COMPILER if defined? TOOLS_TEST_COMPILER
|
33
|
+
tools_compilers["for gcov"] = TOOLS_GCOV_COMPILER if defined? TOOLS_GCOV_COMPILER
|
34
|
+
return tools_compilers
|
35
|
+
end
|
36
|
+
|
37
|
+
def add_test_definition(test)
|
38
|
+
test_definition_str = get_test_definition_str(test)
|
39
|
+
get_tools_compilers.each do |tools_compiler_key, tools_compiler_value|
|
40
|
+
tools_compiler_value[:arguments].push("-D#{File.basename(test, ".*").strip.upcase.sub(/@.*$/, "")}")
|
41
|
+
@streaminator.stdout_puts("Add the definition value in the build option #{tools_compiler_value[:arguments][-1]} #{tools_compiler_key}", Verbosity::OBNOXIOUS)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def delete_test_definition(test)
|
46
|
+
test_definition_str = get_test_definition_str(test)
|
47
|
+
get_tools_compilers.each do |tools_compiler_key, tools_compiler_value|
|
48
|
+
num_options = tools_compiler_value[:arguments].size
|
49
|
+
@streaminator.stdout_puts("Delete the definition value in the build option #{tools_compiler_value[:arguments][-1]} #{tools_compiler_key}", Verbosity::OBNOXIOUS)
|
50
|
+
tools_compiler_value[:arguments].delete_if{|i| i == test_definition_str}
|
51
|
+
if num_options > tools_compiler_value[:arguments].size + 1
|
52
|
+
@streaminator.stderr_puts("WARNING: duplicated test definition.")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
26
57
|
def setup_and_invoke(tests, context=TEST_SYM, options={:force_run => true})
|
27
58
|
|
28
59
|
@tests = tests
|
@@ -47,6 +78,11 @@ class TestInvoker
|
|
47
78
|
results_pass = @file_path_utils.form_pass_results_filepath( test )
|
48
79
|
results_fail = @file_path_utils.form_fail_results_filepath( test )
|
49
80
|
|
81
|
+
# add the definition value in the build option for the unit test
|
82
|
+
if @configurator.defines_use_test_definition
|
83
|
+
add_test_definition(test)
|
84
|
+
end
|
85
|
+
|
50
86
|
# clean results files so we have a missing file with which to kick off rake's dependency rules
|
51
87
|
@test_invoker_helper.clean_results( {:pass => results_pass, :fail => results_fail}, options )
|
52
88
|
|
@@ -69,6 +105,10 @@ class TestInvoker
|
|
69
105
|
rescue => e
|
70
106
|
@build_invoker_utils.process_exception( e, context )
|
71
107
|
ensure
|
108
|
+
# delete the definition value in the build option for the unit test
|
109
|
+
if @configurator.defines_use_test_definition
|
110
|
+
delete_test_definition(test)
|
111
|
+
end
|
72
112
|
@plugin_manager.post_test( test )
|
73
113
|
end
|
74
114
|
|
data/lib/ceedling/version.rb
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
module Ceedling
|
3
3
|
module Version
|
4
4
|
# @private
|
5
|
-
GEM = "0.
|
5
|
+
GEM = "0.27.0"
|
6
6
|
# @private
|
7
7
|
CEEDLING = GEM
|
8
8
|
# @private
|
9
9
|
CEXCEPTION = "1.3.1"
|
10
10
|
# @private
|
11
|
-
CMOCK = "2.4.
|
11
|
+
CMOCK = "2.4.4"
|
12
12
|
# @private
|
13
|
-
UNITY = "2.4.
|
13
|
+
UNITY = "2.4.1"
|
14
14
|
end
|
15
15
|
end
|
data/lib/ceedling/version.rb.erb
CHANGED
@@ -46,7 +46,7 @@ class CommandHooks < Plugin
|
|
46
46
|
|
47
47
|
private
|
48
48
|
|
49
|
-
def run_hook_step(hook, name)
|
49
|
+
def run_hook_step(hook, name="")
|
50
50
|
if (hook[:executable])
|
51
51
|
cmd = @ceedling[:tool_executor].build_command_line( hook, [], name )
|
52
52
|
shell_result = @ceedling[:tool_executor].exec( cmd[:line], cmd[:options] )
|
@@ -9,5 +9,6 @@ void bar_print_message_formatted(const char * format, ...);
|
|
9
9
|
void bar_numbers(int one, int two, char three);
|
10
10
|
void bar_const_test(const char * a, char * const b, const int c);
|
11
11
|
custom_t bar_needs_custom_type(void);
|
12
|
+
const char * bar_return_const_ptr(int one);
|
12
13
|
|
13
14
|
#endif // bar_H
|
@@ -119,6 +119,10 @@ class FffMockGenerator
|
|
119
119
|
parsed_header[:functions].each do |function|
|
120
120
|
name = function[:name]
|
121
121
|
return_type = function[:return][:type]
|
122
|
+
if function.has_key? :modifier
|
123
|
+
# Prepend any modifier. If there isn't one, trim any leading whitespace.
|
124
|
+
return_type = "#{function[:modifier]} #{return_type}".lstrip
|
125
|
+
end
|
122
126
|
arg_count = function[:args].size
|
123
127
|
|
124
128
|
# Check for variable arguments.
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'stringio'
|
2
2
|
require 'fff_mock_generator.rb'
|
3
|
+
require 'header_generator.rb'
|
3
4
|
|
5
|
+
# Test the contents of the .h file created for the mock.
|
4
6
|
describe "FffMockGenerator.create_mock_header" do
|
5
7
|
|
6
8
|
context "when there is nothing to mock," do
|
@@ -235,230 +237,68 @@ describe "FffMockGenerator.create_mock_header" do
|
|
235
237
|
end
|
236
238
|
end
|
237
239
|
|
238
|
-
context "when there
|
239
|
-
let(:mock_header)
|
240
|
-
parsed_header = {}
|
241
|
-
FffMockGenerator.create_mock_header("display", "mock_display", parsed_header,
|
242
|
-
[%{"another_header.h"}])
|
243
|
-
}
|
244
|
-
it "then they are included before the other files" do
|
245
|
-
expect(mock_header).to include(
|
246
|
-
%{#include "another_header.h"\n} +
|
247
|
-
%{#include "fff.h"}
|
248
|
-
)
|
249
|
-
end
|
250
|
-
end
|
251
|
-
|
252
|
-
context "when there are post-includes" do
|
253
|
-
let(:mock_header) {
|
254
|
-
parsed_header = {}
|
255
|
-
FffMockGenerator.create_mock_header("display", "mock_display", parsed_header,
|
256
|
-
nil, [%{"another_header.h"}])
|
257
|
-
}
|
258
|
-
it "then they are included after the other files" do
|
259
|
-
expect(mock_header).to include(
|
260
|
-
%{#include "display.h"\n} +
|
261
|
-
%{#include "another_header.h"\n}
|
262
|
-
)
|
263
|
-
end
|
264
|
-
end
|
265
|
-
|
266
|
-
end
|
267
|
-
|
268
|
-
describe "FffMockGenerator.create_mock_source" do
|
269
|
-
|
270
|
-
context "when there is nothing to mock," do
|
271
|
-
let(:mock_source) {
|
272
|
-
parsed_header = {}
|
273
|
-
FffMockGenerator.create_mock_source("mock_my_module", parsed_header)
|
274
|
-
}
|
275
|
-
it "then the generated file includes the fff header" do
|
276
|
-
expect(mock_source).to include(
|
277
|
-
# fff.h also requires including string.h
|
278
|
-
%{#include <string.h>\n} +
|
279
|
-
%{#include "fff.h"}
|
280
|
-
)
|
281
|
-
end
|
282
|
-
it "then the generated file includes the mock header" do
|
283
|
-
expect(mock_source).to include(
|
284
|
-
%{#include "mock_my_module.h"\n}
|
285
|
-
)
|
286
|
-
end
|
287
|
-
it "then the generated file defines the init function" do
|
288
|
-
expect(mock_source).to include(
|
289
|
-
"void mock_my_module_Init(void)\n" +
|
290
|
-
"{\n" +
|
291
|
-
" FFF_RESET_HISTORY();\n" +
|
292
|
-
"}"
|
293
|
-
)
|
294
|
-
end
|
295
|
-
it "then the generated file defines the verify function" do
|
296
|
-
expect(mock_source).to include(
|
297
|
-
"void mock_my_module_Verify(void)\n" +
|
298
|
-
"{\n" +
|
299
|
-
"}"
|
300
|
-
)
|
301
|
-
end
|
302
|
-
it "then the generated file defines the destroy function" do
|
303
|
-
expect(mock_source).to include(
|
304
|
-
"void mock_my_module_Destroy(void)\n" +
|
305
|
-
"{\n" +
|
306
|
-
"}"
|
307
|
-
)
|
308
|
-
end
|
309
|
-
end
|
310
|
-
|
311
|
-
context "when there are multiple functions," do
|
312
|
-
let(:mock_source) {
|
313
|
-
parsed_header = create_cmock_style_parsed_header(
|
314
|
-
[ {:name => 'a_function', :return_type => 'int', :args => ['char *']},
|
315
|
-
{:name => 'another_function', :return_type => 'void'},
|
316
|
-
{:name => 'three', :return_type => 'bool', :args => ['float', 'int']}
|
317
|
-
])
|
318
|
-
FffMockGenerator.create_mock_source("mock_display", parsed_header)
|
319
|
-
}
|
320
|
-
it "then the generated file contains the first fake function definition" do
|
321
|
-
expect(mock_source).to include(
|
322
|
-
"DEFINE_FAKE_VALUE_FUNC1(int, a_function, char *);"
|
323
|
-
)
|
324
|
-
end
|
325
|
-
it "then the generated file contains the second fake function definition" do
|
326
|
-
expect(mock_source).to include(
|
327
|
-
"DEFINE_FAKE_VOID_FUNC0(another_function);"
|
328
|
-
)
|
329
|
-
end
|
330
|
-
it "then the generated file contains the third fake function definition" do
|
331
|
-
expect(mock_source).to include(
|
332
|
-
"DEFINE_FAKE_VALUE_FUNC2(bool, three, float, int);"
|
333
|
-
)
|
334
|
-
end
|
335
|
-
it "then the init function resets all of the fakes" do
|
336
|
-
expect(mock_source).to include(
|
337
|
-
"void mock_display_Init(void)\n" +
|
338
|
-
"{\n" +
|
339
|
-
" FFF_RESET_HISTORY();\n" +
|
340
|
-
" RESET_FAKE(a_function)\n" +
|
341
|
-
" RESET_FAKE(another_function)\n" +
|
342
|
-
" RESET_FAKE(three)\n" +
|
343
|
-
"}"
|
344
|
-
)
|
345
|
-
end
|
346
|
-
end
|
347
|
-
|
348
|
-
context "when there is a void function with variable arguments and " +
|
349
|
-
"additional arguments" do
|
350
|
-
let(:mock_source){
|
240
|
+
context "when there is a function that returns a const pointer" do
|
241
|
+
let(:mock_header){
|
351
242
|
parsed_header = {}
|
352
243
|
parsed_header[:functions] = [{
|
353
|
-
:name => "
|
354
|
-
:
|
355
|
-
:
|
356
|
-
:args => [{:type =>
|
244
|
+
:name => "return_const_pointer_test_function",
|
245
|
+
:modifier => "const",
|
246
|
+
:return => {:type => "char *" },
|
247
|
+
:args => [{:type => "int", :name => "a"}]
|
357
248
|
}]
|
358
|
-
FffMockGenerator.
|
249
|
+
FffMockGenerator.create_mock_header("display", "mock_display", parsed_header)
|
359
250
|
}
|
360
|
-
it "then the generated file contains the
|
361
|
-
expect(
|
362
|
-
"
|
251
|
+
it "then the generated file contains the correct const return value in the declaration" do
|
252
|
+
expect(mock_header).to include(
|
253
|
+
"DECLARE_FAKE_VALUE_FUNC1(const char *, return_const_pointer_test_function, int)"
|
363
254
|
)
|
364
255
|
end
|
365
256
|
end
|
366
|
-
|
367
|
-
context "when there is a function
|
368
|
-
let(:
|
257
|
+
|
258
|
+
context "when there is a function that returns a const int" do
|
259
|
+
let(:mock_header){
|
369
260
|
parsed_header = {}
|
370
261
|
parsed_header[:functions] = [{
|
371
|
-
:name => "
|
372
|
-
:
|
373
|
-
:
|
374
|
-
|
262
|
+
:name => "return_const_int_test_function",
|
263
|
+
:modifier => "const",
|
264
|
+
:return => {:type => "int" },
|
265
|
+
:args => []
|
375
266
|
}]
|
376
|
-
FffMockGenerator.
|
267
|
+
FffMockGenerator.create_mock_header("display", "mock_display", parsed_header)
|
377
268
|
}
|
378
|
-
it "then the generated file contains the correct const
|
379
|
-
expect(
|
380
|
-
"
|
269
|
+
it "then the generated file contains the correct const return value in the declaration" do
|
270
|
+
expect(mock_header).to include(
|
271
|
+
"DECLARE_FAKE_VALUE_FUNC0(const int, return_const_int_test_function)"
|
381
272
|
)
|
382
273
|
end
|
383
274
|
end
|
384
275
|
|
385
276
|
context "when there are pre-includes" do
|
386
|
-
let(:
|
387
|
-
|
388
|
-
FffMockGenerator.
|
277
|
+
let(:mock_header) {
|
278
|
+
parsed_header = {}
|
279
|
+
FffMockGenerator.create_mock_header("display", "mock_display", parsed_header,
|
389
280
|
[%{"another_header.h"}])
|
390
281
|
}
|
391
282
|
it "then they are included before the other files" do
|
392
|
-
expect(
|
283
|
+
expect(mock_header).to include(
|
393
284
|
%{#include "another_header.h"\n} +
|
394
|
-
%{#include
|
285
|
+
%{#include "fff.h"}
|
395
286
|
)
|
396
287
|
end
|
397
288
|
end
|
398
289
|
|
399
290
|
context "when there are post-includes" do
|
400
|
-
let(:
|
401
|
-
|
402
|
-
FffMockGenerator.
|
291
|
+
let(:mock_header) {
|
292
|
+
parsed_header = {}
|
293
|
+
FffMockGenerator.create_mock_header("display", "mock_display", parsed_header,
|
403
294
|
nil, [%{"another_header.h"}])
|
404
295
|
}
|
405
|
-
it "then they are included
|
406
|
-
expect(
|
407
|
-
%{#include "
|
296
|
+
it "then they are included after the other files" do
|
297
|
+
expect(mock_header).to include(
|
298
|
+
%{#include "display.h"\n} +
|
408
299
|
%{#include "another_header.h"\n}
|
409
300
|
)
|
410
301
|
end
|
411
302
|
end
|
412
|
-
end
|
413
|
-
|
414
|
-
# Create a CMock-style parsed header hash. This the type of hash created by
|
415
|
-
# CMock when parsing header files for automock generation. It contains all of
|
416
|
-
# includes, typedefs and functions (with return types and arguments) parsed from
|
417
|
-
# the header file.
|
418
|
-
def create_cmock_style_parsed_header(functions, typedefs = nil)
|
419
|
-
parsed_header = {
|
420
|
-
:includes => nil,
|
421
|
-
:functions => [],
|
422
|
-
:typedefs => []
|
423
|
-
}
|
424
303
|
|
425
|
-
# Add the typedefs.
|
426
|
-
if typedefs
|
427
|
-
typedefs.each do |typedef|
|
428
|
-
parsed_header[:typedefs] << typedef
|
429
|
-
end
|
430
|
-
end
|
431
|
-
|
432
|
-
# Add the functions.
|
433
|
-
if functions
|
434
|
-
functions.each do |function|
|
435
|
-
# Build the array of arguments.
|
436
|
-
args = []
|
437
|
-
if function.key?(:args)
|
438
|
-
function[:args].each do |arg|
|
439
|
-
args << {
|
440
|
-
:type => arg
|
441
|
-
}
|
442
|
-
end
|
443
|
-
end
|
444
|
-
parsed_header[:functions] << {
|
445
|
-
:name => function[:name],
|
446
|
-
:modifier => "",
|
447
|
-
:return => {
|
448
|
-
:type => function[:return_type],
|
449
|
-
:name => "cmock_to_return",
|
450
|
-
:ptr? => false,
|
451
|
-
:const? => false,
|
452
|
-
:str => "void cmock_to_return",
|
453
|
-
:void? => true
|
454
|
-
},
|
455
|
-
:var_arg => nil,
|
456
|
-
:args_string => "void",
|
457
|
-
:args => args,
|
458
|
-
:args_call => "",
|
459
|
-
:contains_ptr? => false
|
460
|
-
}
|
461
|
-
end
|
462
|
-
end
|
463
|
-
parsed_header
|
464
304
|
end
|