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
@@ -1,7 +1,7 @@
|
|
1
1
|
% function_string = hash[:coverage][:functions].to_s
|
2
2
|
% branch_string = hash[:coverage][:branches].to_s
|
3
3
|
% format_string = "%#{[function_string.length, branch_string.length].max}i"
|
4
|
-
<%=@ceedling[:plugin_reportinator].generate_banner("#{
|
4
|
+
<%=@ceedling[:plugin_reportinator].generate_banner("#{GCOV_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY")%>
|
5
5
|
% if (!hash[:coverage][:functions].nil?)
|
6
6
|
FUNCTIONS: <%=sprintf(format_string, hash[:coverage][:functions])%>%
|
7
7
|
% else
|
@@ -30,5 +30,14 @@
|
|
30
30
|
- -b
|
31
31
|
- -o "$": GCOV_BUILD_OUTPUT_PATH
|
32
32
|
- "\"${1}\""
|
33
|
-
|
33
|
+
:gcov_post_report:
|
34
|
+
:executable: gcovr
|
35
|
+
:optional: TRUE
|
36
|
+
:arguments:
|
37
|
+
- -p
|
38
|
+
- -b
|
39
|
+
- -e '^vendor.*|^build.*|^test.*|^lib.*'
|
40
|
+
- --html
|
41
|
+
- -r .
|
42
|
+
- -o GcovCoverageResults.html
|
34
43
|
...
|
data/plugins/gcov/gcov.rake
CHANGED
@@ -20,6 +20,7 @@ rule(/#{GCOV_BUILD_OUTPUT_PATH}\/#{'.+\\'+EXTENSION_OBJECT}$/ => [
|
|
20
20
|
if (File.basename(object.source) =~ /^(#{PROJECT_TEST_FILE_PREFIX}|#{CMOCK_MOCK_PREFIX}|#{GCOV_IGNORE_SOURCES.join('|')})/i)
|
21
21
|
@ceedling[:generator].generate_object_file(
|
22
22
|
TOOLS_GCOV_COMPILER,
|
23
|
+
OPERATION_COMPILE_SYM,
|
23
24
|
GCOV_SYM,
|
24
25
|
object.source,
|
25
26
|
object.name,
|
@@ -78,18 +79,18 @@ namespace GCOV_SYM do
|
|
78
79
|
message = "\nOops! '#{GCOV_ROOT_NAME}:*' isn't a real task. " +
|
79
80
|
"Use a real test or source file name (no path) in place of the wildcard.\n" +
|
80
81
|
"Example: rake #{GCOV_ROOT_NAME}:foo.c\n\n"
|
81
|
-
|
82
|
+
|
82
83
|
@ceedling[:streaminator].stdout_puts( message )
|
83
84
|
end
|
84
|
-
|
85
|
+
|
85
86
|
desc "Run tests by matching regular expression pattern."
|
86
87
|
task :pattern, [:regex] => [:directories] do |t, args|
|
87
88
|
matches = []
|
88
|
-
|
89
|
+
|
89
90
|
COLLECTION_ALL_TESTS.each do |test|
|
90
91
|
matches << test if test =~ /#{args.regex}/
|
91
92
|
end
|
92
|
-
|
93
|
+
|
93
94
|
if (matches.size > 0)
|
94
95
|
@ceedling[:configurator].replace_flattened_config(@ceedling[GCOV_SYM].config)
|
95
96
|
@ceedling[:test_invoker].setup_and_invoke(matches, GCOV_SYM, {:force_run => false})
|
@@ -102,11 +103,11 @@ namespace GCOV_SYM do
|
|
102
103
|
desc "Run tests whose test path contains [dir] or [dir] substring."
|
103
104
|
task :path, [:dir] => [:directories] do |t, args|
|
104
105
|
matches = []
|
105
|
-
|
106
|
+
|
106
107
|
COLLECTION_ALL_TESTS.each do |test|
|
107
108
|
matches << test if File.dirname(test).include?(args.dir.gsub(/\\/, '/'))
|
108
109
|
end
|
109
|
-
|
110
|
+
|
110
111
|
if (matches.size > 0)
|
111
112
|
@ceedling[:configurator].replace_flattened_config(@ceedling[GCOV_SYM].config)
|
112
113
|
@ceedling[:test_invoker].setup_and_invoke(matches, GCOV_SYM, {:force_run => false})
|
@@ -122,7 +123,7 @@ namespace GCOV_SYM do
|
|
122
123
|
@ceedling[:test_invoker].setup_and_invoke(COLLECTION_ALL_TESTS, GCOV_SYM, {:force_run => false})
|
123
124
|
@ceedling[:configurator].restore_config
|
124
125
|
end
|
125
|
-
|
126
|
+
|
126
127
|
# use a rule to increase efficiency for large projects
|
127
128
|
# gcov test tasks by regex
|
128
129
|
rule(/^#{GCOV_TASK_ROOT}\S+$/ => [
|
@@ -137,7 +138,7 @@ namespace GCOV_SYM do
|
|
137
138
|
@ceedling[:test_invoker].setup_and_invoke([test.source], GCOV_SYM)
|
138
139
|
@ceedling[:configurator].restore_config
|
139
140
|
end
|
140
|
-
|
141
|
+
|
141
142
|
end
|
142
143
|
|
143
144
|
if PROJECT_USE_DEEP_DEPENDENCIES
|
@@ -150,3 +151,14 @@ namespace REFRESH_SYM do
|
|
150
151
|
end
|
151
152
|
end
|
152
153
|
|
154
|
+
namespace UTILS_SYM do
|
155
|
+
|
156
|
+
desc "Create gcov code coverage html report"
|
157
|
+
task GCOV_SYM do
|
158
|
+
command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_POST_REPORT, [])
|
159
|
+
puts 'Creating html report of gcov results...'
|
160
|
+
@ceedling[:tool_executor].exec(command[:line], command[:options])
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
164
|
+
|
@@ -19,8 +19,8 @@ class Gcov < Plugin
|
|
19
19
|
attr_reader :config
|
20
20
|
|
21
21
|
def setup
|
22
|
-
@result_list = []
|
23
|
-
|
22
|
+
@result_list = []
|
23
|
+
|
24
24
|
@config = {
|
25
25
|
:project_test_build_output_path => GCOV_BUILD_OUTPUT_PATH,
|
26
26
|
:project_test_results_path => GCOV_RESULTS_PATH,
|
@@ -28,14 +28,16 @@ class Gcov < Plugin
|
|
28
28
|
:defines_test => DEFINES_TEST + ['CODE_COVERAGE'],
|
29
29
|
:collection_defines_test_and_vendor => COLLECTION_DEFINES_TEST_AND_VENDOR + ['CODE_COVERAGE']
|
30
30
|
}
|
31
|
-
|
32
|
-
@
|
31
|
+
|
32
|
+
@plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
33
|
+
@coverage_template_all = @ceedling[:file_wrapper].read( File.join( @plugin_root, 'assets/template.erb') )
|
33
34
|
end
|
34
35
|
|
35
36
|
def generate_coverage_object_file(source, object)
|
36
|
-
compile_command =
|
37
|
+
compile_command =
|
37
38
|
@ceedling[:tool_executor].build_command_line(
|
38
39
|
TOOLS_GCOV_COMPILER,
|
40
|
+
@ceedling[:flaginator].flag_down( OPERATION_COMPILE_SYM, GCOV_SYM, source),
|
39
41
|
source,
|
40
42
|
object,
|
41
43
|
@ceedling[:file_path_utils].form_test_build_list_filepath( object ) )
|
@@ -45,12 +47,12 @@ class Gcov < Plugin
|
|
45
47
|
|
46
48
|
def post_test_fixture_execute(arg_hash)
|
47
49
|
result_file = arg_hash[:result_file]
|
48
|
-
|
50
|
+
|
49
51
|
if ((result_file =~ /#{GCOV_RESULTS_PATH}/) and (not @result_list.include?(result_file)))
|
50
52
|
@result_list << arg_hash[:result_file]
|
51
53
|
end
|
52
54
|
end
|
53
|
-
|
55
|
+
|
54
56
|
def post_build
|
55
57
|
return if (not @ceedling[:task_invoker].invoked?(/^#{GCOV_TASK_ROOT}/))
|
56
58
|
|
@@ -60,18 +62,14 @@ class Gcov < Plugin
|
|
60
62
|
:header => GCOV_ROOT_NAME.upcase,
|
61
63
|
:results => results
|
62
64
|
}
|
63
|
-
|
65
|
+
|
64
66
|
@ceedling[:plugin_reportinator].run_test_results_report(hash) do
|
65
67
|
message = ''
|
66
68
|
message = 'Unit test failures.' if (results[:counts][:failed] > 0)
|
67
69
|
message
|
68
70
|
end
|
69
|
-
|
70
|
-
|
71
|
-
report_coverage_results_summary(@ceedling[:test_invoker].sources)
|
72
|
-
else
|
73
|
-
report_per_file_coverage_results(@ceedling[:test_invoker].sources)
|
74
|
-
end
|
71
|
+
|
72
|
+
report_per_file_coverage_results(@ceedling[:test_invoker].sources)
|
75
73
|
end
|
76
74
|
|
77
75
|
def summary
|
@@ -85,19 +83,10 @@ class Gcov < Plugin
|
|
85
83
|
}
|
86
84
|
|
87
85
|
@ceedling[:plugin_reportinator].run_test_results_report(hash)
|
88
|
-
|
89
|
-
# coverage results
|
90
|
-
# command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT_COVSRC)
|
91
|
-
# shell_result = @ceedling[:tool_executor].exec(command[:line], command[:options])
|
92
|
-
# report_coverage_results_all(shell_result[:output])
|
93
86
|
end
|
94
87
|
|
95
88
|
private ###################################
|
96
89
|
|
97
|
-
def report_coverage_results_summary(sources)
|
98
|
-
|
99
|
-
end
|
100
|
-
|
101
90
|
def report_per_file_coverage_results(sources)
|
102
91
|
banner = @ceedling[:plugin_reportinator].generate_banner "#{GCOV_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY"
|
103
92
|
@ceedling[:streaminator].stdout_puts "\n" + banner
|
@@ -108,7 +97,7 @@ class Gcov < Plugin
|
|
108
97
|
|
109
98
|
coverage_sources.each do |source|
|
110
99
|
basename = File.basename(source)
|
111
|
-
command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT, basename)
|
100
|
+
command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT, [], [basename])
|
112
101
|
shell_results = @ceedling[:tool_executor].exec(command[:line], command[:options])
|
113
102
|
coverage_results = shell_results[:output]
|
114
103
|
|
@@ -3,12 +3,12 @@ namespace :module do
|
|
3
3
|
|
4
4
|
desc "Generate module (source, header and test files)"
|
5
5
|
task :create, :module_path do |t, args|
|
6
|
-
@ceedling[:module_generator].create(
|
6
|
+
args[:module_path].split(/,/).each {|v| @ceedling[:module_generator].create(v) }
|
7
7
|
end
|
8
8
|
|
9
9
|
desc "Destroy module (source, header and test files)"
|
10
10
|
task :destroy, :module_path do |t, args|
|
11
|
-
@ceedling[:module_generator].create(
|
11
|
+
args[:module_path].split(/,/).each {|v| @ceedling[:module_generator].create(v, {:destroy => true}) }
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'ceedling/plugin'
|
2
|
+
require 'ceedling/constants'
|
3
|
+
|
4
|
+
class WarningsReport < Plugin
|
5
|
+
def setup
|
6
|
+
@stderr_redirect = nil
|
7
|
+
@log_paths = {}
|
8
|
+
end
|
9
|
+
|
10
|
+
def pre_compile_execute(arg_hash)
|
11
|
+
# at beginning of compile, override tool's stderr_redirect so we can parse $stderr + $stdout
|
12
|
+
set_stderr_redirect(arg_hash)
|
13
|
+
end
|
14
|
+
|
15
|
+
def post_compile_execute(arg_hash)
|
16
|
+
# after compilation, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
|
17
|
+
output = arg_hash[:shell_result][:output]
|
18
|
+
restore_stderr_redirect(arg_hash)
|
19
|
+
write_warning_log(arg_hash[:context], output)
|
20
|
+
end
|
21
|
+
|
22
|
+
def pre_link_execute(arg_hash)
|
23
|
+
# at beginning of link, override tool's stderr_redirect so we can parse $stderr + $stdout
|
24
|
+
set_stderr_redirect(arg_hash)
|
25
|
+
end
|
26
|
+
|
27
|
+
def post_link_execute(arg_hash)
|
28
|
+
# after linking, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
|
29
|
+
output = arg_hash[:shell_result][:output]
|
30
|
+
restore_stderr_redirect(arg_hash)
|
31
|
+
write_warning_log(arg_hash[:context], output)
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def set_stderr_redirect(hash)
|
37
|
+
@stderr_redirect = hash[:tool][:stderr_redirect]
|
38
|
+
hash[:tool][:stderr_redirect] = StdErrRedirect::AUTO
|
39
|
+
end
|
40
|
+
|
41
|
+
def restore_stderr_redirect(hash)
|
42
|
+
hash[:tool][:stderr_redirect] = @stderr_redirect
|
43
|
+
end
|
44
|
+
|
45
|
+
def write_warning_log(context, output)
|
46
|
+
# if $stderr/$stdout contain "warning", log it
|
47
|
+
if output =~ /warning/i
|
48
|
+
# generate a log path & file io write flags
|
49
|
+
logging = generate_log_path(context)
|
50
|
+
@ceedling[:file_wrapper].write(logging[:path], output + "\n", logging[:flags]) unless logging.nil?
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def generate_log_path(context)
|
55
|
+
# if path has already been generated, return it & 'append' file io flags (append to log)
|
56
|
+
return { path: @log_paths[context], flags: 'a' } unless @log_paths[context].nil?
|
57
|
+
|
58
|
+
# first time through, generate path & 'write' file io flags (create new log)
|
59
|
+
base_path = File.join(PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s)
|
60
|
+
file_path = File.join(base_path, 'warnings.log')
|
61
|
+
|
62
|
+
if @ceedling[:file_wrapper].exist?(base_path)
|
63
|
+
@log_paths[context] = file_path
|
64
|
+
return { path: file_path, flags: 'w' }
|
65
|
+
end
|
66
|
+
|
67
|
+
nil
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'ceedling/plugin'
|
2
|
+
require 'ceedling/constants'
|
3
|
+
|
4
|
+
class XmlTestsReport < Plugin
|
5
|
+
def setup
|
6
|
+
@results_list = {}
|
7
|
+
@test_counter = 0
|
8
|
+
end
|
9
|
+
|
10
|
+
def post_test_fixture_execute(arg_hash)
|
11
|
+
context = arg_hash[:context]
|
12
|
+
|
13
|
+
@results_list[context] = [] if @results_list[context].nil?
|
14
|
+
|
15
|
+
@results_list[context] << arg_hash[:result_file]
|
16
|
+
end
|
17
|
+
|
18
|
+
def post_build
|
19
|
+
@results_list.each_key do |context|
|
20
|
+
results = @ceedling[:plugin_reportinator].assemble_test_results(@results_list[context])
|
21
|
+
|
22
|
+
file_path = File.join(PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s, 'report.xml')
|
23
|
+
|
24
|
+
@ceedling[:file_wrapper].open(file_path, 'w') do |f|
|
25
|
+
@test_counter = 1
|
26
|
+
write_results(results, f)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def write_results(results, stream)
|
34
|
+
write_header(stream)
|
35
|
+
write_failures(results[:failures], stream)
|
36
|
+
write_tests(results[:successes], stream, 'SuccessfulTests')
|
37
|
+
write_tests(results[:ignores], stream, 'IgnoredTests')
|
38
|
+
write_statistics(results[:counts], stream)
|
39
|
+
write_footer(stream)
|
40
|
+
end
|
41
|
+
|
42
|
+
def write_header(stream)
|
43
|
+
stream.puts "<?xml version='1.0' encoding='utf-8' ?>"
|
44
|
+
stream.puts '<TestRun>'
|
45
|
+
end
|
46
|
+
|
47
|
+
def write_failures(results, stream)
|
48
|
+
if results.size.zero?
|
49
|
+
stream.puts "\t<FailedTests/>"
|
50
|
+
return
|
51
|
+
end
|
52
|
+
|
53
|
+
stream.puts "\t<FailedTests>"
|
54
|
+
|
55
|
+
results.each do |result|
|
56
|
+
result[:collection].each do |item|
|
57
|
+
filename = File.join(result[:source][:path], result[:source][:file])
|
58
|
+
|
59
|
+
stream.puts "\t\t<Test id=\"#{@test_counter}\">"
|
60
|
+
stream.puts "\t\t\t<Name>#{filename}::#{item[:test]}</Name>"
|
61
|
+
stream.puts "\t\t\t<FailureType>Assertion</FailureType>"
|
62
|
+
stream.puts "\t\t\t<Location>"
|
63
|
+
stream.puts "\t\t\t\t<File>#{filename}</File>"
|
64
|
+
stream.puts "\t\t\t\t<Line>#{item[:line]}</Line>"
|
65
|
+
stream.puts "\t\t\t</Location>"
|
66
|
+
stream.puts "\t\t\t<Message>#{item[:message]}</Message>"
|
67
|
+
stream.puts "\t\t</Test>"
|
68
|
+
@test_counter += 1
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
stream.puts "\t</FailedTests>"
|
73
|
+
end
|
74
|
+
|
75
|
+
def write_tests(results, stream, tag)
|
76
|
+
if results.size.zero?
|
77
|
+
stream.puts "\t<#{tag}/>"
|
78
|
+
return
|
79
|
+
end
|
80
|
+
|
81
|
+
stream.puts "\t<#{tag}>"
|
82
|
+
|
83
|
+
results.each do |result|
|
84
|
+
result[:collection].each do |item|
|
85
|
+
stream.puts "\t\t<Test id=\"#{@test_counter}\">"
|
86
|
+
stream.puts "\t\t\t<Name>#{File.join(result[:source][:path], result[:source][:file])}::#{item[:test]}</Name>"
|
87
|
+
stream.puts "\t\t</Test>"
|
88
|
+
@test_counter += 1
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
stream.puts "\t</#{tag}>"
|
93
|
+
end
|
94
|
+
|
95
|
+
def write_statistics(counts, stream)
|
96
|
+
stream.puts "\t<Statistics>"
|
97
|
+
stream.puts "\t\t<Tests>#{counts[:total]}</Tests>"
|
98
|
+
stream.puts "\t\t<Ignores>#{counts[:ignored]}</Ignores>"
|
99
|
+
stream.puts "\t\t<FailuresTotal>#{counts[:failed]}</FailuresTotal>"
|
100
|
+
stream.puts "\t\t<Errors>0</Errors>"
|
101
|
+
stream.puts "\t\t<Failures>#{counts[:failed]}</Failures>"
|
102
|
+
stream.puts "\t</Statistics>"
|
103
|
+
end
|
104
|
+
|
105
|
+
def write_footer(stream)
|
106
|
+
stream.puts '</TestRun>'
|
107
|
+
end
|
108
|
+
end
|
data/spec/spec_system_helper.rb
CHANGED
@@ -151,7 +151,7 @@ module CeedlingTestCases
|
|
151
151
|
def contains_documentation
|
152
152
|
@c.with_context do
|
153
153
|
Dir.chdir @proj_name do
|
154
|
-
expect(Dir["vendor/ceedling/docs/*.pdf"].length).to
|
154
|
+
expect(Dir["vendor/ceedling/docs/*.pdf"].length).to be >= 4
|
155
155
|
end
|
156
156
|
end
|
157
157
|
end
|
@@ -72,7 +72,7 @@ extern volatile CEXCEPTION_FRAME_T CExceptionFrames[];
|
|
72
72
|
{ \
|
73
73
|
jmp_buf *PrevFrame, NewFrame; \
|
74
74
|
unsigned int MY_ID = CEXCEPTION_GET_ID; \
|
75
|
-
PrevFrame = CExceptionFrames[
|
75
|
+
PrevFrame = CExceptionFrames[MY_ID].pFrame; \
|
76
76
|
CExceptionFrames[MY_ID].pFrame = (jmp_buf*)(&NewFrame); \
|
77
77
|
CExceptionFrames[MY_ID].Exception = CEXCEPTION_NONE; \
|
78
78
|
CEXCEPTION_HOOK_START_TRY; \
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Unity Project - A Test Framework for C
|
3
3
|
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
4
|
# [Released under MIT License. Please refer to license.txt for details]
|
5
|
-
# ==========================================
|
5
|
+
# ==========================================
|
6
6
|
|
7
7
|
# This script creates all the files with start code necessary for a new module.
|
8
8
|
# A simple module only requires a source file, header file, and test file.
|
@@ -32,20 +32,20 @@ HELP_TEXT = [ "\nGENERATE MODULE\n-------- ------",
|
|
32
32
|
|
33
33
|
#Built in patterns
|
34
34
|
PATTERNS = { 'src' => {'' => { :inc => [] } },
|
35
|
-
'dh' => {'Driver' => { :inc => ['%1$sHardware.h'] },
|
36
|
-
'Hardware' => { :inc => [] }
|
35
|
+
'dh' => {'Driver' => { :inc => ['%1$sHardware.h'] },
|
36
|
+
'Hardware' => { :inc => [] }
|
37
37
|
},
|
38
|
-
'dih' => {'Driver' => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] },
|
38
|
+
'dih' => {'Driver' => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] },
|
39
39
|
'Interrupt'=> { :inc => ['%1$sHardware.h'] },
|
40
|
-
'Hardware' => { :inc => [] }
|
40
|
+
'Hardware' => { :inc => [] }
|
41
41
|
},
|
42
|
-
'mch' => {'Model' => { :inc => [] },
|
42
|
+
'mch' => {'Model' => { :inc => [] },
|
43
43
|
'Conductor'=> { :inc => ['%1$sModel.h', '%1$sHardware.h'] },
|
44
|
-
'Hardware' => { :inc => [] }
|
44
|
+
'Hardware' => { :inc => [] }
|
45
45
|
},
|
46
|
-
'mvp' => {'Model' => { :inc => [] },
|
46
|
+
'mvp' => {'Model' => { :inc => [] },
|
47
47
|
'Presenter'=> { :inc => ['%1$sModel.h', '%1$sView.h'] },
|
48
|
-
'View' => { :inc => [] }
|
48
|
+
'View' => { :inc => [] }
|
49
49
|
}
|
50
50
|
}
|
51
51
|
|
@@ -63,7 +63,7 @@ void tearDown(void)
|
|
63
63
|
|
64
64
|
void test_%1$s_NeedToImplement(void)
|
65
65
|
{
|
66
|
-
|
66
|
+
TEST_IGNORE_MESSAGE("Need to Implement %1$s");
|
67
67
|
}
|
68
68
|
]
|
69
69
|
|
@@ -91,7 +91,7 @@ ARGV.each do |arg|
|
|
91
91
|
when /^(\w+)/
|
92
92
|
raise "ERROR: You can't have more than one Module name specified!" unless @module_name.nil?
|
93
93
|
@module_name = arg
|
94
|
-
when /^-(h|-help)/
|
94
|
+
when /^-(h|-help)/
|
95
95
|
puts HELP_TEXT
|
96
96
|
exit
|
97
97
|
else
|
@@ -126,7 +126,7 @@ end
|
|
126
126
|
@includes.merge!(@extra_inc) unless @extra_inc.nil?
|
127
127
|
|
128
128
|
#create triad definition
|
129
|
-
TRIAD = [ { :ext => '.c', :path => @path_src, :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] },
|
129
|
+
TRIAD = [ { :ext => '.c', :path => @path_src, :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] },
|
130
130
|
{ :ext => '.h', :path => @path_inc, :template => TEMPLATE_INC, :inc => :inc, :boilerplate => @boilerplates[:inc] },
|
131
131
|
{ :ext => '.c', :path => @path_tst+'Test', :template => TEMPLATE_TST, :inc => :tst, :boilerplate => @boilerplates[:tst] },
|
132
132
|
]
|
@@ -159,7 +159,7 @@ if @destroy
|
|
159
159
|
file = filespec[:path]
|
160
160
|
if File.exist?(file)
|
161
161
|
if @update_svn
|
162
|
-
`svn delete \"#{file}\" --force`
|
162
|
+
`svn delete \"#{file}\" --force`
|
163
163
|
puts "File #{file} deleted and removed from source control"
|
164
164
|
else
|
165
165
|
FileUtils.remove(file)
|
@@ -182,13 +182,13 @@ end
|
|
182
182
|
files.each_with_index do |file, i|
|
183
183
|
File.open(file[:path], 'w') do |f|
|
184
184
|
f.write(file[:boilerplate] % [file[:name]]) unless file[:boilerplate].nil?
|
185
|
-
f.write(file[:template] % [ file[:name],
|
186
|
-
file[:includes].map{|f| "#include \"#{f}\"\n"}.join,
|
185
|
+
f.write(file[:template] % [ file[:name],
|
186
|
+
file[:includes].map{|f| "#include \"#{f}\"\n"}.join,
|
187
187
|
file[:name].upcase ]
|
188
188
|
)
|
189
189
|
end
|
190
190
|
if (@update_svn)
|
191
|
-
`svn add \"#{file[:path]}\"`
|
191
|
+
`svn add \"#{file[:path]}\"`
|
192
192
|
if $?.exitstatus == 0
|
193
193
|
puts "File #{file[:path]} created and added to source control"
|
194
194
|
else
|