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
@@ -1,12 +1,11 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'fileutils'
|
3
|
-
require UNITY_ROOT+'/auto/unity_test_summary'
|
4
|
-
require UNITY_ROOT+'/auto/generate_test_runner'
|
5
|
-
require UNITY_ROOT+'/auto/colour_reporter'
|
3
|
+
require UNITY_ROOT + '/auto/unity_test_summary'
|
4
|
+
require UNITY_ROOT + '/auto/generate_test_runner'
|
5
|
+
require UNITY_ROOT + '/auto/colour_reporter'
|
6
6
|
|
7
7
|
module RakefileHelpers
|
8
|
-
|
9
|
-
C_EXTENSION = '.c'
|
8
|
+
C_EXTENSION = '.c'.freeze
|
10
9
|
|
11
10
|
def load_configuration(config_file)
|
12
11
|
$cfg_file = config_file
|
@@ -17,22 +16,22 @@ module RakefileHelpers
|
|
17
16
|
CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil?
|
18
17
|
end
|
19
18
|
|
20
|
-
def configure_toolchain(config_file=DEFAULT_CONFIG_FILE)
|
19
|
+
def configure_toolchain(config_file = DEFAULT_CONFIG_FILE)
|
21
20
|
config_file += '.yml' unless config_file =~ /\.yml$/
|
22
21
|
load_configuration(config_file)
|
23
22
|
configure_clean
|
24
23
|
end
|
25
24
|
|
26
|
-
def
|
25
|
+
def unit_test_files
|
27
26
|
path = $cfg['compiler']['unit_tests_path'] + 'Test*' + C_EXTENSION
|
28
|
-
path.
|
27
|
+
path.tr!('\\', '/')
|
29
28
|
FileList.new(path)
|
30
29
|
end
|
31
30
|
|
32
|
-
def
|
31
|
+
def local_include_dirs
|
33
32
|
include_dirs = $cfg['compiler']['includes']['items'].dup
|
34
|
-
include_dirs.delete_if {|dir| dir.is_a?(Array)}
|
35
|
-
|
33
|
+
include_dirs.delete_if { |dir| dir.is_a?(Array) }
|
34
|
+
include_dirs
|
36
35
|
end
|
37
36
|
|
38
37
|
def extract_headers(filename)
|
@@ -40,129 +39,126 @@ module RakefileHelpers
|
|
40
39
|
lines = File.readlines(filename)
|
41
40
|
lines.each do |line|
|
42
41
|
m = line.match(/^\s*#include\s+\"\s*(.+\.[hH])\s*\"/)
|
43
|
-
|
44
|
-
includes << m[1]
|
45
|
-
end
|
42
|
+
includes << m[1] unless m.nil?
|
46
43
|
end
|
47
|
-
|
44
|
+
includes
|
48
45
|
end
|
49
46
|
|
50
47
|
def find_source_file(header, paths)
|
51
48
|
paths.each do |dir|
|
52
49
|
src_file = dir + header.ext(C_EXTENSION)
|
53
|
-
if
|
54
|
-
return src_file
|
55
|
-
end
|
50
|
+
return src_file if File.exist?(src_file)
|
56
51
|
end
|
57
|
-
|
52
|
+
nil
|
58
53
|
end
|
59
54
|
|
60
55
|
def tackit(strings)
|
61
|
-
if strings.is_a?(Array)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
56
|
+
result = if strings.is_a?(Array)
|
57
|
+
"\"#{strings.join}\""
|
58
|
+
else
|
59
|
+
strings
|
60
|
+
end
|
61
|
+
result
|
67
62
|
end
|
68
63
|
|
69
64
|
def squash(prefix, items)
|
70
65
|
result = ''
|
71
66
|
items.each { |item| result += " #{prefix}#{tackit(item)}" }
|
72
|
-
|
67
|
+
result
|
73
68
|
end
|
74
69
|
|
75
70
|
def build_compiler_fields
|
76
|
-
command
|
77
|
-
if $cfg['compiler']['defines']['items'].nil?
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
71
|
+
command = tackit($cfg['compiler']['path'])
|
72
|
+
defines = if $cfg['compiler']['defines']['items'].nil?
|
73
|
+
''
|
74
|
+
else
|
75
|
+
squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'])
|
76
|
+
end
|
82
77
|
options = squash('', $cfg['compiler']['options'])
|
83
78
|
includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items'])
|
84
79
|
includes = includes.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
|
85
|
-
|
80
|
+
|
81
|
+
{ command: command, defines: defines, options: options, includes: includes }
|
86
82
|
end
|
87
83
|
|
88
|
-
def compile(file,
|
84
|
+
def compile(file, _defines = [])
|
89
85
|
compiler = build_compiler_fields
|
90
|
-
cmd_str = "#{compiler[:command]}#{compiler[:defines]}#{compiler[:options]}#{compiler[:includes]} #{file} "
|
86
|
+
cmd_str = "#{compiler[:command]}#{compiler[:defines]}#{compiler[:options]}#{compiler[:includes]} #{file} " \
|
91
87
|
"#{$cfg['compiler']['object_files']['prefix']}#{$cfg['compiler']['object_files']['destination']}"
|
92
88
|
obj_file = "#{File.basename(file, C_EXTENSION)}#{$cfg['compiler']['object_files']['extension']}"
|
93
89
|
execute(cmd_str + obj_file)
|
94
|
-
|
90
|
+
obj_file
|
95
91
|
end
|
96
92
|
|
97
93
|
def build_linker_fields
|
98
|
-
command
|
99
|
-
if $cfg['linker']['options'].nil?
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
if
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
94
|
+
command = tackit($cfg['linker']['path'])
|
95
|
+
options = if $cfg['linker']['options'].nil?
|
96
|
+
''
|
97
|
+
else
|
98
|
+
squash('', $cfg['linker']['options'])
|
99
|
+
end
|
100
|
+
includes = if $cfg['linker']['includes'].nil? || $cfg['linker']['includes']['items'].nil?
|
101
|
+
''
|
102
|
+
else
|
103
|
+
squash($cfg['linker']['includes']['prefix'], $cfg['linker']['includes']['items'])
|
104
|
+
end.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
|
105
|
+
|
106
|
+
{ command: command, options: options, includes: includes }
|
111
107
|
end
|
112
108
|
|
113
109
|
def link_it(exe_name, obj_list)
|
114
110
|
linker = build_linker_fields
|
115
111
|
cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]} " +
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
112
|
+
(obj_list.map { |obj| "#{$cfg['linker']['object_files']['path']}#{obj} " }).join +
|
113
|
+
$cfg['linker']['bin_files']['prefix'] + ' ' +
|
114
|
+
$cfg['linker']['bin_files']['destination'] +
|
115
|
+
exe_name + $cfg['linker']['bin_files']['extension']
|
120
116
|
execute(cmd_str)
|
121
117
|
end
|
122
118
|
|
123
119
|
def build_simulator_fields
|
124
120
|
return nil if $cfg['simulator'].nil?
|
125
|
-
if $cfg['simulator']['path'].nil?
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
if $cfg['simulator']['pre_support'].nil?
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
if $cfg['simulator']['post_support'].nil?
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
121
|
+
command = if $cfg['simulator']['path'].nil?
|
122
|
+
''
|
123
|
+
else
|
124
|
+
(tackit($cfg['simulator']['path']) + ' ')
|
125
|
+
end
|
126
|
+
pre_support = if $cfg['simulator']['pre_support'].nil?
|
127
|
+
''
|
128
|
+
else
|
129
|
+
squash('', $cfg['simulator']['pre_support'])
|
130
|
+
end
|
131
|
+
post_support = if $cfg['simulator']['post_support'].nil?
|
132
|
+
''
|
133
|
+
else
|
134
|
+
squash('', $cfg['simulator']['post_support'])
|
135
|
+
end
|
136
|
+
|
137
|
+
{ command: command, pre_support: pre_support, post_support: post_support }
|
138
|
+
end
|
139
|
+
|
140
|
+
def execute(command_string, verbose = true, raise_on_fail = true)
|
144
141
|
report command_string
|
145
142
|
output = `#{command_string}`.chomp
|
146
|
-
report(output) if
|
147
|
-
if
|
143
|
+
report(output) if verbose && !output.nil? && !output.empty?
|
144
|
+
if !$?.exitstatus.zero? && raise_on_fail
|
148
145
|
raise "Command failed. (Returned #{$?.exitstatus})"
|
149
146
|
end
|
150
|
-
|
147
|
+
output
|
151
148
|
end
|
152
149
|
|
153
150
|
def report_summary
|
154
151
|
summary = UnityTestSummary.new
|
155
|
-
summary.
|
152
|
+
summary.root = HERE
|
156
153
|
results_glob = "#{$cfg['compiler']['build_path']}*.test*"
|
157
|
-
results_glob.
|
154
|
+
results_glob.tr!('\\', '/')
|
158
155
|
results = Dir[results_glob]
|
159
|
-
summary.
|
156
|
+
summary.targets = results
|
160
157
|
summary.run
|
161
|
-
fail_out
|
158
|
+
fail_out 'FAIL: There were failures' if summary.failures > 0
|
162
159
|
end
|
163
160
|
|
164
161
|
def run_tests(test_files)
|
165
|
-
|
166
162
|
report 'Running system tests...'
|
167
163
|
|
168
164
|
# Tack on TEST define for compiling unit tests
|
@@ -171,7 +167,7 @@ module RakefileHelpers
|
|
171
167
|
$cfg['compiler']['defines']['items'] = [] if $cfg['compiler']['defines']['items'].nil?
|
172
168
|
$cfg['compiler']['defines']['items'] << 'TEST'
|
173
169
|
|
174
|
-
include_dirs =
|
170
|
+
include_dirs = local_include_dirs
|
175
171
|
|
176
172
|
# Build and execute each unit test
|
177
173
|
test_files.each do |test|
|
@@ -181,9 +177,7 @@ module RakefileHelpers
|
|
181
177
|
extract_headers(test).each do |header|
|
182
178
|
# Compile corresponding source file if it exists
|
183
179
|
src_file = find_source_file(header, include_dirs)
|
184
|
-
|
185
|
-
obj_list << compile(src_file, test_defines)
|
186
|
-
end
|
180
|
+
obj_list << compile(src_file, test_defines) unless src_file.nil?
|
187
181
|
end
|
188
182
|
|
189
183
|
# Build the test runner (generate if configured to do so)
|
@@ -208,25 +202,24 @@ module RakefileHelpers
|
|
208
202
|
# Execute unit test and generate results file
|
209
203
|
simulator = build_simulator_fields
|
210
204
|
executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension']
|
211
|
-
if simulator.nil?
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
205
|
+
cmd_str = if simulator.nil?
|
206
|
+
executable
|
207
|
+
else
|
208
|
+
"#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
|
209
|
+
end
|
216
210
|
output = execute(cmd_str, true, false)
|
217
211
|
test_results = $cfg['compiler']['build_path'] + test_base
|
218
|
-
if output.match(/OK$/m).nil?
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
212
|
+
test_results += if output.match(/OK$/m).nil?
|
213
|
+
'.testfail'
|
214
|
+
else
|
215
|
+
'.testpass'
|
216
|
+
end
|
223
217
|
File.open(test_results, 'w') { |f| f.print output }
|
224
218
|
end
|
225
219
|
end
|
226
220
|
|
227
221
|
def build_application(main)
|
228
|
-
|
229
|
-
report "Building application..."
|
222
|
+
report 'Building application...'
|
230
223
|
|
231
224
|
obj_list = []
|
232
225
|
load_configuration($cfg_file)
|
@@ -236,9 +229,7 @@ module RakefileHelpers
|
|
236
229
|
include_dirs = get_local_include_dirs
|
237
230
|
extract_headers(main_path).each do |header|
|
238
231
|
src_file = find_source_file(header, include_dirs)
|
239
|
-
|
240
|
-
obj_list << compile(src_file)
|
241
|
-
end
|
232
|
+
obj_list << compile(src_file) unless src_file.nil?
|
242
233
|
end
|
243
234
|
|
244
235
|
# Build the main source file
|
@@ -251,6 +242,8 @@ module RakefileHelpers
|
|
251
242
|
|
252
243
|
def fail_out(msg)
|
253
244
|
puts msg
|
254
|
-
exit
|
245
|
+
puts 'Not returning exit code so continuous integration can pass'
|
246
|
+
# exit(-1) # Only removed to pass example_3, which has failing tests on purpose.
|
247
|
+
# Still fail if the build fails for any other reason.
|
255
248
|
end
|
256
249
|
end
|
@@ -4,16 +4,10 @@ Example 3
|
|
4
4
|
This example project gives an example of some passing, ignored, and failing tests.
|
5
5
|
It's simple and meant for you to look over and get an idea for what all of this stuff does.
|
6
6
|
|
7
|
-
You can build and test using
|
8
|
-
|
9
|
-
test with gcc or a couple versions of IAR. You can tweak the yaml files to get those versions
|
10
|
-
running.
|
7
|
+
You can build and test using rake. The rake version will let you test with gcc or a couple
|
8
|
+
versions of IAR. You can tweak the yaml files to get those versions running.
|
11
9
|
|
12
10
|
Ruby is required if you're using the rake version (obviously). This version shows off most of
|
13
11
|
Unity's advanced features (automatically creating test runners, fancy summaries, etc.)
|
14
|
-
|
15
|
-
|
16
|
-
extras for you. So that you can test right away, we've written the test runners for you and
|
17
|
-
put them in the test\no_ruby subdirectory. If you make changes to the tests or source, you might
|
18
|
-
need to update these (like when you add or remove tests). Do that for a while and you'll learn
|
19
|
-
why you really want to start using the Ruby tools.
|
12
|
+
Without ruby, you have to maintain your own test runners. Do that for a while and you'll learn
|
13
|
+
why you really want to start using the Ruby tools.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* Unity Configuration
|
2
2
|
* As of May 11th, 2016 at ThrowTheSwitch/Unity commit 837c529
|
3
|
-
* Update:
|
3
|
+
* Update: December 29th, 2016
|
4
4
|
* See Also: Unity/docs/UnityConfigurationGuide.pdf
|
5
5
|
*
|
6
6
|
* Unity is designed to run on almost anything that is targeted by a C compiler.
|
@@ -37,11 +37,6 @@
|
|
37
37
|
#ifndef UNITY_CONFIG_H
|
38
38
|
#define UNITY_CONFIG_H
|
39
39
|
|
40
|
-
#ifdef __cplusplus
|
41
|
-
extern "C"
|
42
|
-
{
|
43
|
-
#endif
|
44
|
-
|
45
40
|
/* ************************* AUTOMATIC INTEGER TYPES ***************************
|
46
41
|
* C's concept of an integer varies from target to target. The C Standard has
|
47
42
|
* rules about the `int` matching the register size of the target
|
@@ -122,10 +117,9 @@ extern "C"
|
|
122
117
|
|
123
118
|
/* By default, Unity guesses that you will want single precision floating point
|
124
119
|
* support, but not double precision. It's easy to change either of these using
|
125
|
-
* the include and exclude options here. You may include neither,
|
126
|
-
* both, as suits your needs.
|
120
|
+
* the include and exclude options here. You may include neither, just float,
|
121
|
+
* or both, as suits your needs.
|
127
122
|
*/
|
128
|
-
/* #define UNITY_INCLUDE_FLOAT */
|
129
123
|
/* #define UNITY_EXCLUDE_FLOAT */
|
130
124
|
/* #define UNITY_INCLUDE_DOUBLE */
|
131
125
|
/* #define UNITY_EXCLUDE_DOUBLE */
|
@@ -137,18 +131,15 @@ extern "C"
|
|
137
131
|
/* Unity aims for as small of a footprint as possible and avoids most standard
|
138
132
|
* library calls (some embedded platforms don't have a standard library!).
|
139
133
|
* Because of this, its routines for printing integer values are minimalist and
|
140
|
-
* hand-coded. To keep Unity universal, though, we chose to
|
141
|
-
* own floating point print routines.
|
142
|
-
* values during a failure are optional. By default, Unity will
|
143
|
-
* actual results of floating point assertion
|
144
|
-
* will produce a message like
|
145
|
-
* verbose failure messages for floating point assertions, use
|
146
|
-
* give
|
147
|
-
* that this feature requires the use of `sprintf` so might not be desirable in
|
148
|
-
* all cases.
|
134
|
+
* hand-coded. To keep Unity universal, though, we eventually chose to develop
|
135
|
+
* our own floating point print routines. Still, the display of floating point
|
136
|
+
* values during a failure are optional. By default, Unity will print the
|
137
|
+
* actual results of floating point assertion failures. So a failed assertion
|
138
|
+
* will produce a message like "Expected 4.0 Was 4.25". If you would like less
|
139
|
+
* verbose failure messages for floating point assertions, use this option to
|
140
|
+
* give a failure message `"Values Not Within Delta"` and trim the binary size.
|
149
141
|
*/
|
150
|
-
/* #define
|
151
|
-
/* #define UNITY_DOUBLE_VERBOSE */
|
142
|
+
/* #define UNITY_EXCLUDE_FLOAT_PRINT */
|
152
143
|
|
153
144
|
/* If enabled, Unity assumes you want your `FLOAT` asserts to compare standard C
|
154
145
|
* floats. If your compiler supports a specialty floating point type, you can
|
@@ -211,8 +202,8 @@ extern "C"
|
|
211
202
|
* serial `RS232_putc()` function you wrote like thus:
|
212
203
|
*/
|
213
204
|
/* #define UNITY_OUTPUT_CHAR(a) RS232_putc(a) */
|
214
|
-
/* #define UNITY_OUTPUT_FLUSH()
|
215
|
-
/* #define UNITY_OUTPUT_START()
|
205
|
+
/* #define UNITY_OUTPUT_FLUSH() RS232_flush() */
|
206
|
+
/* #define UNITY_OUTPUT_START() RS232_config(115200,1,8,0) */
|
216
207
|
/* #define UNITY_OUTPUT_COMPLETE() RS232_close() */
|
217
208
|
|
218
209
|
/* For some targets, Unity can make the otherwise required `setUp()` and
|
@@ -232,6 +223,7 @@ extern "C"
|
|
232
223
|
*/
|
233
224
|
/* #define UNITY_SUPPORT_WEAK weak */
|
234
225
|
/* #define UNITY_SUPPORT_WEAK __attribute__((weak)) */
|
226
|
+
/* #define UNITY_NO_WEAK */
|
235
227
|
|
236
228
|
/* Some compilers require a custom attribute to be assigned to pointers, like
|
237
229
|
* `near` or `far`. In these cases, you can give Unity a safe default for these
|
@@ -242,8 +234,4 @@ extern "C"
|
|
242
234
|
/* #define UNITY_PTR_ATTRIBUTE __attribute__((far)) */
|
243
235
|
/* #define UNITY_PTR_ATTRIBUTE near */
|
244
236
|
|
245
|
-
#ifdef __cplusplus
|
246
|
-
}
|
247
|
-
#endif /* extern "C" */
|
248
|
-
|
249
237
|
#endif /* UNITY_CONFIG_H */
|
@@ -12,34 +12,34 @@ require 'rake/testtask'
|
|
12
12
|
require HERE + 'rakefile_helper'
|
13
13
|
|
14
14
|
TEMP_DIRS = [
|
15
|
-
|
16
|
-
]
|
15
|
+
File.join(HERE, 'build')
|
16
|
+
].freeze
|
17
17
|
|
18
18
|
TEMP_DIRS.each do |dir|
|
19
19
|
directory(dir)
|
20
20
|
CLOBBER.include(dir)
|
21
21
|
end
|
22
22
|
|
23
|
-
task :
|
23
|
+
task prepare_for_tests: TEMP_DIRS
|
24
24
|
|
25
25
|
include RakefileHelpers
|
26
26
|
|
27
27
|
# Load default configuration, for now
|
28
|
-
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
|
28
|
+
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'.freeze
|
29
29
|
configure_toolchain(DEFAULT_CONFIG_FILE)
|
30
30
|
|
31
|
-
task :
|
31
|
+
task unit: [:prepare_for_tests] do
|
32
32
|
run_tests
|
33
33
|
end
|
34
34
|
|
35
|
-
desc
|
36
|
-
task :
|
37
|
-
task :
|
38
|
-
task :
|
39
|
-
task :
|
35
|
+
desc 'Build and test Unity Framework'
|
36
|
+
task all: %i(clean unit)
|
37
|
+
task default: %i(clobber all)
|
38
|
+
task ci: %i(no_color default)
|
39
|
+
task cruise: %i(no_color default)
|
40
40
|
|
41
|
-
desc
|
42
|
-
task :config, :config_file do |
|
41
|
+
desc 'Load configuration'
|
42
|
+
task :config, :config_file do |_t, args|
|
43
43
|
configure_toolchain(args[:config_file])
|
44
44
|
end
|
45
45
|
|