ceedling 0.13.0.rc1 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +32 -0
- data/README.md +8 -8
- data/assets/example_file.c +5 -0
- data/assets/example_file.h +6 -0
- data/assets/project_as_gem.yml +71 -0
- data/assets/{project.yml → project_with_guts.yml} +2 -0
- data/assets/rakefile_as_gem.rb +1 -0
- data/assets/{rakefile.rb → rakefile_with_guts.rb} +0 -0
- data/assets/test_example_file.c +13 -0
- data/bin/ceedling +55 -31
- data/ceedling-0.13.0.rc4.gem +0 -0
- data/ceedling.gemspec +13 -12
- data/ceedling.sublime-project +8 -0
- data/ceedling.sublime-workspace +365 -0
- data/examples/temp_sensor/project.yml +3 -4
- data/lib/ceedling.rb +13 -4
- data/lib/ceedling/version.rb +3 -3
- data/lib/project_file_loader.rb +1 -1
- data/lib/rakefile.rb +14 -1
- data/lib/target_loader.rb +38 -0
- data/plugins/bullseye/{template.erb → assets/template.erb} +0 -0
- data/plugins/bullseye/{defaults.yml → config/defaults.yml} +0 -0
- data/plugins/bullseye/{bullseye.rb → lib/bullseye.rb} +9 -10
- data/spec/spec_system_helper.rb +192 -0
- data/spec/system/deployment_spec.rb +116 -0
- data/tags +977 -0
- data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/c_exception/docs/license.txt +30 -0
- data/vendor/c_exception/docs/readme.txt +242 -0
- data/vendor/c_exception/makefile +24 -0
- data/vendor/c_exception/rakefile.rb +41 -0
- data/vendor/c_exception/test/CExceptionConfig.h +44 -0
- data/vendor/c_exception/test/TestException.c +328 -0
- data/vendor/c_exception/test/TestException_Runner.c +57 -0
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +94 -0
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -0
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +313 -0
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +23 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +139 -0
- 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 +217 -0
- data/vendor/c_exception/vendor/unity/docs/license.txt +31 -0
- data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.c +10 -0
- data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.h +12 -0
- data/vendor/c_exception/vendor/unity/examples/makefile +40 -0
- data/vendor/c_exception/vendor/unity/examples/rakefile.rb +32 -0
- data/vendor/c_exception/vendor/unity/examples/rakefile_helper.rb +256 -0
- data/vendor/c_exception/vendor/unity/examples/readme.txt +18 -0
- data/vendor/c_exception/vendor/unity/examples/src/ProductionCode.c +24 -0
- data/vendor/c_exception/vendor/unity/examples/src/ProductionCode.h +3 -0
- data/vendor/c_exception/vendor/unity/examples/src/ProductionCode2.c +9 -0
- data/vendor/c_exception/vendor/unity/examples/src/ProductionCode2.h +2 -0
- data/vendor/c_exception/vendor/unity/examples/test/TestProductionCode.c +62 -0
- data/vendor/c_exception/vendor/unity/examples/test/TestProductionCode2.c +31 -0
- data/vendor/c_exception/vendor/unity/examples/test/no_ruby/TestProductionCode2_Runner.c +46 -0
- data/vendor/c_exception/vendor/unity/examples/test/no_ruby/TestProductionCode_Runner.c +50 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/build/MakefileWorker.mk +331 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/build/filterGcov.sh +61 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +37 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +9 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +381 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +81 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +44 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +16 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +21 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/testunity_fixture.c +39 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +321 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +40 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +56 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
- data/vendor/c_exception/vendor/unity/makefile +35 -0
- data/vendor/c_exception/vendor/unity/rakefile.rb +59 -0
- data/vendor/c_exception/vendor/unity/rakefile_helper.rb +240 -0
- data/vendor/c_exception/vendor/unity/release/build.info +2 -0
- data/vendor/c_exception/vendor/unity/release/version.info +2 -0
- data/vendor/c_exception/vendor/unity/src/unity.c +979 -0
- data/vendor/c_exception/vendor/unity/src/unity.h +232 -0
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +424 -0
- data/vendor/c_exception/vendor/unity/targets/gcc.yml +43 -0
- data/vendor/c_exception/vendor/unity/targets/gcc_64.yml +44 -0
- data/vendor/c_exception/vendor/unity/targets/hitech_picc18.yml +101 -0
- data/vendor/c_exception/vendor/unity/targets/iar_arm_v4.yml +89 -0
- data/vendor/c_exception/vendor/unity/targets/iar_arm_v5.yml +79 -0
- data/vendor/c_exception/vendor/unity/targets/iar_arm_v5_3.yml +79 -0
- data/vendor/c_exception/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -0
- data/vendor/c_exception/vendor/unity/targets/iar_cortexm3_v5.yml +83 -0
- data/vendor/c_exception/vendor/unity/targets/iar_msp430.yml +94 -0
- data/vendor/c_exception/vendor/unity/targets/iar_sh2a_v6.yml +85 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +54 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +50 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +76 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +72 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +85 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +85 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +73 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +85 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +85 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +86 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +60 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +63 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +51 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +60 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +63 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +64 -0
- data/vendor/c_exception/vendor/unity/test/test_generate_test_runner.rb +94 -0
- data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -0
- data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +9 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +51 -0
- data/vendor/c_exception/vendor/unity/test/testparameterized.c +101 -0
- data/vendor/c_exception/vendor/unity/test/testunity.c +2024 -0
- data/vendor/cmock/docs/CMock Summary.odt +0 -0
- data/vendor/cmock/docs/CMock Summary.pdf +0 -0
- data/vendor/cmock/docs/CMock_Summary.md +356 -0
- data/vendor/cmock/docs/license.txt +31 -0
- data/vendor/cmock/examples/gcc.yml +43 -0
- data/vendor/cmock/examples/iar_v4.yml +91 -0
- data/vendor/cmock/examples/iar_v5.yml +80 -0
- data/vendor/cmock/examples/rakefile.rb +32 -0
- data/vendor/cmock/examples/rakefile_helper.rb +270 -0
- data/vendor/cmock/examples/src/AT91SAM7X256.h +2556 -0
- data/vendor/cmock/examples/src/AdcConductor.c +42 -0
- data/vendor/cmock/examples/src/AdcConductor.h +11 -0
- data/vendor/cmock/examples/src/AdcHardware.c +27 -0
- data/vendor/cmock/examples/src/AdcHardware.h +9 -0
- data/vendor/cmock/examples/src/AdcHardwareConfigurator.c +18 -0
- data/vendor/cmock/examples/src/AdcHardwareConfigurator.h +10 -0
- data/vendor/cmock/examples/src/AdcModel.c +33 -0
- data/vendor/cmock/examples/src/AdcModel.h +13 -0
- data/vendor/cmock/examples/src/AdcTemperatureSensor.c +51 -0
- data/vendor/cmock/examples/src/AdcTemperatureSensor.h +10 -0
- data/vendor/cmock/examples/src/Executor.c +25 -0
- data/vendor/cmock/examples/src/Executor.h +9 -0
- data/vendor/cmock/examples/src/IntrinsicsWrapper.c +18 -0
- data/vendor/cmock/examples/src/IntrinsicsWrapper.h +7 -0
- data/vendor/cmock/examples/src/Main.c +46 -0
- data/vendor/cmock/examples/src/Main.h +7 -0
- data/vendor/cmock/examples/src/Model.c +10 -0
- data/vendor/cmock/examples/src/Model.h +8 -0
- data/vendor/cmock/examples/src/ModelConfig.h +7 -0
- data/vendor/cmock/examples/src/TaskScheduler.c +72 -0
- data/vendor/cmock/examples/src/TaskScheduler.h +11 -0
- data/vendor/cmock/examples/src/TemperatureCalculator.c +27 -0
- data/vendor/cmock/examples/src/TemperatureCalculator.h +6 -0
- data/vendor/cmock/examples/src/TemperatureFilter.c +39 -0
- data/vendor/cmock/examples/src/TemperatureFilter.h +10 -0
- data/vendor/cmock/examples/src/TimerConductor.c +15 -0
- data/vendor/cmock/examples/src/TimerConductor.h +9 -0
- data/vendor/cmock/examples/src/TimerConfigurator.c +51 -0
- data/vendor/cmock/examples/src/TimerConfigurator.h +15 -0
- data/vendor/cmock/examples/src/TimerHardware.c +15 -0
- data/vendor/cmock/examples/src/TimerHardware.h +8 -0
- data/vendor/cmock/examples/src/TimerInterruptConfigurator.c +55 -0
- data/vendor/cmock/examples/src/TimerInterruptConfigurator.h +13 -0
- data/vendor/cmock/examples/src/TimerInterruptHandler.c +25 -0
- data/vendor/cmock/examples/src/TimerInterruptHandler.h +10 -0
- data/vendor/cmock/examples/src/TimerModel.c +9 -0
- data/vendor/cmock/examples/src/TimerModel.h +8 -0
- data/vendor/cmock/examples/src/Types.h +103 -0
- data/vendor/cmock/examples/src/UsartBaudRateRegisterCalculator.c +18 -0
- data/vendor/cmock/examples/src/UsartBaudRateRegisterCalculator.h +6 -0
- data/vendor/cmock/examples/src/UsartConductor.c +21 -0
- data/vendor/cmock/examples/src/UsartConductor.h +7 -0
- data/vendor/cmock/examples/src/UsartConfigurator.c +39 -0
- data/vendor/cmock/examples/src/UsartConfigurator.h +13 -0
- data/vendor/cmock/examples/src/UsartHardware.c +22 -0
- data/vendor/cmock/examples/src/UsartHardware.h +9 -0
- data/vendor/cmock/examples/src/UsartModel.c +34 -0
- data/vendor/cmock/examples/src/UsartModel.h +10 -0
- data/vendor/cmock/examples/src/UsartPutChar.c +16 -0
- data/vendor/cmock/examples/src/UsartPutChar.h +8 -0
- data/vendor/cmock/examples/src/UsartTransmitBufferStatus.c +7 -0
- data/vendor/cmock/examples/src/UsartTransmitBufferStatus.h +8 -0
- data/vendor/cmock/examples/test/TestAdcConductor.c +121 -0
- data/vendor/cmock/examples/test/TestAdcHardware.c +44 -0
- data/vendor/cmock/examples/test/TestAdcHardwareConfigurator.c +43 -0
- data/vendor/cmock/examples/test/TestAdcModel.c +33 -0
- data/vendor/cmock/examples/test/TestAdcTemperatureSensor.c +47 -0
- data/vendor/cmock/examples/test/TestExecutor.c +36 -0
- data/vendor/cmock/examples/test/TestMain.c +24 -0
- data/vendor/cmock/examples/test/TestModel.c +20 -0
- data/vendor/cmock/examples/test/TestTaskScheduler.c +104 -0
- data/vendor/cmock/examples/test/TestTemperatureCalculator.c +33 -0
- data/vendor/cmock/examples/test/TestTemperatureFilter.c +69 -0
- data/vendor/cmock/examples/test/TestTimerConductor.c +32 -0
- data/vendor/cmock/examples/test/TestTimerConfigurator.c +112 -0
- data/vendor/cmock/examples/test/TestTimerHardware.c +26 -0
- data/vendor/cmock/examples/test/TestTimerInterruptConfigurator.c +78 -0
- data/vendor/cmock/examples/test/TestTimerInterruptHandler.c +66 -0
- data/vendor/cmock/examples/test/TestTimerModel.c +18 -0
- data/vendor/cmock/examples/test/TestUsartBaudRateRegisterCalculator.c +21 -0
- data/vendor/cmock/examples/test/TestUsartConductor.c +40 -0
- data/vendor/cmock/examples/test/TestUsartConfigurator.c +77 -0
- data/vendor/cmock/examples/test/TestUsartHardware.c +37 -0
- data/vendor/cmock/examples/test/TestUsartModel.c +40 -0
- data/vendor/cmock/examples/test/TestUsartPutChar.c +43 -0
- data/vendor/cmock/examples/test/TestUsartTransmitBufferStatus.c +22 -0
- data/vendor/cmock/iar/iar_v4/Resource/SAM7_FLASH.mac +71 -0
- data/vendor/cmock/iar/iar_v4/Resource/SAM7_RAM.mac +94 -0
- data/vendor/cmock/iar/iar_v4/Resource/SAM7_SIM.mac +67 -0
- data/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -0
- data/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -0
- data/vendor/cmock/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -0
- data/vendor/cmock/iar/iar_v4/cmock_demo.dep +3691 -0
- data/vendor/cmock/iar/iar_v4/cmock_demo.ewd +1696 -0
- data/vendor/cmock/iar/iar_v4/cmock_demo.ewp +2581 -0
- data/vendor/cmock/iar/iar_v4/cmock_demo.eww +10 -0
- data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -0
- data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -0
- data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -0
- data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -0
- data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -0
- data/vendor/cmock/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -0
- data/vendor/cmock/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -0
- data/vendor/cmock/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -0
- data/vendor/cmock/iar/iar_v4/settings/cmock_demo.dbgdt +86 -0
- data/vendor/cmock/iar/iar_v4/settings/cmock_demo.dni +42 -0
- data/vendor/cmock/iar/iar_v4/settings/cmock_demo.wsdt +76 -0
- data/vendor/cmock/iar/iar_v4/srcIAR/Cstartup.s79 +266 -0
- data/vendor/cmock/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -0
- data/vendor/cmock/iar/iar_v5/Resource/SAM7_FLASH.mac +71 -0
- data/vendor/cmock/iar/iar_v5/Resource/SAM7_RAM.mac +94 -0
- data/vendor/cmock/iar/iar_v5/Resource/SAM7_SIM.mac +67 -0
- data/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -0
- data/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -0
- data/vendor/cmock/iar/iar_v5/cmock_demo.dep +4204 -0
- data/vendor/cmock/iar/iar_v5/cmock_demo.ewd +1906 -0
- data/vendor/cmock/iar/iar_v5/cmock_demo.ewp +2426 -0
- data/vendor/cmock/iar/iar_v5/cmock_demo.eww +26 -0
- data/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -0
- data/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -0
- data/vendor/cmock/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -0
- data/vendor/cmock/iar/iar_v5/incIAR/project.h +30 -0
- data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -0
- data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +5 -0
- data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dni +18 -0
- data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +74 -0
- data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo.dbgdt +85 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo.dni +44 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo.wsdt +73 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -0
- data/vendor/cmock/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -0
- data/vendor/cmock/iar/iar_v5/srcIAR/Cstartup.s +299 -0
- data/vendor/cmock/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -0
- data/vendor/cmock/rakefile.rb +111 -0
- data/vendor/cmock/rakefile_helper.rb +381 -0
- data/vendor/cmock/targets/gcc.yml +53 -0
- data/vendor/cmock/targets/iar_arm_v4.yml +108 -0
- data/vendor/cmock/targets/iar_arm_v5.yml +93 -0
- data/vendor/cmock/test/c/TestCMockC.c +280 -0
- data/vendor/cmock/test/c/TestCMockC.yml +12 -0
- data/vendor/cmock/test/c/TestCMockCDynamic.c +186 -0
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +12 -0
- data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +35 -0
- data/vendor/cmock/test/c/TestCMockC_Runner.c +37 -0
- data/vendor/cmock/test/spec/cmock_file_writer_spec.rb +25 -0
- data/vendor/cmock/test/spec/spec_helper.rb +12 -0
- data/vendor/cmock/test/system/systest_generator.rb +178 -0
- data/vendor/cmock/test/system/test_compilation/callingconv.h +11 -0
- data/vendor/cmock/test/system/test_compilation/config.yml +9 -0
- data/vendor/cmock/test/system/test_compilation/const.h +15 -0
- data/vendor/cmock/test/system/test_compilation/osek.h +275 -0
- data/vendor/cmock/test/system/test_compilation/parsing.h +47 -0
- data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +341 -0
- data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +382 -0
- data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +382 -0
- data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +123 -0
- data/vendor/cmock/test/system/test_interactions/const_primitives_handling.yml +87 -0
- data/vendor/cmock/test/system/test_interactions/enforce_strict_ordering.yml +247 -0
- data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +108 -0
- data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +173 -0
- data/vendor/cmock/test/system/test_interactions/expect_and_throw.yml +170 -0
- data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +208 -0
- data/vendor/cmock/test/system/test_interactions/function_pointer_handling.yml +82 -0
- data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +153 -0
- data/vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml +52 -0
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_1.yml +91 -0
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +59 -0
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +222 -0
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return.yml +277 -0
- data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +221 -0
- data/vendor/cmock/test/system/test_interactions/unity_64bit_support.yml +77 -0
- data/vendor/cmock/test/system/test_interactions/unity_ignores.yml +139 -0
- data/vendor/cmock/test/test_helper.rb +44 -0
- data/vendor/cmock/test/unit/cmock_config_test.rb +121 -0
- data/vendor/cmock/test/unit/cmock_config_test.yml +5 -0
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +30 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +413 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +114 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +190 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +94 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_test.rb +206 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +168 -0
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +291 -0
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +1247 -0
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +85 -0
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +223 -0
- data/vendor/cmock/vendor/behaviors/Manifest.txt +9 -0
- data/vendor/cmock/vendor/behaviors/Rakefile +19 -0
- data/vendor/cmock/vendor/behaviors/lib/behaviors.rb +76 -0
- data/vendor/cmock/vendor/behaviors/lib/behaviors/reporttask.rb +158 -0
- data/vendor/cmock/vendor/behaviors/test/behaviors_tasks_test.rb +73 -0
- data/vendor/cmock/vendor/behaviors/test/behaviors_test.rb +50 -0
- data/vendor/cmock/vendor/behaviors/test/tasks_test/Rakefile +19 -0
- data/vendor/cmock/vendor/behaviors/test/tasks_test/lib/user.rb +2 -0
- data/vendor/cmock/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -0
- data/vendor/cmock/vendor/hardmock/CHANGES +78 -0
- data/vendor/cmock/vendor/hardmock/LICENSE +7 -0
- data/vendor/cmock/vendor/hardmock/README +70 -0
- data/vendor/cmock/vendor/hardmock/Rakefile +8 -0
- data/vendor/cmock/vendor/hardmock/config/environment.rb +12 -0
- data/vendor/cmock/vendor/hardmock/lib/assert_error.rb +23 -0
- data/vendor/cmock/vendor/hardmock/lib/extend_test_unit.rb +14 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock.rb +86 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/errors.rb +22 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/expectation.rb +229 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/expectation_builder.rb +9 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/expector.rb +26 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/method_cleanout.rb +33 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/mock.rb +180 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/mock_control.rb +53 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/stubbing.rb +210 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/trapper.rb +31 -0
- data/vendor/cmock/vendor/hardmock/lib/hardmock/utils.rb +9 -0
- data/vendor/cmock/vendor/hardmock/lib/test_unit_before_after.rb +169 -0
- data/vendor/cmock/vendor/hardmock/rake_tasks/rdoc.rake +19 -0
- data/vendor/cmock/vendor/hardmock/rake_tasks/rdoc_options.rb +4 -0
- data/vendor/cmock/vendor/hardmock/rake_tasks/test.rake +22 -0
- data/vendor/cmock/vendor/hardmock/test/functional/assert_error_test.rb +52 -0
- data/vendor/cmock/vendor/hardmock/test/functional/auto_verify_test.rb +178 -0
- data/vendor/cmock/vendor/hardmock/test/functional/direct_mock_usage_test.rb +396 -0
- data/vendor/cmock/vendor/hardmock/test/functional/hardmock_test.rb +434 -0
- data/vendor/cmock/vendor/hardmock/test/functional/stubbing_test.rb +479 -0
- data/vendor/cmock/vendor/hardmock/test/test_helper.rb +43 -0
- data/vendor/cmock/vendor/hardmock/test/unit/expectation_builder_test.rb +19 -0
- data/vendor/cmock/vendor/hardmock/test/unit/expectation_test.rb +372 -0
- data/vendor/cmock/vendor/hardmock/test/unit/expector_test.rb +57 -0
- data/vendor/cmock/vendor/hardmock/test/unit/method_cleanout_test.rb +36 -0
- data/vendor/cmock/vendor/hardmock/test/unit/mock_control_test.rb +175 -0
- data/vendor/cmock/vendor/hardmock/test/unit/mock_test.rb +279 -0
- data/vendor/cmock/vendor/hardmock/test/unit/test_unit_before_after_test.rb +452 -0
- data/vendor/cmock/vendor/hardmock/test/unit/trapper_test.rb +62 -0
- data/vendor/cmock/vendor/hardmock/test/unit/verify_error_test.rb +40 -0
- data/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/unity/auto/unity_test_summary.rb +2 -2
- 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 +216 -0
- data/vendor/unity/docs/license.txt +31 -0
- data/vendor/unity/examples/helper/UnityHelper.c +10 -0
- data/vendor/unity/examples/helper/UnityHelper.h +12 -0
- data/vendor/unity/examples/makefile +40 -0
- data/vendor/unity/examples/rakefile.rb +32 -0
- data/vendor/unity/examples/rakefile_helper.rb +256 -0
- data/vendor/unity/examples/readme.txt +18 -0
- data/vendor/unity/examples/src/ProductionCode.c +24 -0
- data/vendor/unity/examples/src/ProductionCode.h +3 -0
- data/vendor/unity/examples/src/ProductionCode2.c +9 -0
- data/vendor/unity/examples/src/ProductionCode2.h +2 -0
- data/vendor/unity/examples/test/TestProductionCode.c +62 -0
- data/vendor/unity/examples/test/TestProductionCode2.c +31 -0
- data/vendor/unity/examples/test/no_ruby/TestProductionCode2_Runner.c +46 -0
- data/vendor/unity/examples/test/no_ruby/TestProductionCode_Runner.c +50 -0
- data/vendor/unity/extras/fixture/build/MakefileWorker.mk +331 -0
- data/vendor/unity/extras/fixture/build/filterGcov.sh +61 -0
- data/vendor/unity/extras/fixture/rakefile.rb +37 -0
- data/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
- data/vendor/unity/extras/fixture/readme.txt +9 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +381 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.h +81 -0
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +44 -0
- data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +16 -0
- data/vendor/unity/extras/fixture/test/main/AllTests.c +21 -0
- data/vendor/unity/extras/fixture/test/testunity_fixture.c +39 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +321 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +40 -0
- data/vendor/unity/extras/fixture/test/unity_output_Spy.c +56 -0
- data/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
- data/vendor/unity/makefile +35 -0
- data/vendor/unity/rakefile.rb +59 -0
- data/vendor/unity/rakefile_helper.rb +240 -0
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +1 -1
- data/vendor/unity/src/unity_internals.h +5 -5
- data/vendor/unity/targets/gcc_32.yml +44 -0
- data/vendor/unity/targets/hitech_picc18.yml +101 -0
- data/vendor/unity/targets/iar_arm_v4.yml +89 -0
- data/vendor/unity/targets/iar_arm_v5.yml +79 -0
- data/vendor/unity/targets/iar_arm_v5_3.yml +79 -0
- data/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -0
- data/vendor/unity/targets/iar_cortexm3_v5.yml +83 -0
- data/vendor/unity/targets/iar_msp430.yml +94 -0
- data/vendor/unity/targets/iar_sh2a_v6.yml +85 -0
- data/vendor/unity/test/expectdata/testsample_cmd.c +54 -0
- data/vendor/unity/test/expectdata/testsample_def.c +50 -0
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +76 -0
- data/vendor/unity/test/expectdata/testsample_mock_def.c +72 -0
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +85 -0
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +85 -0
- data/vendor/unity/test/expectdata/testsample_mock_param.c +73 -0
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +85 -0
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +85 -0
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +86 -0
- data/vendor/unity/test/expectdata/testsample_new1.c +60 -0
- data/vendor/unity/test/expectdata/testsample_new2.c +63 -0
- data/vendor/unity/test/expectdata/testsample_param.c +51 -0
- data/vendor/unity/test/expectdata/testsample_run1.c +60 -0
- data/vendor/unity/test/expectdata/testsample_run2.c +63 -0
- data/vendor/unity/test/expectdata/testsample_yaml.c +64 -0
- data/vendor/unity/test/test_generate_test_runner.rb +94 -0
- data/vendor/unity/test/testdata/mocksample.c +51 -0
- data/vendor/unity/test/testdata/sample.yml +9 -0
- data/vendor/unity/test/testdata/testsample.c +51 -0
- data/vendor/unity/test/testparameterized.c +101 -0
- data/vendor/unity/test/testunity.c +2559 -0
- metadata +464 -53
- data/.gitignore +0 -6
- data/.gitmodules +0 -9
- data/.rspec +0 -1
@@ -0,0 +1,12 @@
|
|
1
|
+
---
|
2
|
+
:files:
|
3
|
+
- 'src/cmock.c'
|
4
|
+
- 'test/c/TestCMockCDynamic.c'
|
5
|
+
- 'test/c/TestCMockCDynamic_Runner.c'
|
6
|
+
- 'vendor/unity/src/unity.c'
|
7
|
+
:options:
|
8
|
+
- 'TEST'
|
9
|
+
- 'CMOCK_MEM_DYNAMIC'
|
10
|
+
- 'CMOCK_MEM_SIZE=64'
|
11
|
+
- 'CMOCK_MEM_ALIGN=3'
|
12
|
+
- 'CMOCK_MEM_INDEX_TYPE=short'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
CMock Project - Automatic Mock Generation for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
#include "unity.h"
|
8
|
+
#include <setjmp.h>
|
9
|
+
#include <stdio.h>
|
10
|
+
|
11
|
+
extern void setUp(void);
|
12
|
+
extern void tearDown(void);
|
13
|
+
|
14
|
+
extern void test_MemNewWillReturnNullIfGivenIllegalSizes(void);
|
15
|
+
extern void test_MemNewWillNowSupportSizesGreaterThanTheDefinesCMockSize(void);
|
16
|
+
extern void test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation(void);
|
17
|
+
extern void test_MemNextWillReturnNullIfGivenABadRoot(void);
|
18
|
+
extern void test_ThatWeCanClaimAndChainAFewElementsTogether(void);
|
19
|
+
extern void test_ThatWeCanAskForAllSortsOfSizes(void);
|
20
|
+
|
21
|
+
int main(void)
|
22
|
+
{
|
23
|
+
Unity.TestFile = "TestCMockDynamic.c";
|
24
|
+
UnityBegin();
|
25
|
+
|
26
|
+
RUN_TEST(test_MemNewWillReturnNullIfGivenIllegalSizes, 26);
|
27
|
+
RUN_TEST(test_MemNewWillNowSupportSizesGreaterThanTheDefinesCMockSize, 35);
|
28
|
+
RUN_TEST(test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation, 45);
|
29
|
+
RUN_TEST(test_MemNextWillReturnNullIfGivenABadRoot, 59);
|
30
|
+
RUN_TEST(test_ThatWeCanClaimAndChainAFewElementsTogether, 70);
|
31
|
+
RUN_TEST(test_ThatWeCanAskForAllSortsOfSizes, 152);
|
32
|
+
|
33
|
+
UnityEnd();
|
34
|
+
return 0;
|
35
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
CMock Project - Automatic Mock Generation for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
#include "unity.h"
|
8
|
+
#include <setjmp.h>
|
9
|
+
#include <stdio.h>
|
10
|
+
|
11
|
+
extern void setUp(void);
|
12
|
+
extern void tearDown(void);
|
13
|
+
|
14
|
+
extern void test_MemNewWillReturnNullIfGivenIllegalSizes(void);
|
15
|
+
extern void test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation(void);
|
16
|
+
extern void test_MemNextWillReturnNullIfGivenABadRoot(void);
|
17
|
+
extern void test_ThatWeCanClaimAndChainAFewElementsTogether(void);
|
18
|
+
extern void test_ThatCMockStopsReturningMoreDataWhenItRunsOutOfMemory(void);
|
19
|
+
extern void test_ThatCMockStopsReturningMoreDataWhenAskForMoreThanItHasLeftEvenIfNotAtExactEnd(void);
|
20
|
+
extern void test_ThatWeCanAskForAllSortsOfSizes(void);
|
21
|
+
|
22
|
+
int main(void)
|
23
|
+
{
|
24
|
+
Unity.TestFile = "TestCMock.c";
|
25
|
+
UnityBegin();
|
26
|
+
|
27
|
+
RUN_TEST(test_MemNewWillReturnNullIfGivenIllegalSizes, 21);
|
28
|
+
RUN_TEST(test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation, 32);
|
29
|
+
RUN_TEST(test_MemNextWillReturnNullIfGivenABadRoot, 46);
|
30
|
+
RUN_TEST(test_ThatWeCanClaimAndChainAFewElementsTogether, 57);
|
31
|
+
RUN_TEST(test_ThatCMockStopsReturningMoreDataWhenItRunsOutOfMemory, 139);
|
32
|
+
RUN_TEST(test_ThatCMockStopsReturningMoreDataWhenAskForMoreThanItHasLeftEvenIfNotAtExactEnd, 185);
|
33
|
+
RUN_TEST(test_ThatWeCanAskForAllSortsOfSizes, 233);
|
34
|
+
|
35
|
+
UnityEnd();
|
36
|
+
return 0;
|
37
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
here = File.expand_path(File.dirname(__FILE__))
|
2
|
+
require "#{here}/spec_helper" #add this to execute tests from the spec directory
|
3
|
+
require 'cmock_file_writer'
|
4
|
+
|
5
|
+
describe CMockFileWriter do
|
6
|
+
before do
|
7
|
+
@cmConfig = Object.new
|
8
|
+
#create instance of class under test
|
9
|
+
@subject = CMockFileWriter.new(@cmConfig)
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'initialize' do
|
13
|
+
it "have set up internal accessors correctly on init" do
|
14
|
+
result = @subject.config
|
15
|
+
result.should == @cmConfig
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'create_file' do
|
20
|
+
it "complain if a block was not specified when calling create" do
|
21
|
+
expect {@subject.create_file("text.txt")}.should raise_error
|
22
|
+
# should.be_false
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
proj_root = File.expand_path(File.dirname(__FILE__) + '/../..')
|
4
|
+
# require proj_root + '/config/environment'
|
5
|
+
$LOAD_PATH << proj_root + '/lib'
|
6
|
+
|
7
|
+
require 'rspec'
|
8
|
+
require 'rr'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.mock_with :rr
|
12
|
+
end
|
@@ -0,0 +1,178 @@
|
|
1
|
+
# ==========================================
|
2
|
+
# CMock Project - Automatic Mock Generation for C
|
3
|
+
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
# [Released under MIT License. Please refer to license.txt for details]
|
5
|
+
# ==========================================
|
6
|
+
|
7
|
+
require 'yaml'
|
8
|
+
|
9
|
+
SYS_TEST_GEN_ROOT = File.expand_path( File.dirname( __FILE__ ) ) + '/'
|
10
|
+
GENERATED_PATH = SYS_TEST_GEN_ROOT + 'generated/'
|
11
|
+
BUILD_PATH = SYS_TEST_GEN_ROOT + 'build/'
|
12
|
+
CASES_PATH = SYS_TEST_GEN_ROOT + 'cases/'
|
13
|
+
|
14
|
+
TYPES_H = 'types.h'
|
15
|
+
UNITY_H = 'unity.h'
|
16
|
+
CMOCK_H = 'cmock.h'
|
17
|
+
UNITY_HELPER_H = 'unity_helper.h'
|
18
|
+
UNITY_HELPER_C = 'unity_helper.c'
|
19
|
+
MOCKABLE_H = 'mockable.h'
|
20
|
+
|
21
|
+
YAML_EXTENSION = '.yml'
|
22
|
+
TEST_PREFIX = 'test_'
|
23
|
+
MOCK_PREFIX = 'mock_'
|
24
|
+
H_EXTENSION = '.h'
|
25
|
+
C_EXTENSION = '.c'
|
26
|
+
|
27
|
+
|
28
|
+
class SystemTestGenerator
|
29
|
+
|
30
|
+
def generate_files(test_cases)
|
31
|
+
test_cases.each do |filename|
|
32
|
+
yaml_hash = YAML.load_file(filename)
|
33
|
+
|
34
|
+
name = File.basename(filename, YAML_EXTENSION)
|
35
|
+
namix = "#{name}_"
|
36
|
+
|
37
|
+
generate_cmock_config(yaml_hash, namix)
|
38
|
+
generate_code(yaml_hash, namix, name)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def generate_cmock_config(yaml_hash, namix)
|
45
|
+
cmock_yaml = yaml_hash.clone
|
46
|
+
cmock_yaml.delete(:systest)
|
47
|
+
cmock = cmock_yaml[:cmock]
|
48
|
+
|
49
|
+
cmock[:mock_path] = GENERATED_PATH
|
50
|
+
cmock[:includes] = (cmock[:includes] || []) + [namix + TYPES_H]
|
51
|
+
cmock[:mock_prefix] = MOCK_PREFIX
|
52
|
+
if not yaml_hash[:systest][:unity_helper].nil?
|
53
|
+
cmock[:includes] << namix + UNITY_HELPER_H
|
54
|
+
cmock[:unity_helper_path] = GENERATED_PATH + namix + UNITY_HELPER_H
|
55
|
+
end
|
56
|
+
|
57
|
+
File.open(GENERATED_PATH + namix + 'cmock' + YAML_EXTENSION, 'w') do |out|
|
58
|
+
YAML.dump(cmock_yaml, out)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def generate_code(yaml_hash, namix, name)
|
63
|
+
generate_types_file(yaml_hash, namix)
|
64
|
+
generate_mockable_file(yaml_hash, namix)
|
65
|
+
generate_unity_helper_files(yaml_hash, namix)
|
66
|
+
|
67
|
+
generate_test_file(yaml_hash, namix, name)
|
68
|
+
generate_source_file(yaml_hash, namix, name)
|
69
|
+
end
|
70
|
+
|
71
|
+
def generate_types_file(yaml_hash, namix)
|
72
|
+
types = yaml_hash[:systest][:types]
|
73
|
+
return if types.nil?
|
74
|
+
|
75
|
+
write_header_file(GENERATED_PATH + namix + TYPES_H, namix.upcase + 'TYPES_H') do |out|
|
76
|
+
out.puts(types)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def generate_mockable_file(yaml_hash, namix)
|
81
|
+
mockable = yaml_hash[:systest][:mockable]
|
82
|
+
return if mockable.nil?
|
83
|
+
|
84
|
+
write_header_file(GENERATED_PATH + namix + MOCKABLE_H, namix.upcase + 'MOCKABLE_H', [namix + TYPES_H]) do |out|
|
85
|
+
out.puts(mockable)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def generate_unity_helper_files(yaml_hash, namix)
|
90
|
+
unity_helper = yaml_hash[:systest][:unity_helper]
|
91
|
+
return if unity_helper.nil?
|
92
|
+
|
93
|
+
write_header_file(GENERATED_PATH + namix + UNITY_HELPER_H, namix.upcase + 'UNITY_HELPER_H', [namix + TYPES_H]) do |out|
|
94
|
+
out.puts(unity_helper[:header])
|
95
|
+
end
|
96
|
+
|
97
|
+
write_source_file(GENERATED_PATH + namix + UNITY_HELPER_C, ["unity.h", namix + UNITY_HELPER_H]) do |out|
|
98
|
+
out.puts(unity_helper[:code])
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def generate_test_file(yaml_hash, namix, name)
|
103
|
+
tests = yaml_hash[:systest][:tests]
|
104
|
+
return if tests.nil?
|
105
|
+
|
106
|
+
includes = [UNITY_H, CMOCK_H]
|
107
|
+
includes << (namix + UNITY_HELPER_H) if not yaml_hash[:systest][:unity_helper].nil?
|
108
|
+
includes << [MOCK_PREFIX + namix + MOCKABLE_H]
|
109
|
+
includes << [name + H_EXTENSION]
|
110
|
+
|
111
|
+
write_source_file(GENERATED_PATH + TEST_PREFIX + name + C_EXTENSION, includes.flatten) do |out|
|
112
|
+
out.puts(tests[:common])
|
113
|
+
out.puts('')
|
114
|
+
|
115
|
+
tests[:units].each_with_index do |test, index|
|
116
|
+
out.puts('// should ' + test[:should])
|
117
|
+
out.puts(test[:code].gsub!(/test\(\)/, "void test#{index+1}(void)"))
|
118
|
+
out.puts('')
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def generate_source_file(yaml_hash, namix, name)
|
124
|
+
source = yaml_hash[:systest][:source]
|
125
|
+
return if source.nil?
|
126
|
+
|
127
|
+
header_file = name + H_EXTENSION
|
128
|
+
|
129
|
+
includes = yaml_hash[:systest][:types].nil? ? [] : [(namix + TYPES_H)]
|
130
|
+
|
131
|
+
write_header_file(GENERATED_PATH + header_file, name.upcase, includes) do |out|
|
132
|
+
out.puts(source[:header])
|
133
|
+
end
|
134
|
+
|
135
|
+
includes = []
|
136
|
+
includes << (namix + TYPES_H) if not yaml_hash[:systest][:types].nil?
|
137
|
+
includes << (namix + MOCKABLE_H) if not yaml_hash[:systest][:mockable].nil?
|
138
|
+
includes << header_file
|
139
|
+
|
140
|
+
write_source_file(GENERATED_PATH + name + C_EXTENSION, includes.flatten) do |out|
|
141
|
+
out.puts(source[:code])
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
def write_header_file(filename, upcase_name, include_list=[])
|
146
|
+
File.open(filename, 'w') do |out|
|
147
|
+
out.puts("#ifndef _#{upcase_name}")
|
148
|
+
out.puts("#define _#{upcase_name}")
|
149
|
+
out.puts('')
|
150
|
+
include_list.each do |include|
|
151
|
+
out.puts("#include \"#{include}\"")
|
152
|
+
end
|
153
|
+
out.puts('')
|
154
|
+
yield(out)
|
155
|
+
out.puts('')
|
156
|
+
out.puts("#endif // _#{upcase_name}")
|
157
|
+
out.puts('')
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
def write_source_file(filename, include_list=[])
|
162
|
+
File.open(filename, 'w') do |out|
|
163
|
+
include_list.each do |include|
|
164
|
+
out.puts("#include \"#{include}\"")
|
165
|
+
end
|
166
|
+
out.puts('')
|
167
|
+
yield(out)
|
168
|
+
out.puts('')
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
end
|
173
|
+
|
174
|
+
|
175
|
+
if ($0 == __FILE__)
|
176
|
+
SystemTestGenerator.new.generate_files(Dir[CASES_PATH + "*#{YAML_EXTENSION}"])
|
177
|
+
end
|
178
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
CMock Project - Automatic Mock Generation for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
#ifndef __stdcall
|
8
|
+
#define __stdcall
|
9
|
+
#endif
|
10
|
+
|
11
|
+
int __stdcall this_uses_calling_conventions(int b);
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
CMock Project - Automatic Mock Generation for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
struct _DUMMY_T { unsigned int a; float b; };
|
8
|
+
|
9
|
+
void const_variants1( const char* a, int const, unsigned short const * c );
|
10
|
+
|
11
|
+
void const_variants2(
|
12
|
+
struct _DUMMY_T const * const param1,
|
13
|
+
const unsigned long int const * const param2,
|
14
|
+
const struct _DUMMY_T const * param3 );
|
15
|
+
|
@@ -0,0 +1,275 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
CMock Project - Automatic Mock Generation for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
typedef unsigned char OSServiceIdType;
|
8
|
+
typedef void (*OSEKOS_VOIDFUNCPTR)(void);
|
9
|
+
|
10
|
+
typedef unsigned char StatusType;
|
11
|
+
typedef unsigned char OSEK_U8;
|
12
|
+
typedef unsigned short OSEK_U16;
|
13
|
+
typedef unsigned long OSEK_U32;
|
14
|
+
|
15
|
+
void OSEKOSDisableAll(void);
|
16
|
+
void OSEKOSEnableAll(void);
|
17
|
+
|
18
|
+
typedef unsigned long * OSEKOSSaveType;
|
19
|
+
typedef void OSEK_TASK;
|
20
|
+
typedef OSEK_U8 OSEKOSPrioType;
|
21
|
+
|
22
|
+
enum {
|
23
|
+
Task_DbgCAN
|
24
|
+
,
|
25
|
+
Task_ALS
|
26
|
+
,
|
27
|
+
CalibrateMagTask
|
28
|
+
,
|
29
|
+
Task_IAQ
|
30
|
+
,
|
31
|
+
SmartBeam
|
32
|
+
,
|
33
|
+
Task_QbertTestImage
|
34
|
+
,
|
35
|
+
Task_TestQbertMem
|
36
|
+
,
|
37
|
+
Task_Cyclic1000
|
38
|
+
,
|
39
|
+
ProcessMagForCompass
|
40
|
+
,
|
41
|
+
ReadMag
|
42
|
+
,
|
43
|
+
Task_Cyclic10
|
44
|
+
,
|
45
|
+
Task_Wdm
|
46
|
+
,
|
47
|
+
BackgroundTask
|
48
|
+
,
|
49
|
+
Task_Cyclic20
|
50
|
+
,
|
51
|
+
Task_Cyclic2
|
52
|
+
};
|
53
|
+
|
54
|
+
OSEK_TASK OSEKOS_T_Task_DbgCAN(void);
|
55
|
+
OSEK_TASK OSEKOS_T_Task_ALS(void);
|
56
|
+
OSEK_TASK OSEKOS_T_CalibrateMagTask(void);
|
57
|
+
OSEK_TASK OSEKOS_T_Task_IAQ(void);
|
58
|
+
OSEK_TASK OSEKOS_T_SmartBeam(void);
|
59
|
+
OSEK_TASK OSEKOS_T_Task_QbertTestImage(void);
|
60
|
+
OSEK_TASK OSEKOS_T_Task_TestQbertMem(void);
|
61
|
+
OSEK_TASK OSEKOS_T_Task_Cyclic1000(void);
|
62
|
+
OSEK_TASK OSEKOS_T_ProcessMagForCompass(void);
|
63
|
+
OSEK_TASK OSEKOS_T_ReadMag(void);
|
64
|
+
OSEK_TASK OSEKOS_T_Task_Cyclic10(void);
|
65
|
+
OSEK_TASK OSEKOS_T_Task_Wdm(void);
|
66
|
+
OSEK_TASK OSEKOS_T_BackgroundTask(void);
|
67
|
+
OSEK_TASK OSEKOS_T_Task_Cyclic20(void);
|
68
|
+
OSEK_TASK OSEKOS_T_Task_Cyclic2(void);
|
69
|
+
OSEK_TASK OSEKOS_Twrap_Task_DbgCAN(void);
|
70
|
+
OSEK_TASK OSEKOS_Twrap_Task_ALS(void);
|
71
|
+
OSEK_TASK OSEKOS_Twrap_CalibrateMagTask(void);
|
72
|
+
OSEK_TASK OSEKOS_Twrap_Task_IAQ(void);
|
73
|
+
OSEK_TASK OSEKOS_Twrap_SmartBeam(void);
|
74
|
+
OSEK_TASK OSEKOS_Twrap_Task_QbertTestImage(void);
|
75
|
+
OSEK_TASK OSEKOS_Twrap_Task_TestQbertMem(void);
|
76
|
+
OSEK_TASK OSEKOS_Twrap_Task_Cyclic1000(void);
|
77
|
+
OSEK_TASK OSEKOS_Twrap_ProcessMagForCompass(void);
|
78
|
+
OSEK_TASK OSEKOS_Twrap_ReadMag(void);
|
79
|
+
OSEK_TASK OSEKOS_Twrap_Task_Cyclic10(void);
|
80
|
+
OSEK_TASK OSEKOS_Twrap_Task_Wdm(void);
|
81
|
+
OSEK_TASK OSEKOS_Twrap_BackgroundTask(void);
|
82
|
+
OSEK_TASK OSEKOS_Twrap_Task_Cyclic20(void);
|
83
|
+
OSEK_TASK OSEKOS_Twrap_Task_Cyclic2(void);
|
84
|
+
|
85
|
+
typedef OSEK_U8 TaskType;
|
86
|
+
typedef OSEK_U8 TaskStateType;
|
87
|
+
typedef OSEK_U16 EventMaskType;
|
88
|
+
typedef OSEK_U8 ResourceType;
|
89
|
+
|
90
|
+
void OSEKOSEnableSystemTimers(void);
|
91
|
+
|
92
|
+
typedef OSEK_U8 CounterType;
|
93
|
+
typedef OSEK_U32 TickType;
|
94
|
+
typedef OSEK_U8 AlarmType;
|
95
|
+
|
96
|
+
void OSEKOS_ISR_CanTxInterrupt(void);
|
97
|
+
void OSEKOS_ISR_CanRxInterrupt(void);
|
98
|
+
void OSEKOS_ISR_CanErrInterrupt(void);
|
99
|
+
void OSEKOS_ISR_SCIRxInterrupt(void);
|
100
|
+
void OSEKOS_ISR_SCITxInterrupt(void);
|
101
|
+
void OSEKOS_ISR_UP_DMA_Interrupt_0(void);
|
102
|
+
void OSEKOS_ISR_UP_DMA_Interrupt_1(void);
|
103
|
+
void OSEKOS_ISR_UP_DMA_Interrupt_2(void);
|
104
|
+
void OSEKOS_ISR_UP_DMA_Interrupt_3(void);
|
105
|
+
void OSEKOS_ISR_CompFreqHandler(void);
|
106
|
+
void OSEKOS_ISR_AmbientReturnInt(void);
|
107
|
+
void OSEKOS_ISR_GlareReturnInt(void);
|
108
|
+
void OSEKOS_ISR_ALSTimeoutInt(void);
|
109
|
+
void OSEKOS_ISR_LINTimerInt(void);
|
110
|
+
void OSEKOS_ISR_LINDelayInt(void);
|
111
|
+
void OSEKOS_ISR_TimerMExpire(void);
|
112
|
+
void OSEKOS_ISR_LINRxTx_SCI1(void);
|
113
|
+
void OSEKOS_ISR_CanRxInterrupt_1(void);
|
114
|
+
void OSEKOS_ISR_LINError_SCI1(void);
|
115
|
+
void OSEKOS_ISR_SysCounter(void);
|
116
|
+
|
117
|
+
|
118
|
+
// defined multiple times (slightly different forms) These should be ignored because they are externed
|
119
|
+
extern void OSEKOS_ISR_CanTxInterrupt( void );
|
120
|
+
extern void OSEKOS_ISR_CanRxInterrupt( void );
|
121
|
+
|
122
|
+
|
123
|
+
unsigned long OSEKOSrtcGetSeconds ( void );
|
124
|
+
void OSEKOSrtcIncrement ( unsigned long nsec );
|
125
|
+
|
126
|
+
enum
|
127
|
+
{
|
128
|
+
E_OS_ACCESS = 1,
|
129
|
+
E_OS_CALLEVEL = 2,
|
130
|
+
E_OS_ID = 3,
|
131
|
+
E_OS_LIMIT = 4,
|
132
|
+
E_OS_NOFUNC = 5,
|
133
|
+
E_OS_RESOURCE = 6,
|
134
|
+
E_OS_STATE = 7,
|
135
|
+
E_OS_VALUE = 8,
|
136
|
+
E_OS_SYS_StackOverflow = 20,
|
137
|
+
E_OS_SYS_StackUnderflow = 21,
|
138
|
+
E_OS_SYS_INIT = 22,
|
139
|
+
E_OS_SYS_CONFIG = 23,
|
140
|
+
E_OS_SYS_CODE = 24,
|
141
|
+
E_OS_SYS_TOOL = 25,
|
142
|
+
E_OS_SYS_TimerRange = 26
|
143
|
+
};
|
144
|
+
|
145
|
+
enum
|
146
|
+
{
|
147
|
+
SUSPENDED = 0x00,
|
148
|
+
READY = 0x01,
|
149
|
+
RUNNING = 0x02,
|
150
|
+
WAITING = 0x03,
|
151
|
+
INTSTART = 0x08,
|
152
|
+
SETSTART = 0x10,
|
153
|
+
NPRTASK = 0x20,
|
154
|
+
USEFP = 0x40
|
155
|
+
};
|
156
|
+
|
157
|
+
typedef struct
|
158
|
+
{
|
159
|
+
TickType maxallowedvalue;
|
160
|
+
TickType ticksperbase;
|
161
|
+
} AlarmBaseType;
|
162
|
+
|
163
|
+
typedef TaskType *TaskRefType;
|
164
|
+
typedef TaskStateType *TaskStateRefType;
|
165
|
+
typedef EventMaskType *EventMaskRefType;
|
166
|
+
typedef TickType *TickRefType;
|
167
|
+
typedef AlarmBaseType *AlarmBaseRefType;
|
168
|
+
typedef OSEK_U8 AppModeType;
|
169
|
+
typedef OSEK_U8 OSEKOSTaskActCntType;
|
170
|
+
|
171
|
+
TaskType OSEKOStidact;
|
172
|
+
OSEKOSPrioType OSEKOSrunprio;
|
173
|
+
|
174
|
+
StatusType OSEKOSError ( register StatusType );
|
175
|
+
void ErrorHook ( StatusType );
|
176
|
+
void StartupHook ( void );
|
177
|
+
void ShutdownHook ( StatusType );
|
178
|
+
|
179
|
+
int getUsedTaskStack ( TaskType );
|
180
|
+
int getUnusedTaskStack ( TaskType );
|
181
|
+
int getUsedIsrStack ( void );
|
182
|
+
int getUnusedIsrStack ( void );
|
183
|
+
void OSEKOStaskStackCheckInit ( void );
|
184
|
+
signed char OSEKOStaskStackCheck ( OSEK_U8 * );
|
185
|
+
signed char OSEKOSisrStackCheck ( OSEK_U8 * );
|
186
|
+
void OSEKOStaskStackCheckFatal ( OSEK_U8 * );
|
187
|
+
void OSEKOSisrStackCheckFatal ( OSEK_U8 * );
|
188
|
+
OSEK_U8 * OSEKOSgetStackPointer ( void );
|
189
|
+
void OSEKOSTaskSwitch ( void );
|
190
|
+
StatusType OSEKOSReturn ( StatusType );
|
191
|
+
StatusType OSEKOSActivateTask ( register TaskType );
|
192
|
+
void OSEKOSTerminateTask ( TaskType, TaskType );
|
193
|
+
|
194
|
+
extern void OSEKOSGetResource ( ResourceType );
|
195
|
+
extern void OSEKOSReleaseResource ( ResourceType );
|
196
|
+
|
197
|
+
int OSEKOSSetEvent ( TaskType, EventMaskType );
|
198
|
+
int OSEKOSWaitEvent ( EventMaskType );
|
199
|
+
TickType OSEKOSGetAlarm(register AlarmType);
|
200
|
+
void OSEKOSSetAlarm ( AlarmType, TickType, TickType );
|
201
|
+
StatusType OSEKOSSetAbsAlarm ( AlarmType a, TickType b, TickType c );
|
202
|
+
|
203
|
+
StatusType OSEKOSCancelAlarm ( register AlarmType );
|
204
|
+
void OSEKOSAdvCntr ( void );
|
205
|
+
AppModeType GetActiveApplicationMode ( void );
|
206
|
+
|
207
|
+
void StartOS ( AppModeType );
|
208
|
+
|
209
|
+
void OSEKOSShutdownOS ( StatusType );
|
210
|
+
|
211
|
+
StatusType ActivateTask ( TaskType A );
|
212
|
+
StatusType TerminateTask ( void );
|
213
|
+
StatusType ChainTask ( TaskType A );
|
214
|
+
StatusType GetTaskState ( TaskType A, TaskStateRefType B );
|
215
|
+
StatusType GetTaskID ( TaskRefType A );
|
216
|
+
StatusType Schedule ( void );
|
217
|
+
StatusType GetResource ( ResourceType A );
|
218
|
+
StatusType ReleaseResource ( ResourceType A );
|
219
|
+
StatusType SetEvent ( TaskType A, EventMaskType B );
|
220
|
+
StatusType ClearEvent ( EventMaskType A );
|
221
|
+
StatusType WaitEvent ( EventMaskType A );
|
222
|
+
StatusType GetEvent ( TaskType A, EventMaskRefType B );
|
223
|
+
StatusType GetAlarm ( AlarmType A, TickRefType B );
|
224
|
+
StatusType GetAlarmBase ( AlarmType A, AlarmBaseRefType B );
|
225
|
+
StatusType SetRelAlarm ( AlarmType A, TickType B, TickType C );
|
226
|
+
StatusType SetAbsAlarm ( AlarmType A, TickType B, TickType C );
|
227
|
+
StatusType CancelAlarm ( AlarmType A );
|
228
|
+
StatusType AdvCntr ( CounterType A );
|
229
|
+
StatusType IAdvCntr ( CounterType A );
|
230
|
+
void SuspendOSInterrupts ( void );
|
231
|
+
void ResumeOSInterrupts ( void );
|
232
|
+
void SuspendAllInterrupts ( void );
|
233
|
+
void ResumeAllInterrupts ( void );
|
234
|
+
void DisableAllInterrupts ( void );
|
235
|
+
void EnableAllInterrupts ( void );
|
236
|
+
|
237
|
+
void OSEKOSDisable(void);
|
238
|
+
void OSEKOSEnable(void);
|
239
|
+
void OSEKOSAsmIDispatch(unsigned long *);
|
240
|
+
void OSEKOSAsmDispatch(OSEKOSPrioType p);
|
241
|
+
void OSEKOSStartupEnable(void);
|
242
|
+
void OSEKOSNop(void);
|
243
|
+
unsigned int OSEKOSV850CheckIsrSwitch(void);
|
244
|
+
void OSEKOSV850InitInterrupts(void);
|
245
|
+
void OSEKOSV850SetupInterrupts();
|
246
|
+
void OSEKOSV850SyncContextLoad(OSEKOSSaveType);
|
247
|
+
void OSEKOSV850SyncContextLoadFromIRQ(OSEKOSSaveType);
|
248
|
+
void OSEKOSV850ASyncContextLoad(OSEKOSSaveType);
|
249
|
+
void OSEKOSV850ASyncContextLoadFromIRQ(OSEKOSSaveType);
|
250
|
+
|
251
|
+
// arrays of function pointers - they look like function prototypes
|
252
|
+
void ( ( * const OSEKOStaskStartAddress [10] ) ( void ) );
|
253
|
+
StatusType (* OSEKOStaskStatuses [10][5]) ( void );
|
254
|
+
|
255
|
+
void OSEKOSV850StartContext
|
256
|
+
(
|
257
|
+
OSEK_TASK (( * const ) ( void )),
|
258
|
+
OSEK_U8 * const
|
259
|
+
);
|
260
|
+
void OSEKOSV850StartContextFromIRQ
|
261
|
+
(
|
262
|
+
OSEK_TASK (( * const ) ( void )),
|
263
|
+
OSEK_U8 * const
|
264
|
+
);
|
265
|
+
|
266
|
+
void OSEKOSSuspendOSInterrupts(void);
|
267
|
+
void OSEKOSResumeOSInterrupts(void);
|
268
|
+
void OSEKOSSuspendAllInterrupts(void);
|
269
|
+
void OSEKOSResumeAllInterrupts(void);
|
270
|
+
void OSEKOScheckSuspendResumeNesting(void);
|
271
|
+
|
272
|
+
|
273
|
+
void OSEKOSgetSR(void);
|
274
|
+
void OSEKOSEnableInterrupt_intern(int nr);
|
275
|
+
void OSEKOSDisableInterrupt_intern(int nr);
|