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
@@ -0,0 +1,242 @@
|
|
1
|
+
# Unity Helper Scripts
|
2
|
+
|
3
|
+
## With a Little Help From Our Friends
|
4
|
+
|
5
|
+
Sometimes what it takes to be a really efficient C programmer is a little non-C.
|
6
|
+
The Unity project includes a couple Ruby scripts for making your life just a tad
|
7
|
+
easier. They are completely optional. If you choose to use them, you'll need a
|
8
|
+
copy of Ruby, of course. Just install whatever the latest version is, and it is
|
9
|
+
likely to work. You can find Ruby at [ruby-lang.org](https://ruby-labg.org/).
|
10
|
+
|
11
|
+
|
12
|
+
### `generate_test_runner.rb`
|
13
|
+
|
14
|
+
Are you tired of creating your own `main` function in your test file? Do you
|
15
|
+
keep forgetting to add a `RUN_TEST` call when you add a new test case to your
|
16
|
+
suite? Do you want to use CMock or other fancy add-ons but don't want to figure
|
17
|
+
out how to create your own `RUN_TEST` macro?
|
18
|
+
|
19
|
+
Well then we have the perfect script for you!
|
20
|
+
|
21
|
+
The `generate_test_runner` script processes a given test file and automatically
|
22
|
+
creates a separate test runner file that includes ?main?to execute the test
|
23
|
+
cases within the scanned test file. All you do then is add the generated runner
|
24
|
+
to your list of files to be compiled and linked, and presto you're done!
|
25
|
+
|
26
|
+
This script searches your test file for void function signatures having a
|
27
|
+
function name beginning with "test" or "spec". It treats each of these
|
28
|
+
functions as a test case and builds up a test suite of them. For example, the
|
29
|
+
following includes three test cases:
|
30
|
+
|
31
|
+
```C
|
32
|
+
void testVerifyThatUnityIsAwesomeAndWillMakeYourLifeEasier(void)
|
33
|
+
{
|
34
|
+
ASSERT_TRUE(1);
|
35
|
+
}
|
36
|
+
void test_FunctionName_should_WorkProperlyAndReturn8(void) {
|
37
|
+
ASSERT_EQUAL_INT(8, FunctionName());
|
38
|
+
}
|
39
|
+
void spec_Function_should_DoWhatItIsSupposedToDo(void) {
|
40
|
+
ASSERT_NOT_NULL(Function(5));
|
41
|
+
}
|
42
|
+
```
|
43
|
+
|
44
|
+
You can run this script a couple of ways. The first is from the command line:
|
45
|
+
|
46
|
+
```Shell
|
47
|
+
ruby generate_test_runner.rb TestFile.c NameOfRunner.c
|
48
|
+
```
|
49
|
+
|
50
|
+
Alternatively, if you include only the test file parameter, the script will copy
|
51
|
+
the name of the test file and automatically append "_Runner" to the name of the
|
52
|
+
generated file. The example immediately below will create TestFile_Runner.c.
|
53
|
+
|
54
|
+
```Shell
|
55
|
+
ruby generate_test_runner.rb TestFile.c
|
56
|
+
```
|
57
|
+
|
58
|
+
You can also add a [YAML](http://www.yaml.org/) file to configure extra options.
|
59
|
+
Conveniently, this YAML file is of the same format as that used by Unity and
|
60
|
+
CMock. So if you are using YAML files already, you can simply pass the very same
|
61
|
+
file into the generator script.
|
62
|
+
|
63
|
+
```Shell
|
64
|
+
ruby generate_test_runner.rb TestFile.c my_config.yml
|
65
|
+
```
|
66
|
+
|
67
|
+
The contents of the YAML file `my_config.yml` could look something like the
|
68
|
+
example below. If you're wondering what some of these options do, you're going
|
69
|
+
to love the next section of this document.
|
70
|
+
|
71
|
+
```YAML
|
72
|
+
:unity:
|
73
|
+
:includes:
|
74
|
+
- stdio.h
|
75
|
+
- microdefs.h
|
76
|
+
:cexception: 1
|
77
|
+
:suit_setup: "blah = malloc(1024);"
|
78
|
+
:suite_teardown: "free(blah);"
|
79
|
+
```
|
80
|
+
|
81
|
+
If you would like to force your generated test runner to include one or more
|
82
|
+
header files, you can just include those at the command line too. Just make sure
|
83
|
+
these are _after_ the YAML file, if you are using one:
|
84
|
+
|
85
|
+
```Shell
|
86
|
+
ruby generate_test_runner.rb TestFile.c my_config.yml extras.h
|
87
|
+
```
|
88
|
+
|
89
|
+
Another option, particularly if you are already using Ruby to orchestrate your
|
90
|
+
builds - or more likely the Ruby-based build tool Rake - is requiring this
|
91
|
+
script directly. Anything that you would have specified in a YAML file can be
|
92
|
+
passed to the script as part of a hash. Let's push the exact same requirement
|
93
|
+
set as we did above but this time through Ruby code directly:
|
94
|
+
|
95
|
+
```Ruby
|
96
|
+
require "generate_test_runner.rb"
|
97
|
+
options = {
|
98
|
+
:includes => ["stdio.h", "microdefs.h"],
|
99
|
+
:cexception => 1,
|
100
|
+
:suite_setup => "blah = malloc(1024);",
|
101
|
+
:suite_teardown => "free(blah);"
|
102
|
+
}
|
103
|
+
UnityTestRunnerGenerator.new.run(testfile, runner_name, options)
|
104
|
+
```
|
105
|
+
|
106
|
+
If you have multiple files to generate in a build script (such as a Rakefile),
|
107
|
+
you might want to instantiate a generator object with your options and call it
|
108
|
+
to generate each runner thereafter. Like thus:
|
109
|
+
|
110
|
+
```Ruby
|
111
|
+
gen = UnityTestRunnerGenerator.new(options)
|
112
|
+
test_files.each do |f|
|
113
|
+
gen.run(f, File.basename(f,'.c')+"Runner.c"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
#### Options accepted by generate_test_runner.rb:
|
118
|
+
|
119
|
+
The following options are available when executing `generate_test_runner`. You
|
120
|
+
may pass these as a Ruby hash directly or specify them in a YAML file, both of
|
121
|
+
which are described above. In the `examples` directory, Example 3's Rakefile
|
122
|
+
demonstrates using a Ruby hash.
|
123
|
+
|
124
|
+
|
125
|
+
##### `:includes`
|
126
|
+
|
127
|
+
This option specifies an array of file names to be ?#include?'d at the top of
|
128
|
+
your runner C file. You might use it to reference custom types or anything else
|
129
|
+
universally needed in your generated runners.
|
130
|
+
|
131
|
+
|
132
|
+
##### `:suite_setup`
|
133
|
+
|
134
|
+
Define this option with C code to be executed _before any_ test cases are run.
|
135
|
+
|
136
|
+
|
137
|
+
##### `:suite_teardown`
|
138
|
+
|
139
|
+
Define this option with C code to be executed ?after all?test cases have
|
140
|
+
finished.
|
141
|
+
|
142
|
+
|
143
|
+
##### `:enforce_strict_ordering`
|
144
|
+
|
145
|
+
This option should be defined if you have the strict order feature enabled in
|
146
|
+
CMock (see CMock documentation). This generates extra variables required for
|
147
|
+
everything to run smoothly. If you provide the same YAML to the generator as
|
148
|
+
used in CMock's configuration, you've already configured the generator properly.
|
149
|
+
|
150
|
+
|
151
|
+
##### `:plugins`
|
152
|
+
|
153
|
+
This option specifies an array of plugins to be used (of course, the array can
|
154
|
+
contain only a single plugin). This is your opportunity to enable support for
|
155
|
+
CException support, which will add a check for unhandled exceptions in each
|
156
|
+
test, reporting a failure if one is detected. To enable this feature using Ruby:
|
157
|
+
|
158
|
+
```Ruby
|
159
|
+
:plugins => [ :cexception ]
|
160
|
+
```
|
161
|
+
|
162
|
+
Or as a yaml file:
|
163
|
+
|
164
|
+
```YAML
|
165
|
+
:plugins:
|
166
|
+
-:cexception
|
167
|
+
```
|
168
|
+
|
169
|
+
If you are using CMock, it is very likely that you are already passing an array
|
170
|
+
of plugins to CMock. You can just use the same array here. This script will just
|
171
|
+
ignore the plugins that don't require additional support.
|
172
|
+
|
173
|
+
|
174
|
+
### `unity_test_summary.rb`
|
175
|
+
|
176
|
+
A Unity test file contains one or more test case functions. Each test case can
|
177
|
+
pass, fail, or be ignored. Each test file is run individually producing results
|
178
|
+
for its collection of test cases. A given project will almost certainly be
|
179
|
+
composed of multiple test files. Therefore, the suite of tests is comprised of
|
180
|
+
one or more test cases spread across one or more test files. This script
|
181
|
+
aggregates individual test file results to generate a summary of all executed
|
182
|
+
test cases. The output includes how many tests were run, how many were ignored,
|
183
|
+
and how many failed. In addition, the output includes a listing of which
|
184
|
+
specific tests were ignored and failed. A good example of the breadth and
|
185
|
+
details of these results can be found in the `examples` directory. Intentionally
|
186
|
+
ignored and failing tests in this project generate corresponding entries in the
|
187
|
+
summary report.
|
188
|
+
|
189
|
+
If you're interested in other (prettier?) output formats, check into the
|
190
|
+
Ceedling build tool project (ceedling.sourceforge.net) that works with Unity and
|
191
|
+
CMock and supports xunit-style xml as well as other goodies.
|
192
|
+
|
193
|
+
This script assumes the existence of files ending with the extensions
|
194
|
+
`.testpass` and `.testfail`.The contents of these files includes the test
|
195
|
+
results summary corresponding to each test file executed with the extension set
|
196
|
+
according to the presence or absence of failures for that test file. The script
|
197
|
+
searches a specified path for these files, opens each one it finds, parses the
|
198
|
+
results, and aggregates and prints a summary. Calling it from the command line
|
199
|
+
looks like this:
|
200
|
+
|
201
|
+
```Shell
|
202
|
+
ruby unity_test_summary.rb build/test/
|
203
|
+
```
|
204
|
+
|
205
|
+
You can optionally specify a root path as well. This is really helpful when you
|
206
|
+
are using relative paths in your tools' setup, but you want to pull the summary
|
207
|
+
into an IDE like Eclipse for clickable shortcuts.
|
208
|
+
|
209
|
+
```Shell
|
210
|
+
ruby unity_test_summary.rb build/test/ ~/projects/myproject/
|
211
|
+
```
|
212
|
+
|
213
|
+
Or, if you're more of a Windows sort of person:
|
214
|
+
|
215
|
+
```Shell
|
216
|
+
ruby unity_test_summary.rb build\teat\ C:\projects\myproject\
|
217
|
+
```
|
218
|
+
|
219
|
+
When configured correctly, you'll see a final summary, like so:
|
220
|
+
|
221
|
+
```Shell
|
222
|
+
--------------------------
|
223
|
+
UNITY IGNORED TEST SUMMARY
|
224
|
+
--------------------------
|
225
|
+
blah.c:22:test_sandwiches_should_HaveBreadOnTwoSides:IGNORE
|
226
|
+
|
227
|
+
-------------------------
|
228
|
+
UNITY FAILED TEST SUMMARY
|
229
|
+
-------------------------
|
230
|
+
blah.c:87:test_sandwiches_should_HaveCondiments:FAIL:Expected 1 was 0
|
231
|
+
meh.c:38:test_soda_should_BeCalledPop:FAIL:Expected "pop" was "coke"
|
232
|
+
|
233
|
+
--------------------------
|
234
|
+
OVERALL UNITY TEST SUMMARY
|
235
|
+
--------------------------
|
236
|
+
45 TOTAL TESTS 2 TOTAL FAILURES 1 IGNORED
|
237
|
+
```
|
238
|
+
|
239
|
+
How convenient is that?
|
240
|
+
|
241
|
+
|
242
|
+
*Find The Latest of This And More at [ThrowTheSwitch.org](https://throwtheswitch.org)*
|
@@ -5,17 +5,14 @@
|
|
5
5
|
# ==========================================
|
6
6
|
|
7
7
|
#We try to detect the OS we are running on, and adjust commands as needed
|
8
|
-
ifeq ($(
|
9
|
-
|
10
|
-
MKDIR = mkdir -p
|
11
|
-
TARGET_EXTENSION=.out
|
12
|
-
elseifeq ($(OSTYPE),msys)
|
13
|
-
CLEANUP = rm -f
|
14
|
-
MKDIR = mkdir -p
|
15
|
-
TARGET_EXTENSION=.exe
|
16
|
-
elseifeq ($(OS),Windows_NT)
|
8
|
+
ifeq ($(OS),Windows_NT)
|
9
|
+
ifeq ($(shell uname -s),) # not in a bash-like shell
|
17
10
|
CLEANUP = del /F /Q
|
18
11
|
MKDIR = mkdir
|
12
|
+
else # in a bash-like shell, like msys
|
13
|
+
CLEANUP = rm -f
|
14
|
+
MKDIR = mkdir -p
|
15
|
+
endif
|
19
16
|
TARGET_EXTENSION=.exe
|
20
17
|
else
|
21
18
|
CLEANUP = rm -f
|
@@ -23,13 +20,16 @@ else
|
|
23
20
|
TARGET_EXTENSION=.out
|
24
21
|
endif
|
25
22
|
|
26
|
-
UNITY_ROOT=../..
|
27
23
|
C_COMPILER=gcc
|
24
|
+
ifeq ($(shell uname -s), Darwin)
|
25
|
+
C_COMPILER=clang
|
26
|
+
endif
|
27
|
+
|
28
|
+
UNITY_ROOT=../..
|
28
29
|
|
29
30
|
CFLAGS=-std=c89
|
30
31
|
CFLAGS += -Wall
|
31
32
|
CFLAGS += -Wextra
|
32
|
-
CFLAGS += -Werror
|
33
33
|
CFLAGS += -Wpointer-arith
|
34
34
|
CFLAGS += -Wcast-align
|
35
35
|
CFLAGS += -Wwrite-strings
|
@@ -49,18 +49,23 @@ TARGET2 = $(TARGET_BASE2)$(TARGET_EXTENSION)
|
|
49
49
|
SRC_FILES1=$(UNITY_ROOT)/src/unity.c src/ProductionCode.c test/TestProductionCode.c test/test_runners/TestProductionCode_Runner.c
|
50
50
|
SRC_FILES2=$(UNITY_ROOT)/src/unity.c src/ProductionCode2.c test/TestProductionCode2.c test/test_runners/TestProductionCode2_Runner.c
|
51
51
|
INC_DIRS=-Isrc -I$(UNITY_ROOT)/src
|
52
|
-
SYMBOLS
|
52
|
+
SYMBOLS=
|
53
53
|
|
54
54
|
all: clean default
|
55
55
|
|
56
|
-
default:
|
57
|
-
ruby $(UNITY_ROOT)/auto/generate_test_runner.rb test/TestProductionCode.c test/test_runners/TestProductionCode_Runner.c
|
58
|
-
ruby $(UNITY_ROOT)/auto/generate_test_runner.rb test/TestProductionCode2.c test/test_runners/TestProductionCode2_Runner.c
|
56
|
+
default: $(SRC_FILES1) $(SRC_FILES2)
|
59
57
|
$(C_COMPILER) $(CFLAGS) $(INC_DIRS) $(SYMBOLS) $(SRC_FILES1) -o $(TARGET1)
|
60
58
|
$(C_COMPILER) $(CFLAGS) $(INC_DIRS) $(SYMBOLS) $(SRC_FILES2) -o $(TARGET2)
|
61
|
-
./$(TARGET1)
|
59
|
+
- ./$(TARGET1)
|
62
60
|
./$(TARGET2)
|
63
61
|
|
62
|
+
test/test_runners/TestProductionCode_Runner.c: test/TestProductionCode.c
|
63
|
+
ruby $(UNITY_ROOT)/auto/generate_test_runner.rb test/TestProductionCode.c test/test_runners/TestProductionCode_Runner.c
|
64
|
+
test/test_runners/TestProductionCode2_Runner.c: test/TestProductionCode2.c
|
65
|
+
ruby $(UNITY_ROOT)/auto/generate_test_runner.rb test/TestProductionCode2.c test/test_runners/TestProductionCode2_Runner.c
|
66
|
+
|
64
67
|
clean:
|
65
|
-
$(CLEANUP)
|
68
|
+
$(CLEANUP) $(TARGET1) $(TARGET2)
|
66
69
|
|
70
|
+
ci: CFLAGS += -Werror
|
71
|
+
ci: default
|
@@ -5,17 +5,14 @@
|
|
5
5
|
# ==========================================
|
6
6
|
|
7
7
|
#We try to detect the OS we are running on, and adjust commands as needed
|
8
|
-
ifeq ($(
|
9
|
-
|
10
|
-
MKDIR = mkdir -p
|
11
|
-
TARGET_EXTENSION=.out
|
12
|
-
elseifeq ($(OSTYPE),msys)
|
13
|
-
CLEANUP = rm -f
|
14
|
-
MKDIR = mkdir -p
|
15
|
-
TARGET_EXTENSION=.exe
|
16
|
-
elseifeq ($(OS),Windows_NT)
|
8
|
+
ifeq ($(OS),Windows_NT)
|
9
|
+
ifeq ($(shell uname -s),) # not in a bash-like shell
|
17
10
|
CLEANUP = del /F /Q
|
18
11
|
MKDIR = mkdir
|
12
|
+
else # in a bash-like shell, like msys
|
13
|
+
CLEANUP = rm -f
|
14
|
+
MKDIR = mkdir -p
|
15
|
+
endif
|
19
16
|
TARGET_EXTENSION=.exe
|
20
17
|
else
|
21
18
|
CLEANUP = rm -f
|
@@ -23,13 +20,16 @@ else
|
|
23
20
|
TARGET_EXTENSION=.out
|
24
21
|
endif
|
25
22
|
|
26
|
-
UNITY_ROOT=../..
|
27
23
|
C_COMPILER=gcc
|
24
|
+
ifeq ($(shell uname -s), Darwin)
|
25
|
+
C_COMPILER=clang
|
26
|
+
endif
|
27
|
+
|
28
|
+
UNITY_ROOT=../..
|
28
29
|
|
29
|
-
CFLAGS
|
30
|
+
CFLAGS=-std=c99
|
30
31
|
CFLAGS += -Wall
|
31
32
|
CFLAGS += -Wextra
|
32
|
-
CFLAGS += -Werror
|
33
33
|
CFLAGS += -Wpointer-arith
|
34
34
|
CFLAGS += -Wcast-align
|
35
35
|
CFLAGS += -Wwrite-strings
|
@@ -41,9 +41,6 @@ CFLAGS += -Wno-unknown-pragmas
|
|
41
41
|
CFLAGS += -Wstrict-prototypes
|
42
42
|
CFLAGS += -Wundef
|
43
43
|
CFLAGS += -Wold-style-definition
|
44
|
-
CFLAGS += -Wmissing-prototypes
|
45
|
-
CFLAGS += -Wmissing-declarations
|
46
|
-
CFLAGS += -DUNITY_FIXTURES
|
47
44
|
|
48
45
|
TARGET_BASE1=all_tests
|
49
46
|
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
|
@@ -64,8 +61,10 @@ all: clean default
|
|
64
61
|
|
65
62
|
default:
|
66
63
|
$(C_COMPILER) $(CFLAGS) $(INC_DIRS) $(SYMBOLS) $(SRC_FILES1) -o $(TARGET1)
|
67
|
-
./$(TARGET1) -v
|
64
|
+
- ./$(TARGET1) -v
|
68
65
|
|
69
66
|
clean:
|
70
|
-
$(CLEANUP)
|
67
|
+
$(CLEANUP) $(TARGET1)
|
71
68
|
|
69
|
+
ci: CFLAGS += -Werror
|
70
|
+
ci: default
|
@@ -3,41 +3,41 @@ UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/../..'
|
|
3
3
|
|
4
4
|
require 'rake'
|
5
5
|
require 'rake/clean'
|
6
|
-
require HERE+'rakefile_helper'
|
6
|
+
require HERE + 'rakefile_helper'
|
7
7
|
|
8
8
|
TEMP_DIRS = [
|
9
|
-
|
10
|
-
]
|
9
|
+
File.join(HERE, 'build')
|
10
|
+
].freeze
|
11
11
|
|
12
12
|
TEMP_DIRS.each do |dir|
|
13
13
|
directory(dir)
|
14
14
|
CLOBBER.include(dir)
|
15
15
|
end
|
16
16
|
|
17
|
-
task :
|
17
|
+
task prepare_for_tests: TEMP_DIRS
|
18
18
|
|
19
19
|
include RakefileHelpers
|
20
20
|
|
21
21
|
# Load default configuration, for now
|
22
|
-
DEFAULT_CONFIG_FILE = 'target_gcc_32.yml'
|
22
|
+
DEFAULT_CONFIG_FILE = 'target_gcc_32.yml'.freeze
|
23
23
|
configure_toolchain(DEFAULT_CONFIG_FILE)
|
24
24
|
|
25
|
-
task :
|
26
|
-
run_tests
|
25
|
+
task unit: [:prepare_for_tests] do
|
26
|
+
run_tests unit_test_files
|
27
27
|
end
|
28
28
|
|
29
|
-
desc
|
29
|
+
desc 'Generate test summary'
|
30
30
|
task :summary do
|
31
31
|
report_summary
|
32
32
|
end
|
33
33
|
|
34
|
-
desc
|
35
|
-
task :
|
36
|
-
task :
|
37
|
-
task :
|
38
|
-
task :
|
34
|
+
desc 'Build and test Unity'
|
35
|
+
task all: %i(clean unit summary)
|
36
|
+
task default: %i(clobber all)
|
37
|
+
task ci: [:default]
|
38
|
+
task cruise: [:default]
|
39
39
|
|
40
|
-
desc
|
41
|
-
task :config, :config_file do |
|
40
|
+
desc 'Load configuration'
|
41
|
+
task :config, :config_file do |_t, args|
|
42
42
|
configure_toolchain(args[:config_file])
|
43
43
|
end
|