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
@@ -180,7 +180,7 @@ class Configurator
|
|
180
180
|
plugin_defaults = @configurator_plugins.find_plugin_defaults(config)
|
181
181
|
|
182
182
|
config_plugins.each do |plugin|
|
183
|
-
config.deep_merge( @yaml_wrapper.load(plugin) )
|
183
|
+
config.deep_merge!( @yaml_wrapper.load(plugin) )
|
184
184
|
end
|
185
185
|
|
186
186
|
plugin_defaults.each do |defaults|
|
@@ -194,6 +194,18 @@ class Configurator
|
|
194
194
|
end
|
195
195
|
|
196
196
|
|
197
|
+
def merge_imports(config)
|
198
|
+
if config[:import]
|
199
|
+
until config[:import].empty?
|
200
|
+
path = config[:import].shift
|
201
|
+
path = @system_wrapper.module_eval(path) if (path =~ RUBY_STRING_REPLACEMENT_PATTERN)
|
202
|
+
config.deep_merge!(@yaml_wrapper.load(path))
|
203
|
+
end
|
204
|
+
end
|
205
|
+
config.delete(:import)
|
206
|
+
end
|
207
|
+
|
208
|
+
|
197
209
|
def eval_environment_variables(config)
|
198
210
|
config[:environment].each do |hash|
|
199
211
|
key = hash.keys[0]
|
@@ -337,3 +349,4 @@ class Configurator
|
|
337
349
|
|
338
350
|
|
339
351
|
end
|
352
|
+
|
@@ -64,7 +64,8 @@ class ConfiguratorBuilder
|
|
64
64
|
def populate_defaults(config, defaults)
|
65
65
|
defaults.keys.sort.each do |section|
|
66
66
|
defaults[section].keys.sort.each do |entry|
|
67
|
-
config[section]
|
67
|
+
config[section] = {} if config[section].nil?
|
68
|
+
config[section][entry] = defaults[section][entry].deep_clone if (config[section][entry].nil?)
|
68
69
|
end
|
69
70
|
end
|
70
71
|
end
|
@@ -78,9 +78,18 @@ class ConfiguratorValidator
|
|
78
78
|
return true if (filepath =~ TOOL_EXECUTOR_ARGUMENT_REPLACEMENT_PATTERN)
|
79
79
|
|
80
80
|
if (not @file_wrapper.exist?(filepath))
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
|
82
|
+
# See if we can deal with it internally.
|
83
|
+
if GENERATED_DIR_PATH.include?(filepath)
|
84
|
+
# we already made this directory before let's make it again.
|
85
|
+
FileUtils.mkdir_p File.join(File.dirname(__FILE__), filepath)
|
86
|
+
@stream_wrapper.stderr_puts("WARNING: Generated filepath #{format_key_sequence(keys, hash[:depth])}['#{filepath}'] does not exist on disk. Recreating")
|
87
|
+
|
88
|
+
else
|
89
|
+
# no verbosity checking since this is lowest level anyhow & verbosity checking depends on configurator
|
90
|
+
@stream_wrapper.stderr_puts("ERROR: Config filepath #{format_key_sequence(keys, hash[:depth])}['#{filepath}'] does not exist on disk.")
|
91
|
+
return false
|
92
|
+
end
|
84
93
|
end
|
85
94
|
|
86
95
|
return true
|
data/lib/ceedling/constants.rb
CHANGED
@@ -36,6 +36,8 @@ unless defined?(PROJECT_ROOT)
|
|
36
36
|
PROJECT_ROOT = Dir.pwd()
|
37
37
|
end
|
38
38
|
|
39
|
+
GENERATED_DIR_PATH = [['vendor', 'ceedling'], 'src', "test", ['test', 'support'], 'build'].each{|p| File.join(*p)}
|
40
|
+
|
39
41
|
EXTENSION_WIN_EXE = '.exe'
|
40
42
|
EXTENSION_NONWIN_EXE = '.out'
|
41
43
|
|
@@ -87,7 +89,7 @@ OPERATION_LINK_SYM = :link unless defined?(OPERATION_LINK_SYM)
|
|
87
89
|
RUBY_STRING_REPLACEMENT_PATTERN = /#\{.+\}/
|
88
90
|
RUBY_EVAL_REPLACEMENT_PATTERN = /^\{(.+)\}$/
|
89
91
|
TOOL_EXECUTOR_ARGUMENT_REPLACEMENT_PATTERN = /(\$\{(\d+)\})/
|
90
|
-
TEST_STDOUT_STATISTICS_PATTERN =
|
92
|
+
TEST_STDOUT_STATISTICS_PATTERN = /\n-+\s*(\d+)\s+Tests\s+(\d+)\s+Failures\s+(\d+)\s+Ignored\s+(OK|FAIL)\s*/i
|
91
93
|
|
92
94
|
NULL_FILE_PATH = '/dev/null'
|
93
95
|
|
data/lib/ceedling/defaults.rb
CHANGED
@@ -4,6 +4,7 @@ require 'ceedling/file_path_utils'
|
|
4
4
|
|
5
5
|
#this should be defined already, but not always during system specs
|
6
6
|
CEEDLING_VENDOR = File.expand_path(File.dirname(__FILE__) + '/../../vendor') unless defined? CEEDLING_VENDOR
|
7
|
+
CEEDLING_PLUGINS = [File.expand_path(File.dirname(__FILE__) + '/../../plugins')] unless defined? CEEDLING_PLUGINS
|
7
8
|
|
8
9
|
DEFAULT_TEST_COMPILER_TOOL = {
|
9
10
|
:executable => FilePathUtils.os_executable_ext('gcc').freeze,
|
@@ -32,6 +33,8 @@ DEFAULT_TEST_LINKER_TOOL = {
|
|
32
33
|
:arguments => [
|
33
34
|
"\"${1}\"".freeze,
|
34
35
|
"-o \"${2}\"".freeze,
|
36
|
+
"".freeze,
|
37
|
+
"${4}".freeze
|
35
38
|
].freeze
|
36
39
|
}
|
37
40
|
|
@@ -276,6 +279,14 @@ DEFAULT_CEEDLING_CONFIG = {
|
|
276
279
|
:test_preprocess => [],
|
277
280
|
:release => [],
|
278
281
|
:release_preprocess => [],
|
282
|
+
:use_test_definition => false,
|
283
|
+
},
|
284
|
+
|
285
|
+
:libraries => {
|
286
|
+
:test => [],
|
287
|
+
:test_preprocess => [],
|
288
|
+
:release => [],
|
289
|
+
:release_preprocess => [],
|
279
290
|
},
|
280
291
|
|
281
292
|
:flags => {},
|
@@ -333,7 +344,7 @@ DEFAULT_CEEDLING_CONFIG = {
|
|
333
344
|
:release_dependencies_generator => { :arguments => [] },
|
334
345
|
|
335
346
|
:plugins => {
|
336
|
-
:load_paths =>
|
347
|
+
:load_paths => CEEDLING_PLUGINS,
|
337
348
|
:enabled => [],
|
338
349
|
}
|
339
350
|
}.freeze
|
data/lib/ceedling/file_finder.rb
CHANGED
@@ -128,5 +128,8 @@ class FileFinder
|
|
128
128
|
return @file_finder_helper.find_file_in_collection(assembly_file, @configurator.collection_all_assembly, :error)
|
129
129
|
end
|
130
130
|
|
131
|
+
def find_file_from_list(file_path, file_list, complain)
|
132
|
+
return @file_finder_helper.find_file_in_collection(file_path, file_list, complain)
|
133
|
+
end
|
131
134
|
end
|
132
135
|
|
@@ -29,7 +29,7 @@ class FileWrapper
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def directory_listing(glob)
|
32
|
-
return Dir.glob(glob)
|
32
|
+
return Dir.glob(glob, File::FNM_PATHNAME)
|
33
33
|
end
|
34
34
|
|
35
35
|
def rm_f(filepath, options={})
|
@@ -39,7 +39,7 @@ class FileWrapper
|
|
39
39
|
def rm_r(filepath, options={})
|
40
40
|
FileUtils.rm_r(filepath, options={})
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
def cp(source, destination, options={})
|
44
44
|
FileUtils.cp(source, destination, options)
|
45
45
|
end
|
@@ -47,7 +47,7 @@ class FileWrapper
|
|
47
47
|
def compare(from, to)
|
48
48
|
return FileUtils.compare_file(from, to)
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
def open(filepath, flags)
|
52
52
|
File.open(filepath, flags) do |file|
|
53
53
|
yield(file)
|
@@ -65,7 +65,7 @@ class FileWrapper
|
|
65
65
|
def write(filepath, contents, flags='w')
|
66
66
|
File.open(filepath, flags) do |file|
|
67
67
|
file.write(contents)
|
68
|
-
end
|
68
|
+
end
|
69
69
|
end
|
70
70
|
|
71
71
|
def readlines(filepath)
|
data/lib/ceedling/generator.rb
CHANGED
@@ -102,9 +102,16 @@ class Generator
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
105
|
-
def generate_executable_file(tool, context, objects, executable, map='')
|
105
|
+
def generate_executable_file(tool, context, objects, executable, map='', libraries=[])
|
106
106
|
shell_result = {}
|
107
|
-
arg_hash = {:tool => tool,
|
107
|
+
arg_hash = { :tool => tool,
|
108
|
+
:context => context,
|
109
|
+
:objects => objects,
|
110
|
+
:executable => executable,
|
111
|
+
:map => map,
|
112
|
+
:libraries => libraries
|
113
|
+
}
|
114
|
+
|
108
115
|
@plugin_manager.pre_link_execute(arg_hash)
|
109
116
|
|
110
117
|
@streaminator.stdout_puts("Linking #{File.basename(arg_hash[:executable])}...", Verbosity::NORMAL)
|
@@ -113,7 +120,9 @@ class Generator
|
|
113
120
|
@flaginator.flag_down( OPERATION_LINK_SYM, context, executable ),
|
114
121
|
arg_hash[:objects],
|
115
122
|
arg_hash[:executable],
|
116
|
-
arg_hash[:map]
|
123
|
+
arg_hash[:map],
|
124
|
+
arg_hash[:libraries]
|
125
|
+
)
|
117
126
|
|
118
127
|
begin
|
119
128
|
shell_result = @tool_executor.exec( command[:line], command[:options] )
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
class PreprocessinatorHelper
|
4
|
-
|
4
|
+
|
5
5
|
constructor :configurator, :test_includes_extractor, :task_invoker, :file_finder, :file_path_utils
|
6
6
|
|
7
7
|
|
@@ -11,8 +11,8 @@ class PreprocessinatorHelper
|
|
11
11
|
preprocess_includes_proc.call( @file_finder.find_test_from_file_path(preprocessed_includes_list) )
|
12
12
|
@test_includes_extractor.parse_includes_list(preprocessed_includes_list)
|
13
13
|
else
|
14
|
-
@test_includes_extractor.parse_test_file(test)
|
15
|
-
end
|
14
|
+
@test_includes_extractor.parse_test_file(test)
|
15
|
+
end
|
16
16
|
end
|
17
17
|
|
18
18
|
def assemble_mocks_list(test)
|
@@ -29,10 +29,10 @@ class PreprocessinatorHelper
|
|
29
29
|
|
30
30
|
def preprocess_test_file(test, preprocess_file_proc)
|
31
31
|
return if (!@configurator.project_use_test_preprocessor)
|
32
|
-
|
32
|
+
|
33
33
|
preprocess_file_proc.call(test)
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
private ############################
|
37
37
|
|
38
38
|
def preprocess_files_smartly(file_list, preprocess_file_proc)
|
@@ -31,6 +31,7 @@ class PreprocessinatorIncludesHandler
|
|
31
31
|
# are included directly by the test file.
|
32
32
|
contents = @file_wrapper.read(filepath)
|
33
33
|
contents.gsub!( /^\s*#include\s+[\"<]\s*(\S+)\s*[\">]/, "#include \"\\1\"\n#include \"@@@@\\1\"" )
|
34
|
+
contents.gsub!( /^\s*TEST_FILE\(\s*\"\s*(\S+)\s*\"\s*\)/, "#include \"\\1\"\n#include \"@@@@\\1\"")
|
34
35
|
@file_wrapper.write( temp_filepath, contents )
|
35
36
|
|
36
37
|
# extract the make-style dependency rule telling the preprocessor to
|
@@ -63,7 +64,7 @@ class PreprocessinatorIncludesHandler
|
|
63
64
|
# Find which of our annotated headers are "real" dependencies. This is
|
64
65
|
# intended to weed out dependencies that have been removed due to build
|
65
66
|
# options defined in the project yaml and/or in the headers themselves.
|
66
|
-
annotated_headers.find_all do |annotated_header|
|
67
|
+
list = annotated_headers.find_all do |annotated_header|
|
67
68
|
# find the index of the "real" include that matches the annotated one.
|
68
69
|
idx = real_headers.find_index do |real_header|
|
69
70
|
real_header =~ /^(.*\/)?#{Regexp.escape(annotated_header)}$/
|
@@ -74,6 +75,14 @@ class PreprocessinatorIncludesHandler
|
|
74
75
|
# found/deleted
|
75
76
|
idx ? real_headers.delete_at(idx) : nil
|
76
77
|
end.compact
|
78
|
+
|
79
|
+
# Extract direct dependencies that were also added
|
80
|
+
src_ext = @configurator.extension_source
|
81
|
+
sdependencies = make_rule.split.find_all {|path| path.end_with?(src_ext) }.uniq
|
82
|
+
sdependencies.map! {|hdr| hdr.gsub('\\','/') }
|
83
|
+
list += sdependencies
|
84
|
+
|
85
|
+
list
|
77
86
|
end
|
78
87
|
|
79
88
|
def write_shallow_includes_list(filepath, list)
|
@@ -18,8 +18,7 @@ class ProjectConfigManager
|
|
18
18
|
|
19
19
|
def merge_options(config_hash, option_filepath)
|
20
20
|
@options_files << File.basename( option_filepath )
|
21
|
-
config_hash.deep_merge( @yaml_wrapper.load( option_filepath ) )
|
22
|
-
return config_hash
|
21
|
+
config_hash.deep_merge!( @yaml_wrapper.load( option_filepath ) )
|
23
22
|
end
|
24
23
|
|
25
24
|
|
@@ -10,7 +10,7 @@ class ProjectFileLoader
|
|
10
10
|
def setup
|
11
11
|
@main_file = nil
|
12
12
|
@user_file = nil
|
13
|
-
|
13
|
+
|
14
14
|
@main_project_filepath = ''
|
15
15
|
@user_project_filepath = ''
|
16
16
|
end
|
@@ -19,17 +19,17 @@ class ProjectFileLoader
|
|
19
19
|
def find_project_files
|
20
20
|
# first go hunting for optional user project file by looking for environment variable and then default location on disk
|
21
21
|
user_filepath = @system_wrapper.env_get('CEEDLING_USER_PROJECT_FILE')
|
22
|
-
|
22
|
+
|
23
23
|
if ( not user_filepath.nil? and @file_wrapper.exist?(user_filepath) )
|
24
24
|
@user_project_filepath = user_filepath
|
25
25
|
elsif (@file_wrapper.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE))
|
26
26
|
@user_project_filepath = DEFAULT_CEEDLING_USER_PROJECT_FILE
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# next check for main project file by looking for environment variable and then default location on disk;
|
30
30
|
# blow up if we don't find this guy -- like, he's so totally important
|
31
31
|
main_filepath = @system_wrapper.env_get('CEEDLING_MAIN_PROJECT_FILE')
|
32
|
-
|
32
|
+
|
33
33
|
if ( not main_filepath.nil? and @file_wrapper.exist?(main_filepath) )
|
34
34
|
@main_project_filepath = main_filepath
|
35
35
|
elsif (@file_wrapper.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE))
|
@@ -40,25 +40,43 @@ class ProjectFileLoader
|
|
40
40
|
@stream_wrapper.stderr_puts('Found no Ceedling project file (*.yml)')
|
41
41
|
raise
|
42
42
|
end
|
43
|
-
|
43
|
+
|
44
44
|
@main_file = File.basename( @main_project_filepath )
|
45
45
|
@user_file = File.basename( @user_project_filepath ) if ( not @user_project_filepath.empty? )
|
46
46
|
end
|
47
47
|
|
48
|
+
def yaml_merger(y1, y2)
|
49
|
+
o1 = y1
|
50
|
+
y2.each_pair do |k,v|
|
51
|
+
if o1[k].nil?
|
52
|
+
o1[k] = v
|
53
|
+
else
|
54
|
+
if (o1[k].instance_of? Hash)
|
55
|
+
o1[k] = yaml_merger(o1[k], v)
|
56
|
+
elsif (o1[k].instance_of? Array)
|
57
|
+
o1[k] += v
|
58
|
+
else
|
59
|
+
o1[k] = v
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
return o1
|
64
|
+
end
|
48
65
|
|
49
66
|
def load_project_config
|
50
67
|
config_hash = {}
|
51
|
-
|
52
68
|
# if there's no user project file, then just provide hash from project file
|
53
69
|
if (@user_project_filepath.empty?)
|
54
70
|
config_hash = @yaml_wrapper.load(@main_project_filepath)
|
55
71
|
# if there is a user project file, load it too and merge it on top of the project file,
|
56
72
|
# superseding anything that's common between them
|
57
73
|
else
|
58
|
-
|
74
|
+
main_hash = @yaml_wrapper.load(@main_project_filepath)
|
75
|
+
user_hash = @yaml_wrapper.load(@user_project_filepath)
|
76
|
+
config_hash = yaml_merger( main_hash, user_hash )
|
59
77
|
end
|
60
|
-
|
78
|
+
|
61
79
|
return config_hash
|
62
80
|
end
|
63
|
-
|
81
|
+
|
64
82
|
end
|
data/lib/ceedling/rakefile.rb
CHANGED
@@ -67,12 +67,12 @@ END {
|
|
67
67
|
@ceedling[:file_wrapper].rm_f( @ceedling[:file_wrapper].directory_listing( File.join(@ceedling[:configurator].project_temp_path, '*') ))
|
68
68
|
end
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
# only perform these final steps if we got here without runtime exceptions or errors
|
71
|
+
if (@ceedling[:system_wrapper].ruby_success)
|
72
72
|
|
73
73
|
# tell all our plugins the build is done and process results
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
@ceedling[:plugin_manager].post_build
|
75
|
+
@ceedling[:plugin_manager].print_plugin_failures
|
76
|
+
exit(1) if (@ceedling[:plugin_manager].plugins_failed? && !@ceedling[:setupinator].config_hash[:graceful_fail])
|
77
|
+
end
|
78
78
|
}
|
@@ -31,7 +31,7 @@ class ReleaseInvoker
|
|
31
31
|
rescue => e
|
32
32
|
@build_invoker_utils.process_exception( e, RELEASE_SYM, false )
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
return objects
|
36
36
|
end
|
37
37
|
|
@@ -39,13 +39,13 @@ class ReleaseInvoker
|
|
39
39
|
def refresh_c_deep_dependencies
|
40
40
|
return if (not @configurator.project_use_deep_dependencies)
|
41
41
|
|
42
|
-
@file_wrapper.rm_f(
|
43
|
-
@file_wrapper.directory_listing(
|
42
|
+
@file_wrapper.rm_f(
|
43
|
+
@file_wrapper.directory_listing(
|
44
44
|
File.join( @configurator.project_release_dependencies_path, '*' + @configurator.extension_dependencies ) ) )
|
45
45
|
|
46
|
-
@release_invoker_helper.process_deep_dependencies(
|
47
|
-
@file_path_utils.form_release_dependencies_filelist(
|
48
|
-
@configurator.collection_all_source ) )
|
46
|
+
@release_invoker_helper.process_deep_dependencies(
|
47
|
+
@file_path_utils.form_release_dependencies_filelist(
|
48
|
+
@configurator.collection_all_source ) )
|
49
49
|
end
|
50
50
|
|
51
51
|
|
@@ -55,4 +55,19 @@ class ReleaseInvoker
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
+
def convert_libraries_to_arguments(libraries)
|
59
|
+
args = (libraries || []) + ((defined? LIBRARIES_SYSTEM) ? LIBRARIES_SYSTEM : [])
|
60
|
+
if (defined? LIBRARIES_FLAG)
|
61
|
+
args.map! {|v| LIBRARIES_FLAG.gsub(/\$\{1\}/, v) }
|
62
|
+
end
|
63
|
+
return args
|
64
|
+
end
|
65
|
+
|
66
|
+
def sort_objects_and_libraries(both)
|
67
|
+
extension = "\\" + (EXTENSION_SUBPROJECTS || ".LIBRARY")
|
68
|
+
sorted_objects = both.group_by {|v| v.match(/.+#{extension}$/) ? :libraries : :objects }
|
69
|
+
libraries = sorted_objects[:libraries] || []
|
70
|
+
objects = sorted_objects[:objects] || []
|
71
|
+
return objects, libraries
|
72
|
+
end
|
58
73
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
|
-
RELEASE_COMPILE_TASK_ROOT = RELEASE_TASK_ROOT + 'compile:'
|
3
|
-
RELEASE_ASSEMBLE_TASK_ROOT = RELEASE_TASK_ROOT + 'assemble:'
|
2
|
+
RELEASE_COMPILE_TASK_ROOT = RELEASE_TASK_ROOT + 'compile:' unless defined?(RELEASE_COMPILE_TASK_ROOT)
|
3
|
+
RELEASE_ASSEMBLE_TASK_ROOT = RELEASE_TASK_ROOT + 'assemble:' unless defined?(RELEASE_ASSEMBLE_TASK_ROOT)
|
4
4
|
|
5
5
|
|
6
6
|
if (RELEASE_BUILD_USE_ASSEMBLY)
|
@@ -35,13 +35,17 @@ end
|
|
35
35
|
|
36
36
|
|
37
37
|
rule(/#{PROJECT_RELEASE_BUILD_TARGET}/) do |bin_file|
|
38
|
+
objects, libraries = @ceedling[:release_invoker].sort_objects_and_libraries(bin_file.prerequisites)
|
39
|
+
tool = TOOLS_RELEASE_LINKER.clone
|
40
|
+
lib_args = @ceedling[:release_invoker].convert_libraries_to_arguments(libraries)
|
38
41
|
map_file = @ceedling[:configurator].project_release_build_map
|
39
42
|
@ceedling[:generator].generate_executable_file(
|
40
|
-
|
43
|
+
tool,
|
41
44
|
RELEASE_SYM,
|
42
|
-
|
45
|
+
objects,
|
43
46
|
bin_file.name,
|
44
|
-
map_file
|
47
|
+
map_file,
|
48
|
+
lib_args )
|
45
49
|
@ceedling[:release_invoker].artifactinate( bin_file.name, map_file, @ceedling[:configurator].release_build_artifacts )
|
46
50
|
end
|
47
51
|
|