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,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
# super simple test project for: mock support
|
3
|
-
|
4
|
-
:project:
|
5
|
-
:use_exceptions: FALSE
|
6
|
-
:use_mocks: TRUE
|
7
|
-
:use_preprocessor: FALSE
|
8
|
-
:use_auxiliary_dependencie: FALSE
|
9
|
-
:build_root: test/system/mocks/build
|
10
|
-
|
11
|
-
# shut up ceedling because of intentional exceptions;
|
12
|
-
# error report is misleading in test output
|
13
|
-
:verbosity: 0
|
14
|
-
|
15
|
-
:paths:
|
16
|
-
:test:
|
17
|
-
- test/system/mocks/test
|
18
|
-
:source:
|
19
|
-
- test/system/mocks/source
|
20
|
-
:include:
|
21
|
-
- test/system/mocks/include
|
22
|
-
|
23
|
-
:cmock:
|
24
|
-
:mock_prefix: mock_
|
25
|
-
|
26
|
-
:tools:
|
27
|
-
:test_compiler:
|
28
|
-
:executable: gcc
|
29
|
-
:arguments:
|
30
|
-
- -I"$": COLLECTION_PATHS_TEST_AND_SOURCE_INCLUDE
|
31
|
-
- -D$: COLLECTION_DEFINES_TEST
|
32
|
-
- -c ${1}
|
33
|
-
- -o ${2}
|
34
|
-
:test_linker:
|
35
|
-
:executable: gcc
|
36
|
-
:arguments:
|
37
|
-
- ${1}
|
38
|
-
- -o ${2}
|
39
|
-
# built under gcc, the test is the executable (no simulator)
|
40
|
-
:test_fixture:
|
41
|
-
:executable: ${1}
|
42
|
-
|
43
|
-
...
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../system_test_helper'
|
2
|
-
|
3
|
-
|
4
|
-
class TestTasksTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@results_path = "#{SYSTEM_TEST_ROOT}/mocks/build/tests/results"
|
8
|
-
|
9
|
-
ENV['CEEDLING_MAIN_PROJECT_FILE'] = File.join(SYSTEM_TEST_ROOT, 'project_mocks.yml')
|
10
|
-
|
11
|
-
ceedling_execute('directories', 'clobber')
|
12
|
-
end
|
13
|
-
|
14
|
-
def teardown
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
should "run a test and verify test results" do
|
19
|
-
|
20
|
-
# tell rake to execute all tests; use '--trace' to see problem if rake run explodes
|
21
|
-
ceedling_execute('test:test_a_file.c', '--trace')
|
22
|
-
|
23
|
-
results = fetch_test_results(@results_path, 'test_a_file');
|
24
|
-
|
25
|
-
assert_equal(4, results[:counts][:total])
|
26
|
-
assert_equal(2, results[:counts][:passed])
|
27
|
-
assert_equal(2, results[:counts][:failed])
|
28
|
-
end
|
29
|
-
|
30
|
-
should "blow up if header to be mocked is not found" do
|
31
|
-
|
32
|
-
# tell rake to execute all tests
|
33
|
-
results = ceedling_execute_no_boom('test:test_no_file.c')
|
34
|
-
assert_no_match(/ERROR: Could not find 'say_wha\.h'/i, results, 'execution should have failed because header file was not found')
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
---
|
2
|
-
# super simple test project for: basic unity test assert tests
|
3
|
-
|
4
|
-
:project:
|
5
|
-
:use_exceptions: FALSE
|
6
|
-
:use_mocks: FALSE
|
7
|
-
:use_preprocessor: FALSE
|
8
|
-
:use_auxiliary_dependencie: FALSE
|
9
|
-
:build_root: test/system/simple/build
|
10
|
-
|
11
|
-
:paths:
|
12
|
-
:test:
|
13
|
-
- test/system/simple/test
|
14
|
-
:source:
|
15
|
-
- test/system/simple/source
|
16
|
-
:include:
|
17
|
-
- test/system/simple/include
|
18
|
-
|
19
|
-
:tools:
|
20
|
-
:test_compiler:
|
21
|
-
:executable: gcc
|
22
|
-
:arguments:
|
23
|
-
- -I"$": COLLECTION_PATHS_TEST_AND_SOURCE_INCLUDE
|
24
|
-
- -D$: COLLECTION_DEFINES_TEST
|
25
|
-
- -c ${1}
|
26
|
-
- -o ${2}
|
27
|
-
:test_linker:
|
28
|
-
:executable: gcc
|
29
|
-
:arguments:
|
30
|
-
- ${1}
|
31
|
-
- -o ${2}
|
32
|
-
# built under gcc, the test is the executable (no simulator)
|
33
|
-
:test_fixture:
|
34
|
-
:executable: ${1}
|
35
|
-
|
36
|
-
...
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../system_test_helper'
|
2
|
-
|
3
|
-
|
4
|
-
class ProjectSimpleTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@results_path = "#{SYSTEM_TEST_ROOT}/simple/build/tests/results"
|
8
|
-
|
9
|
-
ENV['CEEDLING_MAIN_PROJECT_FILE'] = File.join(SYSTEM_TEST_ROOT, 'project_simple.yml')
|
10
|
-
|
11
|
-
ceedling_execute('directories', 'clobber')
|
12
|
-
end
|
13
|
-
|
14
|
-
def teardown
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
should "run all tests and verify test results" do
|
19
|
-
|
20
|
-
# tell rake to execute all tests; use '--trace' to see problem if rake run explodes
|
21
|
-
ceedling_execute('test:all', '--trace')
|
22
|
-
|
23
|
-
results = fetch_test_results(@results_path, 'test_stuff');
|
24
|
-
|
25
|
-
assert_equal(7, results[:counts][:total])
|
26
|
-
assert_equal(2, results[:counts][:passed])
|
27
|
-
assert_equal(1, results[:counts][:failed])
|
28
|
-
assert_equal(4, results[:counts][:ignored])
|
29
|
-
|
30
|
-
results = fetch_test_results(@results_path, 'test_other_stuff');
|
31
|
-
|
32
|
-
assert_equal(4, results[:counts][:total])
|
33
|
-
assert_equal(2, results[:counts][:passed])
|
34
|
-
assert_equal(2, results[:counts][:failed])
|
35
|
-
assert_equal(0, results[:counts][:ignored])
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../system_test_helper'
|
2
|
-
|
3
|
-
|
4
|
-
class MocksRuleTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@header_file = "a_file.h"
|
8
|
-
@mock_file = "mock_a_file.c"
|
9
|
-
@header_filepath = "#{SYSTEM_TEST_ROOT}/mocks/include/#{@header_file}"
|
10
|
-
@mock_filepath = "#{SYSTEM_TEST_ROOT}/mocks/build/tests/mocks/#{@mock_file}"
|
11
|
-
|
12
|
-
ENV['CEEDLING_MAIN_PROJECT_FILE'] = File.join(SYSTEM_TEST_ROOT, 'project_mocks.yml')
|
13
|
-
|
14
|
-
ceedling_execute('directories', 'clobber')
|
15
|
-
end
|
16
|
-
|
17
|
-
def teardown
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
should "generate a mock from a source header file and regenerate when its dependent source changes" do
|
22
|
-
rake_exec_matcher = /^\*\* Execute.+#{Regexp.escape(@mock_file)}$/
|
23
|
-
|
24
|
-
# verify clobber did its job
|
25
|
-
assert_equal(false, File.exists?(@mock_filepath))
|
26
|
-
|
27
|
-
# give rake a task to generate a mock file & verify its presence
|
28
|
-
ceedling_execute(@mock_filepath)
|
29
|
-
assert_equal(true, File.exists?(@mock_filepath), 'mock file not created')
|
30
|
-
|
31
|
-
# verify executing rule again will not regenerate mock
|
32
|
-
output = ceedling_execute_dry_run(@mock_filepath)
|
33
|
-
assert_no_match(rake_exec_matcher, output, 'mock file should not be slated for generation')
|
34
|
-
|
35
|
-
# wait a spell to update file timestamp, ensuring time change is recognizable
|
36
|
-
sleep(1)
|
37
|
-
FileUtils.touch(@header_filepath)
|
38
|
-
|
39
|
-
# verify executing rule again will regenerate mock
|
40
|
-
output = ceedling_execute_dry_run(@mock_filepath)
|
41
|
-
assert_match(rake_exec_matcher, output, 'mock file should be slated for generation')
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../system_test_helper'
|
2
|
-
|
3
|
-
|
4
|
-
class RunnersRuleTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@test_file = 'test_stuff.c'
|
8
|
-
@runner_file = 'test_stuff_runner.c'
|
9
|
-
@test_filepath = "#{SYSTEM_TEST_ROOT}/simple/test/#{@test_file}"
|
10
|
-
@runner_filepath = "#{SYSTEM_TEST_ROOT}/simple/build/tests/runners/#{@runner_file}"
|
11
|
-
|
12
|
-
ENV['CEEDLING_MAIN_PROJECT_FILE'] = File.join(SYSTEM_TEST_ROOT, 'project_simple.yml')
|
13
|
-
|
14
|
-
ceedling_execute('directories', 'clobber')
|
15
|
-
end
|
16
|
-
|
17
|
-
def teardown
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
should "generate a test runner from a test source header file and regenerate when its dependent source changes" do
|
22
|
-
rake_exec_matcher = /^\*\* Execute.+#{Regexp.escape(@runner_file)}$/
|
23
|
-
|
24
|
-
# verify clobber did its job
|
25
|
-
assert_equal(false, File.exists?(@runner_filepath))
|
26
|
-
|
27
|
-
# give rake a task to generate a test runner file & verify its presence
|
28
|
-
ceedling_execute(@runner_filepath)
|
29
|
-
assert_equal(true, File.exists?(@runner_filepath), 'test runner file not created')
|
30
|
-
|
31
|
-
# verify executing rule again will not regenerate runner
|
32
|
-
output = ceedling_execute_dry_run(@runner_filepath)
|
33
|
-
assert_no_match(rake_exec_matcher, output, 'test runner file should not be slated for generation')
|
34
|
-
|
35
|
-
# wait a spell to update file timestamp, ensuring time change is recognizable
|
36
|
-
sleep(1)
|
37
|
-
FileUtils.touch(@test_filepath)
|
38
|
-
|
39
|
-
# verify executing rule again will regenerate runner
|
40
|
-
output = ceedling_execute_dry_run(@runner_filepath)
|
41
|
-
assert_match(rake_exec_matcher, output, 'test runner file should be slated for generation')
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "other_stuff.h"
|
3
|
-
|
4
|
-
|
5
|
-
void setUp(void) {}
|
6
|
-
void tearDown(void) {}
|
7
|
-
|
8
|
-
// test successes
|
9
|
-
|
10
|
-
void test_add_should_succeed_1(void)
|
11
|
-
{
|
12
|
-
TEST_ASSERT_EQUAL(100, add(30, 70));
|
13
|
-
}
|
14
|
-
|
15
|
-
void test_add_should_succeed_2(void)
|
16
|
-
{
|
17
|
-
TEST_ASSERT_EQUAL(0, add(-5, 5));
|
18
|
-
}
|
19
|
-
|
20
|
-
// test failures
|
21
|
-
|
22
|
-
void test_fail()
|
23
|
-
{
|
24
|
-
TEST_FAIL("Boom.");
|
25
|
-
}
|
26
|
-
|
27
|
-
void test_add_should_fail(void)
|
28
|
-
{
|
29
|
-
TEST_ASSERT_EQUAL(0, add(2, 2));
|
30
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "stuff.h"
|
3
|
-
|
4
|
-
|
5
|
-
void setUp(void) {}
|
6
|
-
void tearDown(void) {}
|
7
|
-
|
8
|
-
|
9
|
-
// test ignores & variations on test declarations
|
10
|
-
|
11
|
-
void test_a_single_thing(void)
|
12
|
-
{
|
13
|
-
TEST_IGNORE_MESSAGE("pay no attention to the test behind the curtain");
|
14
|
-
}
|
15
|
-
|
16
|
-
void test_another_thing ( void )
|
17
|
-
{
|
18
|
-
TEST_IGNORE_MESSAGE("pay no attention to the test behind the curtain");
|
19
|
-
}
|
20
|
-
|
21
|
-
void test_some_non_void_param_stuff()
|
22
|
-
{
|
23
|
-
TEST_IGNORE_MESSAGE("pay no attention to the test behind the curtain");
|
24
|
-
}
|
25
|
-
|
26
|
-
void
|
27
|
-
test_some_multiline_test_case_action
|
28
|
-
(void)
|
29
|
-
{
|
30
|
-
TEST_IGNORE_MESSAGE("pay no attention to the test behind the curtain");
|
31
|
-
}
|
32
|
-
|
33
|
-
// test successes
|
34
|
-
|
35
|
-
void test_subtract_should_succeed_1(void)
|
36
|
-
{
|
37
|
-
TEST_ASSERT_EQUAL(10, subtract(31, 21));
|
38
|
-
}
|
39
|
-
|
40
|
-
void test_subtract_should_succeed_2(void)
|
41
|
-
{
|
42
|
-
TEST_ASSERT_EQUAL(0, subtract(12, 12));
|
43
|
-
}
|
44
|
-
|
45
|
-
// test failures
|
46
|
-
|
47
|
-
void test_subtract_should_fail(void)
|
48
|
-
{
|
49
|
-
TEST_ASSERT_EQUAL(100, subtract(210, 109));
|
50
|
-
}
|
51
|
-
|
@@ -1,73 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + "/../config/test_environment"
|
2
|
-
require 'test_helper'
|
3
|
-
require 'fileutils'
|
4
|
-
require 'yaml'
|
5
|
-
|
6
|
-
|
7
|
-
class Test::Unit::TestCase
|
8
|
-
extend Behaviors
|
9
|
-
|
10
|
-
def ceedling_execute(*args_and_tasks)
|
11
|
-
return execute('rake', ["-f #{File.join(LIB_ROOT, 'rakefile.rb')}"] + args_and_tasks)
|
12
|
-
end
|
13
|
-
|
14
|
-
# do not raise if rake execution of ceedling bombs & do not display any output
|
15
|
-
def ceedling_execute_no_boom(*args_and_tasks)
|
16
|
-
return execute('rake', ["-f #{File.join(LIB_ROOT, 'rakefile.rb')}"] + args_and_tasks, false, false, false)
|
17
|
-
end
|
18
|
-
|
19
|
-
# execute rake in dry run mode -- checking dependencies and invoke states but not actually taking action
|
20
|
-
def ceedling_execute_dry_run(*args_and_tasks)
|
21
|
-
return ceedling_execute(['-n'] + args_and_tasks)
|
22
|
-
end
|
23
|
-
|
24
|
-
def fetch_test_results(results_path, test_name)
|
25
|
-
filepath = ''
|
26
|
-
|
27
|
-
pass_path = File.join(results_path, "#{test_name}.pass")
|
28
|
-
fail_path = File.join(results_path, "#{test_name}.fail")
|
29
|
-
|
30
|
-
if (File.exists?(pass_path))
|
31
|
-
filepath = pass_path
|
32
|
-
elsif (File.exists?(fail_path))
|
33
|
-
filepath = fail_path
|
34
|
-
else
|
35
|
-
raise "Could not find test results for '#{test_name}' in #{results_path}"
|
36
|
-
end
|
37
|
-
|
38
|
-
return YAML.load(File.read(filepath))
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
def report(message)
|
44
|
-
puts message
|
45
|
-
$stdout.flush
|
46
|
-
end
|
47
|
-
|
48
|
-
def report_err(message)
|
49
|
-
$stderr.puts(message)
|
50
|
-
$stderr.flush
|
51
|
-
end
|
52
|
-
|
53
|
-
def execute(cmd, args=[], verbose_cmd=false, verbose_error=true, should_raise=true)
|
54
|
-
cmd_str = "#{cmd} #{args.join(' ')}"
|
55
|
-
|
56
|
-
# execute command and redirect stderr to stdout;
|
57
|
-
# the redirect grabs all response output centrally &
|
58
|
-
# lets us gobble up errors if we need to parse them for test execution
|
59
|
-
response = `#{cmd_str} 2>&1`
|
60
|
-
|
61
|
-
report(cmd_str) if verbose_cmd
|
62
|
-
report(response) if verbose_cmd
|
63
|
-
report('') if verbose_cmd
|
64
|
-
|
65
|
-
if ($?.exitstatus != 0)
|
66
|
-
report_err(response) if verbose_error
|
67
|
-
report_err('') if verbose_error
|
68
|
-
raise "Command '#{cmd_str}' failed. (Returned #{$?.exitstatus})" if should_raise
|
69
|
-
end
|
70
|
-
return response
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|