ceedling 0.25.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/project_as_gem.yml +13 -0
- data/assets/project_with_guts.yml +13 -0
- data/bin/ceedling +91 -67
- data/docs/CeedlingPacket.md +61 -23
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +4 -1
- data/lib/ceedling/configurator.rb +14 -1
- data/lib/ceedling/configurator_builder.rb +2 -1
- data/lib/ceedling/configurator_validator.rb +12 -3
- data/lib/ceedling/constants.rb +3 -1
- data/lib/ceedling/defaults.rb +12 -1
- data/lib/ceedling/file_finder.rb +3 -0
- data/lib/ceedling/file_path_utils.rb +1 -1
- data/lib/ceedling/file_wrapper.rb +4 -4
- data/lib/ceedling/generator.rb +12 -3
- data/lib/ceedling/preprocessinator_helper.rb +5 -5
- data/lib/ceedling/preprocessinator_includes_handler.rb +10 -1
- data/lib/ceedling/project_config_manager.rb +1 -2
- data/lib/ceedling/project_file_loader.rb +27 -9
- data/lib/ceedling/rakefile.rb +6 -6
- data/lib/ceedling/release_invoker.rb +21 -6
- data/lib/ceedling/rules_release.rake +9 -5
- data/lib/ceedling/rules_tests.rake +6 -1
- data/lib/ceedling/setupinator.rb +1 -0
- data/lib/ceedling/tasks_base.rake +3 -0
- data/lib/ceedling/tasks_filesystem.rake +10 -7
- data/lib/ceedling/tasks_release.rake +3 -1
- data/lib/ceedling/test_includes_extractor.rb +16 -12
- data/lib/ceedling/test_invoker.rb +40 -0
- data/lib/ceedling/version.rb +3 -3
- data/lib/ceedling/version.rb.erb +1 -1
- data/plugins/command_hooks/lib/command_hooks.rb +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +1 -0
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +4 -0
- data/plugins/fake_function_framework/spec/{fff_mock_generator_spec.rb → fff_mock_header_generator_spec.rb} +34 -194
- data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +149 -0
- data/plugins/fake_function_framework/spec/header_generator.rb +51 -0
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +115 -0
- data/plugins/subprojects/README.md +63 -0
- data/plugins/subprojects/config/defaults.yml +33 -0
- data/plugins/subprojects/lib/subprojects.rb +92 -0
- data/plugins/subprojects/subprojects.rake +78 -0
- data/spec/preprocessinator_includes_handler_spec.rb +15 -5
- data/spec/spec_helper.rb +2 -2
- data/spec/spec_system_helper.rb +49 -1
- data/spec/system/deployment_spec.rb +29 -0
- data/vendor/c_exception/README.md +8 -2
- data/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
- data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/vendor/unity/README.md +19 -10
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +396 -330
- data/vendor/c_exception/vendor/unity/src/unity.h +50 -4
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/c_exception/vendor/unity/test/Makefile +17 -17
- data/vendor/c_exception/vendor/unity/test/rakefile +63 -3
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/cmock/README.md +10 -1
- data/vendor/cmock/config/test_environment.rb +7 -7
- data/vendor/cmock/docs/CMock_Summary.md +325 -128
- data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/examples/make_example/Makefile +2 -2
- data/vendor/cmock/examples/temp_sensor/gcc.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/iar_v4.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/iar_v5.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/rakefile.rb +11 -1
- data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +12 -10
- data/vendor/cmock/lib/cmock.rb +0 -3
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +6 -2
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -1
- data/vendor/cmock/lib/cmock_header_parser.rb +5 -6
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/scripts/create_makefile.rb +4 -2
- data/vendor/cmock/scripts/test_summary.rb +17 -9
- data/vendor/cmock/src/cmock.c +1 -0
- data/vendor/cmock/src/cmock.h +1 -1
- data/vendor/cmock/src/cmock_internals.h +14 -1
- data/vendor/cmock/test/c/TestCMockC.yml +4 -4
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +4 -4
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_FLASH.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_RAM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_SIM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_FLASH.xcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_RAM.xcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/ioat91sam7x256.ddf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.dep +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewd +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewp +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.eww +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X-EK.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.inc +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.rdf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.tcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256_inc.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/ioat91sam7x256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/lib_AT91SAM7X256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup.s79 +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup_SAM7.c +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_FLASH.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_RAM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_SIM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_FLASH.icf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_RAM.icf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.dep +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewd +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewp +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.eww +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X-EK.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X256_inc.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/lib_AT91SAM7X256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/project.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_Binary.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_RAM_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup.s +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup_SAM7.c +0 -0
- data/vendor/cmock/{Rakefile → test/rakefile} +9 -9
- data/vendor/cmock/{rakefile_helper.rb → test/rakefile_helper.rb} +13 -13
- data/vendor/cmock/test/system/test_compilation/config.yml +4 -4
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +2 -0
- data/vendor/cmock/{targets → test/targets}/clang_strict.yml +11 -11
- data/vendor/cmock/{targets → test/targets}/gcc.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/gcc_64.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/gcc_tiny.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/iar_arm_v4.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/iar_arm_v5.yml +10 -10
- data/vendor/cmock/test/test_helper.rb +4 -8
- data/vendor/cmock/test/unit/cmock_config_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +3 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +15 -2
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +6 -10
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +1 -1
- data/vendor/cmock/vendor/c_exception/README.md +8 -2
- data/vendor/cmock/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +19 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +396 -330
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +50 -4
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +17 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +63 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/cmock/vendor/unity/README.md +19 -10
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/cmock/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/cmock/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +396 -330
- data/vendor/cmock/vendor/unity/src/unity.h +50 -4
- data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/cmock/vendor/unity/test/Makefile +17 -17
- data/vendor/cmock/vendor/unity/test/rakefile +63 -3
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/deep_merge/Rakefile +1 -1
- data/vendor/unity/README.md +19 -10
- data/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +396 -330
- data/vendor/unity/src/unity.h +50 -4
- data/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/unity/test/Makefile +17 -17
- data/vendor/unity/test/rakefile +63 -3
- data/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/unity/test/tests/testunity.c +1338 -151
- metadata +102 -157
- data/test_graveyard/integration/paths.yml +0 -17
- data/test_graveyard/integration/paths_test.rb +0 -80
- data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +0 -75
- data/test_graveyard/integration/rake_rules_cmock_test.rb +0 -74
- data/test_graveyard/integration/rake_rules_preprocess_test.rb +0 -178
- data/test_graveyard/integration/rake_rules_test.rb +0 -268
- data/test_graveyard/integration/rake_tasks_test.rb +0 -103
- data/test_graveyard/integration_test_helper.rb +0 -34
- data/test_graveyard/rakefile_rules.rb +0 -10
- data/test_graveyard/rakefile_rules_aux_dependencies.rb +0 -10
- data/test_graveyard/rakefile_rules_cmock.rb +0 -10
- data/test_graveyard/rakefile_rules_preprocess.rb +0 -10
- data/test_graveyard/rakefile_tasks.rb +0 -10
- data/test_graveyard/system/file_system_dependencies.yml +0 -20
- data/test_graveyard/system/file_system_kitchen_sink.yml +0 -20
- data/test_graveyard/system/file_system_mocks.yml +0 -20
- data/test_graveyard/system/file_system_preprocess.yml +0 -20
- data/test_graveyard/system/file_system_simple.yml +0 -20
- data/test_graveyard/system/file_system_test.rb +0 -78
- data/test_graveyard/system/mocks/include/a_file.h +0 -2
- data/test_graveyard/system/mocks/include/other_stuff.h +0 -2
- data/test_graveyard/system/mocks/include/stuff.h +0 -3
- data/test_graveyard/system/mocks/source/a_file.c +0 -9
- data/test_graveyard/system/mocks/test/test_a_file.c +0 -41
- data/test_graveyard/system/mocks/test/test_no_file.c +0 -14
- data/test_graveyard/system/project_mocks.yml +0 -43
- data/test_graveyard/system/project_mocks_test.rb +0 -38
- data/test_graveyard/system/project_simple.yml +0 -36
- data/test_graveyard/system/project_simple_test.rb +0 -39
- data/test_graveyard/system/rule_mocks_test.rb +0 -44
- data/test_graveyard/system/rule_runners_test.rb +0 -44
- data/test_graveyard/system/simple/include/other_stuff.h +0 -2
- data/test_graveyard/system/simple/include/stuff.h +0 -3
- data/test_graveyard/system/simple/source/other_stuff.c +0 -6
- data/test_graveyard/system/simple/source/stuff.c +0 -7
- data/test_graveyard/system/simple/test/test_other_stuff.c +0 -30
- data/test_graveyard/system/simple/test/test_stuff.c +0 -51
- data/test_graveyard/system_test_helper.rb +0 -73
- data/test_graveyard/test_helper.rb +0 -93
- data/test_graveyard/unit/busted/configurator_builder_test.rb +0 -569
- data/test_graveyard/unit/busted/configurator_helper_test.rb +0 -234
- data/test_graveyard/unit/busted/configurator_test.rb +0 -232
- data/test_graveyard/unit/busted/configurator_validator_test.rb +0 -169
- data/test_graveyard/unit/busted/deep_merge_fix_test.rb +0 -55
- data/test_graveyard/unit/busted/dependinator_test.rb +0 -129
- data/test_graveyard/unit/busted/file_finder_helper_test.rb +0 -45
- data/test_graveyard/unit/busted/file_finder_test.rb +0 -114
- data/test_graveyard/unit/busted/file_path_utils_test.rb +0 -97
- data/test_graveyard/unit/busted/file_system_utils_test.rb +0 -21
- data/test_graveyard/unit/busted/generator_test.rb +0 -187
- data/test_graveyard/unit/busted/generator_test_results_test.rb +0 -129
- data/test_graveyard/unit/busted/generator_test_runner_test.rb +0 -475
- data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +0 -39
- data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +0 -156
- data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +0 -93
- data/test_graveyard/unit/busted/preprocessinator_test.rb +0 -57
- data/test_graveyard/unit/busted/project_file_loader_test.rb +0 -142
- data/test_graveyard/unit/busted/setupinator_test.rb +0 -45
- data/test_graveyard/unit/busted/streaminator_test.rb +0 -49
- data/test_graveyard/unit/busted/task_invoker_test.rb +0 -69
- data/test_graveyard/unit/busted/test_includes_extractor_test.rb +0 -111
- data/test_graveyard/unit/busted/test_invoker_helper_test.rb +0 -62
- data/test_graveyard/unit/busted/test_invoker_test.rb +0 -47
- data/test_graveyard/unit/busted/tool_executor_helper_test.rb +0 -100
- data/test_graveyard/unit/busted/tool_executor_test.rb +0 -351
- data/test_graveyard/unit/busted/verbosinator_test.rb +0 -65
- data/test_graveyard/unit/preprocessinator_extractor_test.rb +0 -731
- data/test_graveyard/unit_test_helper.rb +0 -16
- data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/cmock/docs/CMock Summary.odt +0 -0
- data/vendor/cmock/docs/CMock Summary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/unity/auto/parseOutput.rb +0 -191
- data/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
@@ -1,169 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/configurator_validator'
|
3
|
-
|
4
|
-
|
5
|
-
class ConfiguratorValidatorTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:file_wrapper, :stream_wrapper, :system_wrapper)
|
9
|
-
@validator = ConfiguratorValidator.new(objects)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
end
|
14
|
-
|
15
|
-
######### exists? ##########
|
16
|
-
|
17
|
-
should "verify valid paths into config hash" do
|
18
|
-
# deeper than real config, but let's exercise it just for fun
|
19
|
-
config = {
|
20
|
-
:root => {
|
21
|
-
:level2 => {
|
22
|
-
:level3 => {
|
23
|
-
:value => 'well, hello there'
|
24
|
-
}}}}
|
25
|
-
|
26
|
-
assert(@validator.exists?( config, :root ))
|
27
|
-
assert(@validator.exists?( config, :root, :level2 ))
|
28
|
-
assert(@validator.exists?( config, :root, :level2, :level3 ))
|
29
|
-
assert(@validator.exists?( config, :root, :level2, :level3, :value ))
|
30
|
-
end
|
31
|
-
|
32
|
-
should "complain about non-existent paths into config hash" do
|
33
|
-
# deeper than real config, but let's exercise it just for fun
|
34
|
-
config = {
|
35
|
-
:root => {
|
36
|
-
:level2 => {
|
37
|
-
:level3 => {
|
38
|
-
:value => 'well, hello there'
|
39
|
-
}}}}
|
40
|
-
|
41
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Required config file entry [:nope] does not exist.")
|
42
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Required config file entry [:root][:sorry] does not exist.")
|
43
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Required config file entry [:root][:level2][:no_can_do] does not exist.")
|
44
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Required config file entry [:root][:level2][:level3][:wrong] does not exist.")
|
45
|
-
|
46
|
-
assert_equal(false, @validator.exists?( config, :nope ))
|
47
|
-
assert_equal(false, @validator.exists?( config, :root, :sorry ))
|
48
|
-
assert_equal(false, @validator.exists?( config, :root, :level2, :no_can_do ))
|
49
|
-
assert_equal(false, @validator.exists?( config, :root, :level2, :level3, :wrong ))
|
50
|
-
end
|
51
|
-
|
52
|
-
|
53
|
-
######### validate_path_list ##########
|
54
|
-
|
55
|
-
should "fail for missing entries in config when validating path entries" do
|
56
|
-
config = {:project => {}}
|
57
|
-
|
58
|
-
assert_equal(false, @validator.validate_path_list(config, :project, :build_root))
|
59
|
-
end
|
60
|
-
|
61
|
-
should "complain about non-existent paths for given path entries in config" do
|
62
|
-
config = {:project => {:build_root => 'project/build'}}
|
63
|
-
|
64
|
-
@file_wrapper.expects.exist?('project/build').returns(false)
|
65
|
-
|
66
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Config path [:project][:build_root]['project/build'] does not exist on disk.")
|
67
|
-
|
68
|
-
assert_equal(false, @validator.validate_path_list(config, :project, :build_root))
|
69
|
-
end
|
70
|
-
|
71
|
-
should "successfully validate paths for given path entries in config" do
|
72
|
-
config = {
|
73
|
-
:project => {
|
74
|
-
:test_paths => ['main/test', 'modules/*/test']
|
75
|
-
}}
|
76
|
-
|
77
|
-
@file_wrapper.expects.exist?('main/test').returns(true)
|
78
|
-
@file_wrapper.expects.exist?('modules').returns(true)
|
79
|
-
|
80
|
-
assert(@validator.validate_path_list(config, :project, :test_paths))
|
81
|
-
end
|
82
|
-
|
83
|
-
######### validate_filepath ##########
|
84
|
-
|
85
|
-
should "fail for missing entry in config when validating filepath" do
|
86
|
-
config = {
|
87
|
-
:tools => {
|
88
|
-
:thinger => {}
|
89
|
-
}}
|
90
|
-
|
91
|
-
assert_equal(false, @validator.validate_filepath(config, :tools, :thinger, :executable))
|
92
|
-
end
|
93
|
-
|
94
|
-
should "complain about non-existent explicit filepath" do
|
95
|
-
config = {
|
96
|
-
:tools => {
|
97
|
-
:thinger => {
|
98
|
-
# specific path, check it
|
99
|
-
:executable => 'bin/app.exe'
|
100
|
-
}}}
|
101
|
-
|
102
|
-
@file_wrapper.expects.exist?('bin/app.exe').returns(false)
|
103
|
-
|
104
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Config filepath [:tools][:thinger][:executable]['bin/app.exe'] does not exist on disk.")
|
105
|
-
|
106
|
-
assert_equal(false, @validator.validate_filepath(config, :tools, :thinger, :executable))
|
107
|
-
end
|
108
|
-
|
109
|
-
should "complain about non-existent filepath in search paths" do
|
110
|
-
config = {
|
111
|
-
:tools => {
|
112
|
-
:thinger => {
|
113
|
-
# specific path, check it
|
114
|
-
:executable => 'app'
|
115
|
-
}}}
|
116
|
-
|
117
|
-
@system_wrapper.expects.search_paths.returns(['bin', 'c:/program files/app', 'tools/thingamabob'])
|
118
|
-
|
119
|
-
@file_wrapper.expects.exist?('bin/app').returns(false)
|
120
|
-
@file_wrapper.expects.exist?('c:/program files/app/app').returns(false)
|
121
|
-
@file_wrapper.expects.exist?('tools/thingamabob/app').returns(false)
|
122
|
-
|
123
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Config filepath [:tools][:thinger][:executable]['app'] does not exist in system search paths.")
|
124
|
-
|
125
|
-
assert_equal(false, @validator.validate_filepath(config, :tools, :thinger, :executable))
|
126
|
-
end
|
127
|
-
|
128
|
-
should "successfully validate filepath containing tool executor argument replacement" do
|
129
|
-
config = {
|
130
|
-
:tools => {
|
131
|
-
:thinger => {
|
132
|
-
# specific path, check it
|
133
|
-
:executable => '${11}'
|
134
|
-
}}}
|
135
|
-
|
136
|
-
assert(@validator.validate_filepath(config, :tools, :thinger, :executable))
|
137
|
-
end
|
138
|
-
|
139
|
-
should "successfully validate explicit filepath" do
|
140
|
-
config = {
|
141
|
-
:tools => {
|
142
|
-
:thinger => {
|
143
|
-
# specific path, check it
|
144
|
-
:executable => 'bin/app.exe'
|
145
|
-
}}}
|
146
|
-
|
147
|
-
@file_wrapper.expects.exist?('bin/app.exe').returns(true)
|
148
|
-
|
149
|
-
assert(@validator.validate_filepath(config, :tools, :thinger, :executable))
|
150
|
-
end
|
151
|
-
|
152
|
-
should "successfully validate search path filepath" do
|
153
|
-
config = {
|
154
|
-
:tools => {
|
155
|
-
:thinger => {
|
156
|
-
# no path, go looking in search paths
|
157
|
-
:executable => 'gcc'
|
158
|
-
}}}
|
159
|
-
|
160
|
-
@system_wrapper.expects.search_paths.returns(['/usr/bin', 'c:/program files/app', 'tools'])
|
161
|
-
|
162
|
-
@file_wrapper.expects.exist?('/usr/bin/gcc').returns(false)
|
163
|
-
@file_wrapper.expects.exist?('c:/program files/app/gcc').returns(false)
|
164
|
-
@file_wrapper.expects.exist?('tools/gcc').returns(true)
|
165
|
-
|
166
|
-
assert(@validator.validate_filepath(config, :tools, :thinger, :executable))
|
167
|
-
end
|
168
|
-
|
169
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'deep_merge'
|
3
|
-
|
4
|
-
|
5
|
-
class DeepMergeFixTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
end
|
9
|
-
|
10
|
-
def teardown
|
11
|
-
end
|
12
|
-
|
13
|
-
should "overwrite destination hash elements of type TrueClass and FalseClass with source elements" do
|
14
|
-
# note: The deep_merge present in vendor is an altered version of that which is available online.
|
15
|
-
# The original relies on true/false checks to detect presence in hashes instead of .nil? checks.
|
16
|
-
# Thus, it does not properly merge hash elements of TrueClass and FalseClass; the corrected
|
17
|
-
# version does.
|
18
|
-
|
19
|
-
source = {
|
20
|
-
:array => [1, 2, 3],
|
21
|
-
:int => 9,
|
22
|
-
:string => 'hello',
|
23
|
-
:boolean1 => false,
|
24
|
-
:boolean2 => true,
|
25
|
-
:boolean3 => false,
|
26
|
-
:boolean4 => true,
|
27
|
-
}
|
28
|
-
|
29
|
-
destination = {
|
30
|
-
:array => [3, 4, 5],
|
31
|
-
:int => 1,
|
32
|
-
:string => 'world',
|
33
|
-
:boolean1 => true,
|
34
|
-
:boolean2 => false,
|
35
|
-
:boolean3 => false,
|
36
|
-
:boolean4 => true,
|
37
|
-
}
|
38
|
-
|
39
|
-
merged = {
|
40
|
-
:array => [1, 2, 3, 4, 5],
|
41
|
-
:int => 9,
|
42
|
-
:string => 'hello',
|
43
|
-
:boolean1 => false,
|
44
|
-
:boolean2 => true,
|
45
|
-
:boolean3 => false,
|
46
|
-
:boolean4 => true,
|
47
|
-
}
|
48
|
-
|
49
|
-
destination.deep_merge!(source)
|
50
|
-
destination[:array].sort!
|
51
|
-
|
52
|
-
assert_equal(merged, destination)
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
@@ -1,129 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/dependinator'
|
3
|
-
|
4
|
-
|
5
|
-
class DependinatorTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:configurator, :test_includes_extractor, :file_finder, :file_path_utils, :rake_wrapper)
|
9
|
-
@dependinator = Dependinator.new(objects)
|
10
|
-
|
11
|
-
create_mocks(:headers1, :headers2, :sources1, :sources2, :dependencies1, :dependencies2)
|
12
|
-
create_mocks(:files_list1, :files_list2)
|
13
|
-
end
|
14
|
-
|
15
|
-
def teardown
|
16
|
-
end
|
17
|
-
|
18
|
-
|
19
|
-
should "set up no object dependencies for empty files lists" do
|
20
|
-
@dependinator.setup_test_object_dependencies
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
should "set up object dependencies for files lists" do
|
25
|
-
@file_path_utils.expects.form_dependencies_filelist(@files_list1).returns(['projects/build/dependencies/MockIngBird.d', 'projects/build/dependencies/MockAndRoll.d'])
|
26
|
-
@rake_wrapper.expects.load_dependencies('projects/build/dependencies/MockIngBird.d')
|
27
|
-
@rake_wrapper.expects.load_dependencies('projects/build/dependencies/MockAndRoll.d')
|
28
|
-
|
29
|
-
@file_path_utils.expects.form_dependencies_filelist(@files_list2).returns(['projects/build/dependencies/MockAroundTheClock.d', 'projects/build/dependencies/MockHimOut.d'])
|
30
|
-
@rake_wrapper.expects.load_dependencies('projects/build/dependencies/MockAroundTheClock.d')
|
31
|
-
@rake_wrapper.expects.load_dependencies('projects/build/dependencies/MockHimOut.d')
|
32
|
-
|
33
|
-
@dependinator.setup_test_object_dependencies(@files_list1, @files_list2)
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
should "set up no executable dependencies for blank test list" do
|
38
|
-
@dependinator.setup_test_executable_dependencies([])
|
39
|
-
end
|
40
|
-
|
41
|
-
|
42
|
-
should "set up executable dependencies for a test list with CException" do
|
43
|
-
test_list = ['test1.c', 'test2.c']
|
44
|
-
|
45
|
-
@test_includes_extractor.expects.lookup_includes_list(test_list[0]).returns(@headers1)
|
46
|
-
@file_finder.expects.find_source_files_from_headers(@headers1).returns(@sources1)
|
47
|
-
|
48
|
-
@file_path_utils.expects.form_source_objects_filelist(@sources1).returns(@dependencies1)
|
49
|
-
|
50
|
-
@file_path_utils.expects.form_runner_object_filepath_from_test(test_list[0]).returns('/project/build/out/test1_runner.c')
|
51
|
-
@dependencies1.expects.include('/project/build/out/test1_runner.c')
|
52
|
-
@file_path_utils.expects.form_object_filepath(test_list[0]).returns('project/build/out/test1.o')
|
53
|
-
@dependencies1.expects.include('project/build/out/test1.o')
|
54
|
-
@configurator.expects.project_use_exceptions.returns(true)
|
55
|
-
@file_path_utils.expects.form_object_filepath('CException.c').returns('project/build/out/CException.o')
|
56
|
-
@dependencies1.expects.include('project/build/out/CException.o')
|
57
|
-
|
58
|
-
@dependencies1.expects.uniq!
|
59
|
-
|
60
|
-
@file_path_utils.expects.form_executable_filepath(test_list[0]).returns('project/build/out/test1.exe')
|
61
|
-
@rake_wrapper.expects.create_file_task('project/build/out/test1.exe', @dependencies1)
|
62
|
-
|
63
|
-
|
64
|
-
@test_includes_extractor.expects.lookup_includes_list(test_list[1]).returns(@headers2)
|
65
|
-
@file_finder.expects.find_source_files_from_headers(@headers2).returns(@sources2)
|
66
|
-
|
67
|
-
@file_path_utils.expects.form_source_objects_filelist(@sources2).returns(@dependencies2)
|
68
|
-
|
69
|
-
@file_path_utils.expects.form_runner_object_filepath_from_test(test_list[1]).returns('/project/build/out/test2_runner.c')
|
70
|
-
@dependencies2.expects.include('/project/build/out/test2_runner.c')
|
71
|
-
@file_path_utils.expects.form_object_filepath(test_list[1]).returns('project/build/out/test2.o')
|
72
|
-
@dependencies2.expects.include('project/build/out/test2.o')
|
73
|
-
@configurator.expects.project_use_exceptions.returns(true)
|
74
|
-
@file_path_utils.expects.form_object_filepath('CException.c').returns('project/build/out/CException.o')
|
75
|
-
@dependencies2.expects.include('project/build/out/CException.o')
|
76
|
-
|
77
|
-
@dependencies2.expects.uniq!
|
78
|
-
|
79
|
-
@file_path_utils.expects.form_executable_filepath(test_list[1]).returns('project/build/out/test2.exe')
|
80
|
-
@rake_wrapper.expects.create_file_task('project/build/out/test2.exe', @dependencies2)
|
81
|
-
|
82
|
-
|
83
|
-
@dependinator.setup_test_executable_dependencies(test_list)
|
84
|
-
end
|
85
|
-
|
86
|
-
|
87
|
-
should "set up executable dependencies for a test list without CException" do
|
88
|
-
test_list = ['testing1.c', 'testing2.c']
|
89
|
-
|
90
|
-
@test_includes_extractor.expects.lookup_includes_list(test_list[0]).returns(@headers1)
|
91
|
-
@file_finder.expects.find_source_files_from_headers(@headers1).returns(@sources1)
|
92
|
-
|
93
|
-
@file_path_utils.expects.form_source_objects_filelist(@sources1).returns(@dependencies1)
|
94
|
-
|
95
|
-
@file_path_utils.expects.form_runner_object_filepath_from_test(test_list[0]).returns('/project/build/out/testing1_runner.c')
|
96
|
-
@dependencies1.expects.include('/project/build/out/testing1_runner.c')
|
97
|
-
@file_path_utils.expects.form_object_filepath(test_list[0]).returns('project/build/out/testing1.o')
|
98
|
-
@dependencies1.expects.include('project/build/out/testing1.o')
|
99
|
-
@configurator.expects.project_use_exceptions.returns(false)
|
100
|
-
|
101
|
-
@dependencies1.expects.uniq!
|
102
|
-
|
103
|
-
@file_path_utils.expects.form_executable_filepath(test_list[0]).returns('project/build/out/testing1.exe')
|
104
|
-
@rake_wrapper.expects.create_file_task('project/build/out/testing1.exe', @dependencies1)
|
105
|
-
|
106
|
-
|
107
|
-
@test_includes_extractor.expects.lookup_includes_list(test_list[1]).returns(@headers2)
|
108
|
-
@file_finder.expects.find_source_files_from_headers(@headers2).returns(@sources2)
|
109
|
-
|
110
|
-
@file_path_utils.expects.form_source_objects_filelist(@sources2).returns(@dependencies2)
|
111
|
-
|
112
|
-
@file_path_utils.expects.form_runner_object_filepath_from_test(test_list[1]).returns('/project/build/out/testing2_runner.c')
|
113
|
-
@dependencies2.expects.include('/project/build/out/testing2_runner.c')
|
114
|
-
@file_path_utils.expects.form_object_filepath(test_list[1]).returns('project/build/out/testing2.o')
|
115
|
-
@dependencies2.expects.include('project/build/out/testing2.o')
|
116
|
-
@configurator.expects.project_use_exceptions.returns(false)
|
117
|
-
|
118
|
-
@dependencies2.expects.uniq!
|
119
|
-
|
120
|
-
@file_path_utils.expects.form_executable_filepath(test_list[1]).returns('project/build/out/testing2.exe')
|
121
|
-
@rake_wrapper.expects.create_file_task('project/build/out/testing2.exe', @dependencies2)
|
122
|
-
|
123
|
-
|
124
|
-
@dependinator.setup_test_executable_dependencies(test_list)
|
125
|
-
end
|
126
|
-
|
127
|
-
|
128
|
-
end
|
129
|
-
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/file_finder_helper'
|
3
|
-
|
4
|
-
|
5
|
-
class FileFinderHelperTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:streaminator)
|
9
|
-
@file_finder_helper = FileFinderHelper.new(objects)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
should "return file path when sought file is found in search collection" do
|
17
|
-
search_collection = ['files/source/yadda.h', 'files/tests/test_thing.c', 'lib/headers/wheres_waldo.h']
|
18
|
-
|
19
|
-
assert_equal('lib/headers/wheres_waldo.h', @file_finder_helper.find_file_in_collection('wheres_waldo.h', search_collection))
|
20
|
-
end
|
21
|
-
|
22
|
-
should "raise if the file is not found" do
|
23
|
-
search_collection = ['files/source/yadda.h', 'files/tests/test_thing.c', 'lib/headers/no_waldo.h']
|
24
|
-
|
25
|
-
@streaminator.expects.stderr_puts("ERROR: Could not find 'waldo.h'.", Verbosity::ERRORS)
|
26
|
-
|
27
|
-
assert_raise(RuntimeError){ @file_finder_helper.find_file_in_collection('waldo.h', search_collection) }
|
28
|
-
end
|
29
|
-
|
30
|
-
should "raise if the file is found but with wrong capitalization" do
|
31
|
-
search_collection = ['files/source/yadda.h', 'files/tests/test_thing.c', 'lib/headers/no_waldo.h']
|
32
|
-
|
33
|
-
@streaminator.expects.stderr_puts("ERROR: Could not find 'Yadda.h' but did find filename having different capitalization: 'files/source/yadda.h'.", Verbosity::ERRORS)
|
34
|
-
|
35
|
-
assert_raise(RuntimeError){ @file_finder_helper.find_file_in_collection('Yadda.h', search_collection) }
|
36
|
-
end
|
37
|
-
|
38
|
-
should "not raise but just return empty string if the file is not found" do
|
39
|
-
search_collection = ['files/source/yadda.h', 'files/tests/test_thing.c', 'lib/headers/no_waldo.h']
|
40
|
-
|
41
|
-
assert_equal('', @file_finder_helper.find_file_in_collection('waldo.h', search_collection, {:should_complain => false}))
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
45
|
-
|
@@ -1,114 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/file_finder'
|
3
|
-
|
4
|
-
|
5
|
-
class FileFinderTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:configurator, :file_finder_helper)
|
9
|
-
@file_finder = FileFinder.new(objects)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
############ find mockable header #############
|
17
|
-
|
18
|
-
should "by convention find source header file from which mock is generated" do
|
19
|
-
|
20
|
-
@configurator.expects.cmock_mock_prefix.returns('mock_')
|
21
|
-
@configurator.expects.extension_header.returns('.h')
|
22
|
-
@configurator.expects.collection_all_headers.returns(['files/include', 'files/source'])
|
23
|
-
@file_finder_helper.expects.find_file_in_collection('goldilocks.h', ['files/include', 'files/source']).returns('files/include/goldilocks.h')
|
24
|
-
|
25
|
-
@configurator.expects.cmock_mock_prefix.returns('Mock')
|
26
|
-
@configurator.expects.extension_header.returns('.H')
|
27
|
-
@configurator.expects.collection_all_headers.returns(['include', 'source/headers'])
|
28
|
-
@file_finder_helper.expects.find_file_in_collection('Rapunzel.H', ['include', 'source/headers']).returns('include/Rapunzel.H')
|
29
|
-
|
30
|
-
assert_equal('files/include/goldilocks.h', @file_finder.find_mockable_header('build/mocks/mock_goldilocks.c'))
|
31
|
-
assert_equal('include/Rapunzel.H', @file_finder.find_mockable_header('files/build/mocks/MockRapunzel.C'))
|
32
|
-
end
|
33
|
-
|
34
|
-
############ find test from runner #############
|
35
|
-
|
36
|
-
should "by convention find test file from which test runner is generated" do
|
37
|
-
|
38
|
-
@configurator.expects.extension_source.returns('.c')
|
39
|
-
@configurator.expects.test_runner_file_suffix.returns('_runner')
|
40
|
-
@configurator.expects.collection_all_tests.returns(['tests/a/test_larry.c', 'tests/b/test_curly.c', 'tests/a/test_moe.c'])
|
41
|
-
@file_finder_helper.expects.find_file_in_collection('test_curly.c', ['tests/a/test_larry.c', 'tests/b/test_curly.c', 'tests/a/test_moe.c']).returns('tests/b/test_curly.c')
|
42
|
-
|
43
|
-
assert_equal('tests/b/test_curly.c', @file_finder.find_test_from_runner_path('files/build/runners/test_curly_runner.c'))
|
44
|
-
end
|
45
|
-
|
46
|
-
should "raise if test file from which test runner is generated is not found" do
|
47
|
-
|
48
|
-
@configurator.expects.extension_source.returns('.c')
|
49
|
-
@configurator.expects.test_runner_file_suffix.returns('_runner')
|
50
|
-
@configurator.expects.collection_all_tests.returns(['tests/a/test_larry.c', 'tests/b/test_curly.c', 'tests/a/test_moe.c'])
|
51
|
-
|
52
|
-
@file_finder_helper.expects.complain('test_shemp.c').raises('')
|
53
|
-
|
54
|
-
begin
|
55
|
-
@file_finder.find_test_from_runner_path('files/build/runners/test_shemp_runner.c')
|
56
|
-
flunk 'should have raised'
|
57
|
-
rescue
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
############ find test from file path #############
|
62
|
-
|
63
|
-
should "by convention find test file from given file path" do
|
64
|
-
|
65
|
-
@configurator.expects.extension_source.returns('.c')
|
66
|
-
@configurator.expects.collection_all_tests.returns(['tests/a/test_larry.c', 'tests/b/test_curly.c', 'tests/a/test_moe.c'])
|
67
|
-
@file_finder_helper.expects.find_file_in_collection('test_moe.c', ['tests/a/test_larry.c', 'tests/b/test_curly.c', 'tests/a/test_moe.c']).returns('tests/a/test_moe.c')
|
68
|
-
|
69
|
-
assert_equal('tests/a/test_moe.c', @file_finder.find_test_from_file_path('files/build/runners/test_moe.out'))
|
70
|
-
end
|
71
|
-
|
72
|
-
should "raise if test file cannot be found from given file path" do
|
73
|
-
|
74
|
-
@configurator.expects.extension_source.returns('.c')
|
75
|
-
@configurator.expects.collection_all_tests.returns(['tests/a/test_larry.c', 'tests/b/test_curly.c', 'tests/a/test_moe.c'])
|
76
|
-
|
77
|
-
@file_finder_helper.expects.complain('test_shemp.o').raises('')
|
78
|
-
|
79
|
-
begin
|
80
|
-
@file_finder.find_test_from_file_path('files/build/out/test_shemp.o')
|
81
|
-
flunk 'should have raised'
|
82
|
-
rescue
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
############ find test or source from file path #############
|
87
|
-
|
88
|
-
should "by convention find test or source file from file path" do
|
89
|
-
collection = ['files/tests/test_whatever.c', 'files/modules/flight.c']
|
90
|
-
|
91
|
-
@configurator.expects.extension_source.returns('.c')
|
92
|
-
@configurator.expects.collection_all_compilation_input.returns(collection)
|
93
|
-
@file_finder_helper.expects.find_file_in_collection('flight.c', collection).returns('files/modules/flight.c')
|
94
|
-
|
95
|
-
assert_equal('files/modules/flight.c', @file_finder.find_compilation_input_file('flight.out'))
|
96
|
-
end
|
97
|
-
|
98
|
-
############ find all source files that correspond to given header files #############
|
99
|
-
|
100
|
-
should "by convention find all source files that correspond to the given header files" do
|
101
|
-
collection = ['files/tests/test_stuff.c', 'files/modules/flight.c']
|
102
|
-
|
103
|
-
@configurator.expects.extension_source.returns('.c')
|
104
|
-
@configurator.expects.collection_all_compilation_input.returns(collection)
|
105
|
-
|
106
|
-
@file_finder_helper.expects.find_file_in_collection('flight.c', collection, {:should_complain => false}).returns('files/modules/flight.c')
|
107
|
-
@file_finder_helper.expects.find_file_in_collection('types.c', collection, {:should_complain => false}).returns('')
|
108
|
-
|
109
|
-
assert_equal(['files/modules/flight.c'], @file_finder.find_source_files_from_headers(['flight.h', 'types.h']))
|
110
|
-
end
|
111
|
-
|
112
|
-
|
113
|
-
end
|
114
|
-
|