ceedling 0.20.3 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +1 -0
- data/Rakefile +1 -0
- data/bin/ceedling +79 -26
- data/lib/ceedling/configurator_plugins.rb +0 -18
- data/lib/ceedling/rules_cmock.rake +1 -1
- data/lib/ceedling/tasks_base.rake +5 -1
- data/lib/ceedling/tasks_tests.rake +12 -9
- data/lib/ceedling/version.rb +1 -1
- data/lib/ceedling/version.rb.erb +1 -1
- data/plugins/fake_function_framework/README.md +250 -0
- data/plugins/fake_function_framework/Rakefile +19 -0
- data/plugins/fake_function_framework/examples/fff_example/project.yml +71 -0
- data/plugins/fake_function_framework/examples/fff_example/rakefile.rb +7 -0
- data/plugins/fake_function_framework/examples/fff_example/src/bar.c +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +13 -0
- data/plugins/fake_function_framework/examples/fff_example/src/custom_types.h +6 -0
- data/plugins/fake_function_framework/examples/fff_example/src/display.c +7 -0
- data/plugins/fake_function_framework/examples/fff_example/src/display.h +16 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +92 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.h +11 -0
- data/plugins/fake_function_framework/examples/fff_example/src/foo.c +16 -0
- data/plugins/fake_function_framework/examples/fff_example/src/foo.h +8 -0
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h +6 -0
- data/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c +155 -0
- data/plugins/fake_function_framework/examples/fff_example/test/test_foo.c +47 -0
- data/plugins/fake_function_framework/lib/fake_function_framework.rb +87 -0
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +159 -0
- data/plugins/fake_function_framework/spec/fff_mock_generator_spec.rb +464 -0
- data/plugins/fake_function_framework/spec/spec_helper.rb +96 -0
- data/plugins/fake_function_framework/src/fff_unity_helper.h +33 -0
- data/plugins/fake_function_framework/vendor/fff/LICENSE +25 -0
- data/plugins/fake_function_framework/vendor/fff/Makefile +10 -0
- data/plugins/fake_function_framework/vendor/fff/README.md +454 -0
- data/plugins/fake_function_framework/vendor/fff/buildandtest +15 -0
- data/plugins/fake_function_framework/vendor/fff/examples/Makefile +7 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/Makefile +64 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c +24 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.h +11 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.cpp +50 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.fff.cpp +62 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/hardware_abstraction.h +15 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/registers.h +13 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/DISPLAY.h +17 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Kata.txt +25 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Makefile +67 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/SYSTEM.h +21 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.c +48 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.h +12 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_ansic.c +183 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_cpp.cpp +136 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/test_suite_template.c +34 -0
- data/plugins/fake_function_framework/vendor/fff/fakegen.rb +420 -0
- data/plugins/fake_function_framework/vendor/fff/fff.h +5112 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/Makefile +22 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest-all.cc +9118 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest-main.cc +6 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest.h +19537 -0
- data/plugins/fake_function_framework/vendor/fff/test/Makefile +81 -0
- data/plugins/fake_function_framework/vendor/fff/test/c_test_framework.h +15 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_c.c +108 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_cpp.cpp +45 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_c.c +76 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_cpp.cpp +23 -0
- data/plugins/fake_function_framework/vendor/fff/test/global_fakes.c +13 -0
- data/plugins/fake_function_framework/vendor/fff/test/global_fakes.h +37 -0
- data/plugins/fake_function_framework/vendor/fff/test/test_cases.include +276 -0
- data/plugins/gcov/README.md +9 -0
- data/plugins/gcov/{template.erb → assets/template.erb} +1 -1
- data/plugins/gcov/{defaults.yml → config/defaults.yml} +10 -1
- data/plugins/gcov/gcov.rake +20 -8
- data/plugins/gcov/{gcov.rb → lib/gcov.rb} +13 -24
- data/plugins/module_generator/module_generator.rake +3 -3
- data/plugins/warnings_report/lib/warnings_report.rb +69 -0
- data/plugins/xml_tests_report/lib/xml_tests_report.rb +108 -0
- data/spec/spec_system_helper.rb +1 -1
- data/vendor/c_exception/lib/CException.h +1 -1
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- 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/c_exception/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +9 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +1 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +28 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +57 -17
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +3 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +2 -3
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +336 -191
- data/vendor/c_exception/vendor/unity/src/unity.h +73 -69
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -90
- data/vendor/c_exception/vendor/unity/test/Makefile +51 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/c_exception/vendor/unity/test/rakefile +5 -0
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +127 -5
- data/vendor/cmock/docs/CMock_Summary.md +1 -1
- data/vendor/cmock/lib/cmock_generator.rb +7 -2
- data/vendor/cmock/lib/cmock_header_parser.rb +29 -9
- data/vendor/cmock/scripts/create_mock.rb +1 -1
- data/vendor/cmock/test/system/test_compilation/const.h +15 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +4 -4
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +136 -73
- data/vendor/cmock/vendor/c_exception/lib/CException.h +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- 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/c_exception/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +9 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +28 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +57 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +2 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +336 -191
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +73 -69
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -90
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +51 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +5 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +127 -5
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- 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/cmock/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/cmock/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +3 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +5 -2
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +1 -2
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +329 -186
- data/vendor/cmock/vendor/unity/src/unity.h +73 -69
- data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -94
- data/vendor/cmock/vendor/unity/test/Makefile +4 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/cmock/vendor/unity/test/rakefile +5 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +104 -7
- data/vendor/deep_merge/README +94 -94
- data/vendor/deep_merge/Rakefile +28 -28
- data/vendor/deep_merge/lib/deep_merge.rb +211 -211
- data/vendor/deep_merge/test/test_deep_merge.rb +553 -553
- data/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- 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
- data/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +3 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +5 -2
- data/vendor/unity/extras/fixture/test/unity_output_Spy.c +1 -2
- data/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/unity/src/unity.c +329 -186
- data/vendor/unity/src/unity.h +73 -69
- data/vendor/unity/src/unity_internals.h +119 -94
- data/vendor/unity/test/Makefile +4 -5
- data/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/unity/test/rakefile +5 -0
- data/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/unity/test/tests/testunity.c +104 -7
- metadata +124 -32
- data/plugins/gcov/readme.txt +0 -0
- data/plugins/warnings_report/warnings_report.rb +0 -71
- data/plugins/xml_tests_report/xml_tests_report.rb +0 -110
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -68
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -68
- data/vendor/cmock/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/cmock/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/cmock/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/cmock/vendor/unity/test/testdata/testsample.c +0 -68
- data/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/unity/test/testdata/testsample.c +0 -68
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fef79035eb5bbe9732905e831e227da8e2a8b788
|
4
|
+
data.tar.gz: 6c9c2c4b267ecec0395ef6c0028a4595f12dc8a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95336d639633c43a5ecb27745fd4452645bd53a81b45715891f056aa660a581329f9fc7f326d1366ce2082a780fcd8ae74824a1eea91d9930f8c464b5e1059d2
|
7
|
+
data.tar.gz: b27f3cc0aef83627c2669ac2b0f23e4583906a724e30cfb58809cad4675ac37f8f2cde09710606383c06564558c7561eb8be33b85279063a0a1c1480e58bfb06
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
data/bin/ceedling
CHANGED
@@ -44,7 +44,11 @@ unless (File.exists?("project.yml"))
|
|
44
44
|
'docs/CeedlingPacket.pdf',
|
45
45
|
'vendor/c_exception/docs/CExceptionSummary.pdf',
|
46
46
|
'vendor/cmock/docs/CMock Summary.pdf',
|
47
|
-
'vendor/unity/docs/
|
47
|
+
'vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf',
|
48
|
+
'vendor/unity/docs/UnityAssertionsReference.pdf',
|
49
|
+
'vendor/unity/docs/UnityConfigurationGuide.pdf',
|
50
|
+
'vendor/unity/docs/UnityGettingStartedGuide.pdf',
|
51
|
+
'vendor/unity/docs/UnityHelperScriptsGuide.pdf',
|
48
52
|
]
|
49
53
|
|
50
54
|
doc_files.each do |f|
|
@@ -143,11 +147,56 @@ unless (File.exists?("project.yml"))
|
|
143
147
|
|
144
148
|
#===================================== We Have A Project Already ================================================
|
145
149
|
else
|
150
|
+
begin
|
151
|
+
require 'pty'
|
152
|
+
|
153
|
+
#if available, we use PTY because it will live-stream our data instead of buffering it all up
|
154
|
+
def spawn_command(cmd, &block)
|
155
|
+
begin
|
156
|
+
PTY.spawn(cmd) do |stdout, stdin, pid|
|
157
|
+
begin
|
158
|
+
block.call(stdout)
|
159
|
+
rescue Errno::EIO
|
160
|
+
end
|
161
|
+
end
|
162
|
+
rescue Exception => e
|
163
|
+
STDERR.puts e.inspect unless (e == PTY::ChildExited)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
rescue
|
146
168
|
|
147
|
-
|
169
|
+
begin
|
170
|
+
|
171
|
+
require 'popen4'
|
172
|
+
|
173
|
+
#if pty wasn't available, we'll use POPEN instead
|
174
|
+
def spawn_command(cmd, &block)
|
175
|
+
POpen4.popen4(cmd) do |stdout, stderr, stdin|
|
176
|
+
begin
|
177
|
+
block.call(stdout)
|
178
|
+
rescue Errno::EIO
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
rescue
|
184
|
+
|
185
|
+
#if neither of these libraries were available, we can just shell out to the command and collect results
|
186
|
+
def spawn_command(cmd, &block)
|
187
|
+
block.call( `#{cmd}` )
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
end
|
192
|
+
|
193
|
+
require 'curses'
|
148
194
|
require 'yaml'
|
149
195
|
require 'rbconfig'
|
150
196
|
|
197
|
+
Curses.init_screen()
|
198
|
+
cols = Curses.cols
|
199
|
+
|
151
200
|
#determine platform
|
152
201
|
platform = begin
|
153
202
|
case(RbConfig::CONFIG['host_os'])
|
@@ -196,6 +245,8 @@ else
|
|
196
245
|
abort
|
197
246
|
when /--gtest/
|
198
247
|
options[:pretend_we_are_gtest] = true
|
248
|
+
when /--debug/
|
249
|
+
options[:outfile] = "debug.txt"
|
199
250
|
else
|
200
251
|
options[:args] += v + " "
|
201
252
|
end
|
@@ -211,37 +262,39 @@ else
|
|
211
262
|
ENV["PATH"] = path
|
212
263
|
end
|
213
264
|
|
265
|
+
if (options[:outfile])
|
266
|
+
f = File.open(options[:outfile],'w')
|
267
|
+
f << ARGV.inspect << "\n\n"
|
268
|
+
f << options.inspect << "\n\n"
|
269
|
+
end
|
270
|
+
|
214
271
|
#run rake and capture all the output
|
215
|
-
results = ""
|
216
272
|
okay_to_print = !(options[:pretend_we_are_gtest])
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
273
|
+
options[:cmd] = if (options[:pretest].nil? || options[:pretest].empty?)
|
274
|
+
"rake #{options[:args]}"
|
275
|
+
else
|
276
|
+
"#{options[:pretest]} && rake #{options[:args]}"
|
277
|
+
end
|
278
|
+
spawn_command(options[:cmd]) do |stdout|
|
279
|
+
stdout.each do |line|
|
280
|
+
okay_to_print = true if ((options[:pretend_we_are_gtest]) && (line.match(/\[\=+\]/)))
|
281
|
+
if (okay_to_print)
|
282
|
+
f.puts(line) if (options[:outfile])
|
283
|
+
if (options[:args].strip == "-T")
|
284
|
+
line.gsub!(/(?<!\w)rake(?!\w)/,'ceedling')
|
285
|
+
if (line.length > cols)
|
286
|
+
endings = line.match(/[\r\n]+/)[0]
|
287
|
+
line.gsub!(endings,'')
|
288
|
+
line = line.slice(0, cols-3) + '...' + endings
|
289
|
+
end
|
229
290
|
end
|
230
|
-
|
291
|
+
puts(line)
|
231
292
|
end
|
232
293
|
end
|
233
|
-
rescue Exception => e
|
234
|
-
results += e.inspect #unless (e == PTY::ChildExited)
|
235
294
|
end
|
236
295
|
|
237
|
-
|
238
|
-
|
239
|
-
#dump the results back out stdout unless otherwise specified
|
240
|
-
if (options[:outfile].nil?)
|
241
|
-
puts results
|
242
|
-
else
|
243
|
-
File.open(options[:outfile],'w') {|f| f << results }
|
244
|
-
end
|
296
|
+
f.close if options[:outfile]
|
297
|
+
true
|
245
298
|
|
246
299
|
#===================================================================================================================
|
247
300
|
end
|
@@ -19,14 +19,10 @@ class ConfiguratorPlugins
|
|
19
19
|
|
20
20
|
config[:plugins][:enabled].each do |plugin|
|
21
21
|
path = File.join(root, plugin, "lib")
|
22
|
-
old_path = File.join( root, plugin )
|
23
22
|
|
24
23
|
if ( not @file_wrapper.directory_listing( File.join( path, '*.rb' ) ).empty? )
|
25
24
|
plugin_paths[(plugin + '_path').to_sym] = path
|
26
25
|
@system_wrapper.add_load_path( path )
|
27
|
-
elsif ( not @file_wrapper.directory_listing( File.join( old_path, '*.rb' ) ).empty? )
|
28
|
-
plugin_paths[(plugin + '_path').to_sym] = old_path
|
29
|
-
@system_wrapper.add_load_path( old_path )
|
30
26
|
end
|
31
27
|
end
|
32
28
|
end
|
@@ -59,17 +55,11 @@ class ConfiguratorPlugins
|
|
59
55
|
config[:plugins][:enabled].each do |plugin|
|
60
56
|
script_plugin_path = File.join(root, plugin, "lib", "#{plugin}.rb")
|
61
57
|
|
62
|
-
# Add the old path here to support legacy style. Eventaully remove.
|
63
|
-
old_script_plugin_path = File.join(root, plugin, "#{plugin}.rb")
|
64
58
|
|
65
59
|
if @file_wrapper.exist?(script_plugin_path) or @file_wrapper.exist?(old_script_plugin_path)
|
66
60
|
@script_plugins << plugin
|
67
61
|
end
|
68
62
|
|
69
|
-
# Print depreciation warning.
|
70
|
-
if @file_wrapper.exist?(old_script_plugin_path)
|
71
|
-
$stderr.puts "WARNING: Depreciated plugin style used in #{plugin}. Use new directory structure!"
|
72
|
-
end
|
73
63
|
end
|
74
64
|
end
|
75
65
|
|
@@ -85,14 +75,9 @@ class ConfiguratorPlugins
|
|
85
75
|
config[:plugins][:enabled].each do |plugin|
|
86
76
|
config_plugin_path = File.join(root, plugin, "config", "#{plugin}.yml")
|
87
77
|
|
88
|
-
# Add the old path here to support legacy style. Eventaully remove.
|
89
|
-
old_config_plugin_path = File.join(root, plugin, "#{plugin}.yml")
|
90
78
|
|
91
79
|
if @file_wrapper.exist?(config_plugin_path)
|
92
80
|
plugins_with_path << config_plugin_path
|
93
|
-
elsif @file_wrapper.exist?(old_config_plugin_path)
|
94
|
-
# there's a warning printed for this in find_script_plugins
|
95
|
-
plugins_with_path << old_config_plugin_path
|
96
81
|
end
|
97
82
|
end
|
98
83
|
end
|
@@ -108,12 +93,9 @@ class ConfiguratorPlugins
|
|
108
93
|
config[:plugins][:load_paths].each do |root|
|
109
94
|
config[:plugins][:enabled].each do |plugin|
|
110
95
|
default_path = File.join(root, plugin, 'config', 'defaults.yml')
|
111
|
-
old_default_path = File.join(root, plugin, 'defaults.yml')
|
112
96
|
|
113
97
|
if @file_wrapper.exist?(default_path)
|
114
98
|
defaults_with_path << default_path
|
115
|
-
elsif @file_wrapper.exist?(old_default_path)
|
116
|
-
defaults_with_path << old_default_path
|
117
99
|
end
|
118
100
|
end
|
119
101
|
end
|
@@ -69,12 +69,16 @@ end
|
|
69
69
|
if (not ENVIRONMENT.empty?)
|
70
70
|
desc "List all configured environment variables."
|
71
71
|
task :environment do
|
72
|
+
env_list = []
|
72
73
|
ENVIRONMENT.each do |env|
|
73
74
|
env.each_key do |key|
|
74
75
|
name = key.to_s.upcase
|
75
|
-
|
76
|
+
env_list.push(" - #{name}: \"#{env[key]}\"")
|
76
77
|
end
|
77
78
|
end
|
79
|
+
env_list.sort.each do |env_line|
|
80
|
+
puts env_line
|
81
|
+
end
|
78
82
|
end
|
79
83
|
end
|
80
84
|
|
@@ -1,9 +1,12 @@
|
|
1
1
|
require 'ceedling/constants'
|
2
2
|
|
3
|
+
task :test => [:directories] do
|
4
|
+
@ceedling[:test_invoker].setup_and_invoke(COLLECTION_ALL_TESTS)
|
5
|
+
end
|
3
6
|
|
4
7
|
namespace TEST_SYM do
|
5
|
-
|
6
|
-
desc "Run all unit tests."
|
8
|
+
|
9
|
+
desc "Run all unit tests (also just 'test' works)."
|
7
10
|
task :all => [:directories] do
|
8
11
|
@ceedling[:test_invoker].setup_and_invoke(COLLECTION_ALL_TESTS)
|
9
12
|
end
|
@@ -13,21 +16,21 @@ namespace TEST_SYM do
|
|
13
16
|
message = "\nOops! '#{TEST_ROOT_NAME}:*' isn't a real task. " +
|
14
17
|
"Use a real test or source file name (no path) in place of the wildcard.\n" +
|
15
18
|
"Example: rake #{TEST_ROOT_NAME}:foo.c\n\n"
|
16
|
-
|
19
|
+
|
17
20
|
@ceedling[:streaminator].stdout_puts( message )
|
18
21
|
end
|
19
|
-
|
22
|
+
|
20
23
|
desc "Run tests for changed files."
|
21
24
|
task :delta => [:directories] do
|
22
25
|
@ceedling[:test_invoker].setup_and_invoke(COLLECTION_ALL_TESTS, TEST_SYM, {:force_run => false})
|
23
26
|
end
|
24
|
-
|
27
|
+
|
25
28
|
desc "Run tests by matching regular expression pattern."
|
26
29
|
task :pattern, [:regex] => [:directories] do |t, args|
|
27
30
|
matches = []
|
28
|
-
|
31
|
+
|
29
32
|
COLLECTION_ALL_TESTS.each { |test| matches << test if (test =~ /#{args.regex}/) }
|
30
|
-
|
33
|
+
|
31
34
|
if (matches.size > 0)
|
32
35
|
@ceedling[:test_invoker].setup_and_invoke(matches, TEST_SYM, {:force_run => false})
|
33
36
|
else
|
@@ -38,9 +41,9 @@ namespace TEST_SYM do
|
|
38
41
|
desc "Run tests whose test path contains [dir] or [dir] substring."
|
39
42
|
task :path, [:dir] => [:directories] do |t, args|
|
40
43
|
matches = []
|
41
|
-
|
44
|
+
|
42
45
|
COLLECTION_ALL_TESTS.each { |test| matches << test if File.dirname(test).include?(args.dir.gsub(/\\/, '/')) }
|
43
|
-
|
46
|
+
|
44
47
|
if (matches.size > 0)
|
45
48
|
@ceedling[:test_invoker].setup_and_invoke(matches, TEST_SYM, {:force_run => false})
|
46
49
|
else
|
data/lib/ceedling/version.rb
CHANGED
data/lib/ceedling/version.rb.erb
CHANGED
@@ -0,0 +1,250 @@
|
|
1
|
+
# A Fake Function Framework Plug-in for Ceedling
|
2
|
+
|
3
|
+
This is a plug-in for [Ceedling](https://github.com/ThrowTheSwitch/Ceedling) to use the [Fake Function Framework](https://github.com/meekrosoft/fff) for mocking instead of CMock.
|
4
|
+
|
5
|
+
Using fff provides less strict mocking than CMock, and allows for more loosely-coupled tests.
|
6
|
+
And, when tests fail -- since you get the actual line number of the failure -- it's a lot easier to figure out what went wrong.
|
7
|
+
|
8
|
+
## Installing the plug-in
|
9
|
+
|
10
|
+
To use the plugin you need to 1) get the contents of this repo and 2) configure your project to use it.
|
11
|
+
|
12
|
+
### Get the source
|
13
|
+
|
14
|
+
The easiest way to get the source is to just clone this repo into the Ceedling plugin folder for your existing Ceedling project.
|
15
|
+
(Don't have a Ceedling project already? [Here are instructions to create one.](http://www.electronvector.com/blog/try-embedded-test-driven-development-right-now-with-ceedling))
|
16
|
+
From within `<your-project>/vendor/ceedling/plugins`, run:
|
17
|
+
|
18
|
+
`git clone https://github.com/ElectronVector/fake_function_framework.git`
|
19
|
+
|
20
|
+
This will create a new folder named `fake_function_framework` in the plugins folder.
|
21
|
+
|
22
|
+
### Enable the plug-in.
|
23
|
+
|
24
|
+
The plug-in is enabled from within your project.yml file.
|
25
|
+
|
26
|
+
In the `:plugins` configuration, add `fake_function_framework` to the list of enabled plugins:
|
27
|
+
|
28
|
+
```yaml
|
29
|
+
:plugins:
|
30
|
+
:load_paths:
|
31
|
+
- vendor/ceedling/plugins
|
32
|
+
:enabled:
|
33
|
+
- stdout_pretty_tests_report
|
34
|
+
- module_generator
|
35
|
+
- fake_function_framework
|
36
|
+
```
|
37
|
+
*Note that you could put the plugin source in some other loaction.
|
38
|
+
In that case you'd need to add a new path the `:load_paths`.*
|
39
|
+
|
40
|
+
## How to use it
|
41
|
+
|
42
|
+
You use fff with Ceedling the same way you used to use CMock.
|
43
|
+
Modules can still be generated with the default module generator: `rake module:create[my_module]`.
|
44
|
+
If you want to "mock" `some_module.h` in your tests, just `#include "mock_some_module.h"`.
|
45
|
+
This creates a fake function for each of the functions defined in `some_module.h`.
|
46
|
+
|
47
|
+
The name of each fake is the original function name with an appended `_fake`.
|
48
|
+
For example, if we're generating fakes for a stack module with `push` and `pop` functions, we would have the fakes `push_fake` and `pop_fake`.
|
49
|
+
These fakes are linked into our test executable so that any time our unit under test calls `push` or `pop` our fakes are called instead.
|
50
|
+
|
51
|
+
Each of these fakes is actually a structure containing information about how the function was called, and what it might return.
|
52
|
+
We can use Unity to inspect these fakes in our tests, and verify the interactions of our units.
|
53
|
+
There is also a global structure named `fff` which we can use to check the sequence of calls.
|
54
|
+
|
55
|
+
The fakes can also be configured to return particular values, so you can exercise the unit under test however you want.
|
56
|
+
|
57
|
+
The examples below explain how to use fff to test a variety of module interactions.
|
58
|
+
Each example uses fakes for a "display" module, created from a display.h file with `#include "mock_display.h"`. The `display.h` file must exist and must contain the prototypes for the functions to be faked.
|
59
|
+
|
60
|
+
### Test that a function was called once
|
61
|
+
|
62
|
+
```c
|
63
|
+
void
|
64
|
+
test_whenTheDeviceIsReset_thenTheStatusLedIsTurnedOff()
|
65
|
+
{
|
66
|
+
// When
|
67
|
+
event_deviceReset();
|
68
|
+
|
69
|
+
// Then
|
70
|
+
TEST_ASSERT_EQUAL(1, display_turnOffStatusLed_fake.call_count);
|
71
|
+
}
|
72
|
+
```
|
73
|
+
|
74
|
+
### Test that a function was NOT called
|
75
|
+
|
76
|
+
```c
|
77
|
+
void
|
78
|
+
test_whenThePowerReadingIsLessThan5_thenTheStatusLedIsNotTurnedOn(void)
|
79
|
+
{
|
80
|
+
// When
|
81
|
+
event_powerReadingUpdate(4);
|
82
|
+
|
83
|
+
// Then
|
84
|
+
TEST_ASSERT_EQUAL(0, display_turnOnStatusLed_fake.call_count);
|
85
|
+
}
|
86
|
+
```
|
87
|
+
|
88
|
+
## Test that a single function was called with the correct argument
|
89
|
+
|
90
|
+
```c
|
91
|
+
void
|
92
|
+
test_whenTheVolumeKnobIsMaxed_thenVolumeDisplayIsSetTo11(void)
|
93
|
+
{
|
94
|
+
// When
|
95
|
+
event_volumeKnobMaxed();
|
96
|
+
|
97
|
+
// Then
|
98
|
+
TEST_ASSERT_EQUAL(1, display_setVolume_fake.call_count);
|
99
|
+
TEST_ASSERT_EQUAL(11, display_setVolume_fake.arg0_val);
|
100
|
+
}
|
101
|
+
```
|
102
|
+
|
103
|
+
## Test that calls are made in a particular sequence
|
104
|
+
|
105
|
+
```c
|
106
|
+
void
|
107
|
+
test_whenTheModeSelectButtonIsPressed_thenTheDisplayModeIsCycled(void)
|
108
|
+
{
|
109
|
+
// When
|
110
|
+
event_modeSelectButtonPressed();
|
111
|
+
event_modeSelectButtonPressed();
|
112
|
+
event_modeSelectButtonPressed();
|
113
|
+
|
114
|
+
// Then
|
115
|
+
TEST_ASSERT_EQUAL_PTR((void*)display_setModeToMinimum, fff.call_history[0]);
|
116
|
+
TEST_ASSERT_EQUAL_PTR((void*)display_setModeToMaximum, fff.call_history[1]);
|
117
|
+
TEST_ASSERT_EQUAL_PTR((void*)display_setModeToAverage, fff.call_history[2]);
|
118
|
+
}
|
119
|
+
```
|
120
|
+
|
121
|
+
## Fake a return value from a function
|
122
|
+
|
123
|
+
```c
|
124
|
+
void
|
125
|
+
test_givenTheDisplayHasAnError_whenTheDeviceIsPoweredOn_thenTheDisplayIsPoweredDown(void)
|
126
|
+
{
|
127
|
+
// Given
|
128
|
+
display_isError_fake.return_val = true;
|
129
|
+
|
130
|
+
// When
|
131
|
+
event_devicePoweredOn();
|
132
|
+
|
133
|
+
// Then
|
134
|
+
TEST_ASSERT_EQUAL(1, display_powerDown_fake.call_count);
|
135
|
+
}
|
136
|
+
```
|
137
|
+
|
138
|
+
## Fake a function with a value returned by reference
|
139
|
+
|
140
|
+
```c
|
141
|
+
void
|
142
|
+
test_givenTheUserHasTypedSleep_whenItIsTimeToCheckTheKeyboard_theDisplayIsPoweredDown(void)
|
143
|
+
{
|
144
|
+
// Given
|
145
|
+
char mockedEntry[] = "sleep";
|
146
|
+
void return_mock_value(char * entry, int length)
|
147
|
+
{
|
148
|
+
if (length > strlen(mockedEntry))
|
149
|
+
{
|
150
|
+
strncpy(entry, mockedEntry, length);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
display_getKeyboardEntry_fake.custom_fake = return_mock_value;
|
154
|
+
|
155
|
+
// When
|
156
|
+
event_keyboardCheckTimerExpired();
|
157
|
+
|
158
|
+
// Then
|
159
|
+
TEST_ASSERT_EQUAL(1, display_powerDown_fake.call_count);
|
160
|
+
}
|
161
|
+
```
|
162
|
+
|
163
|
+
## Fake a function with a function pointer parameter
|
164
|
+
|
165
|
+
```
|
166
|
+
void
|
167
|
+
test_givenNewDataIsAvailable_whenTheDisplayHasUpdated_thenTheEventIsComplete(void)
|
168
|
+
{
|
169
|
+
// A mock function for capturing the callback handler function pointer.
|
170
|
+
void(*registeredCallback)(void) = 0;
|
171
|
+
void mock_display_updateData(int data, void(*callback)(void))
|
172
|
+
{
|
173
|
+
//Save the callback function.
|
174
|
+
registeredCallback = callback;
|
175
|
+
}
|
176
|
+
display_updateData_fake.custom_fake = mock_display_updateData;
|
177
|
+
|
178
|
+
// Given
|
179
|
+
event_newDataAvailable(10);
|
180
|
+
|
181
|
+
// When
|
182
|
+
if (registeredCallback != 0)
|
183
|
+
{
|
184
|
+
registeredCallback();
|
185
|
+
}
|
186
|
+
|
187
|
+
// Then
|
188
|
+
TEST_ASSERT_EQUAL(true, eventProcessor_isLastEventComplete());
|
189
|
+
}
|
190
|
+
```
|
191
|
+
|
192
|
+
## Helper macros
|
193
|
+
|
194
|
+
For convenience, there are also some helper macros that create new Unity-style asserts:
|
195
|
+
|
196
|
+
- `TEST_ASSERT_CALLED(function)`: Asserts that a function was called once.
|
197
|
+
- `TEST_ASSERT_NOT_CALLED(function)`: Asserts that a function was never called.
|
198
|
+
- `TEST_ASSERT_CALLED_TIMES(times, function)`: Asserts that a function was called a particular number of times.
|
199
|
+
- `TEST_ASSERT_CALLED_IN_ORDER(order, function)`: Asserts that a function was called in a particular order.
|
200
|
+
|
201
|
+
Here's how you might use one of these instead of simply checking the call_count value:
|
202
|
+
|
203
|
+
```c
|
204
|
+
void
|
205
|
+
test_whenTheDeviceIsReset_thenTheStatusLedIsTurnedOff()
|
206
|
+
{
|
207
|
+
// When
|
208
|
+
event_deviceReset();
|
209
|
+
|
210
|
+
// Then
|
211
|
+
// This how to directly use fff...
|
212
|
+
TEST_ASSERT_EQUAL(1, display_turnOffStatusLed_fake.call_count);
|
213
|
+
// ...and this is how to use the helper macro.
|
214
|
+
TEST_ASSERT_CALLED(display_turnOffStatusLed);
|
215
|
+
}
|
216
|
+
```
|
217
|
+
|
218
|
+
## Test setup
|
219
|
+
|
220
|
+
All of the fake functions, and any fff global state are all reset automatically between each test.
|
221
|
+
|
222
|
+
## CMock configuration
|
223
|
+
|
224
|
+
Use still use some of the CMock configuration options for setting things like the mock prefix, and for including additional header files in the mock files.
|
225
|
+
|
226
|
+
```yaml
|
227
|
+
:cmock:
|
228
|
+
:mock_prefix: mock_
|
229
|
+
:includes:
|
230
|
+
-
|
231
|
+
:includes_h_pre_orig_header:
|
232
|
+
-
|
233
|
+
:includes_h_post_orig_header:
|
234
|
+
-
|
235
|
+
:includes_c_pre_header:
|
236
|
+
-
|
237
|
+
:includes_c_post_header:
|
238
|
+
```
|
239
|
+
|
240
|
+
## Running the tests
|
241
|
+
|
242
|
+
There are unit and integration tests for the plug-in itself.
|
243
|
+
These are run with the default `rake` task.
|
244
|
+
The integration test runs the tests for the example project in examples/fff_example.
|
245
|
+
For the integration tests to succeed, this repository must be placed in a Ceedling tree in the plugins folder.
|
246
|
+
|
247
|
+
## More examples
|
248
|
+
|
249
|
+
There is an example project in examples/fff_example.
|
250
|
+
It shows how to use the plug-in with some full-size examples.
|