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,80 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../integration_test_helper'
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake' # for FileList
|
4
|
-
require 'constructor'
|
5
|
-
require 'ceedling/file_system_utils'
|
6
|
-
require 'ceedling/file_wrapper'
|
7
|
-
|
8
|
-
|
9
|
-
PATHS_ROOT = INTEGRATION_TEST_ROOT + '/paths'
|
10
|
-
|
11
|
-
class PathsTest < Test::Unit::TestCase
|
12
|
-
|
13
|
-
def setup
|
14
|
-
ENV['CEEDLING_MAIN_PROJECT_FILE'] = File.join(INTEGRATION_TEST_ROOT, 'paths.yml')
|
15
|
-
|
16
|
-
@file_system_utils = FileSystemUtils.new({:file_wrapper => FileWrapper.new})
|
17
|
-
end
|
18
|
-
|
19
|
-
def teardown
|
20
|
-
end
|
21
|
-
|
22
|
-
|
23
|
-
should "collect paths from file system and exercise globs and our special glob handling" do
|
24
|
-
# pass in two strings to find all test(s) dirs in main/ and modules/
|
25
|
-
expected = [
|
26
|
-
"#{PATHS_ROOT}/main/test",
|
27
|
-
"#{PATHS_ROOT}/modules/comm/ethernet/test",
|
28
|
-
"#{PATHS_ROOT}/modules/comm/serial/test",
|
29
|
-
"#{PATHS_ROOT}/modules/eeprom/test",
|
30
|
-
"#{PATHS_ROOT}/modules/display/tests",
|
31
|
-
"#{PATHS_ROOT}/modules/power/tests"]
|
32
|
-
list = @file_system_utils.collect_paths("#{PATHS_ROOT}/main/test", "#{PATHS_ROOT}/modules/**/tes{t,ts}")
|
33
|
-
assert_equal(expected.sort, list.to_a.sort)
|
34
|
-
|
35
|
-
# pass in a FileList to find all src/ dirs in all of PATHS_ROOT space
|
36
|
-
expected = [
|
37
|
-
"#{PATHS_ROOT}/main/src",
|
38
|
-
"#{PATHS_ROOT}/modules/comm/ethernet/src",
|
39
|
-
"#{PATHS_ROOT}/modules/comm/serial/src",
|
40
|
-
"#{PATHS_ROOT}/modules/display/src",
|
41
|
-
"#{PATHS_ROOT}/modules/eeprom/src",
|
42
|
-
"#{PATHS_ROOT}/modules/power/src"]
|
43
|
-
list = @file_system_utils.collect_paths(FileList.new("#{PATHS_ROOT}/**/sr?"))
|
44
|
-
assert_equal(expected.sort, list.to_a.sort)
|
45
|
-
|
46
|
-
# pass in a string to recursively find all subdirectories below source/
|
47
|
-
expected = [
|
48
|
-
"#{PATHS_ROOT}/source/comm",
|
49
|
-
"#{PATHS_ROOT}/source/comm/ethernet",
|
50
|
-
"#{PATHS_ROOT}/source/comm/serial",
|
51
|
-
"#{PATHS_ROOT}/source/display",
|
52
|
-
"#{PATHS_ROOT}/source/eeprom",
|
53
|
-
"#{PATHS_ROOT}/source/power"]
|
54
|
-
list = @file_system_utils.collect_paths("#{PATHS_ROOT}/source/**")
|
55
|
-
assert_equal(expected.sort, list.to_a.sort)
|
56
|
-
|
57
|
-
# pass in a string to find all subdirectories one level below source/
|
58
|
-
expected = [
|
59
|
-
"#{PATHS_ROOT}/source/comm",
|
60
|
-
"#{PATHS_ROOT}/source/display",
|
61
|
-
"#{PATHS_ROOT}/source/eeprom",
|
62
|
-
"#{PATHS_ROOT}/source/power"]
|
63
|
-
list = @file_system_utils.collect_paths("#{PATHS_ROOT}/source/*")
|
64
|
-
assert_equal(expected.sort, list.to_a.sort)
|
65
|
-
|
66
|
-
|
67
|
-
# pass in an array of strings to collect tests/ and all subdirectories below tests/
|
68
|
-
expected = [
|
69
|
-
"#{PATHS_ROOT}/tests",
|
70
|
-
"#{PATHS_ROOT}/tests/comm",
|
71
|
-
"#{PATHS_ROOT}/tests/comm/ethernet",
|
72
|
-
"#{PATHS_ROOT}/tests/comm/serial",
|
73
|
-
"#{PATHS_ROOT}/tests/display",
|
74
|
-
"#{PATHS_ROOT}/tests/eeprom",
|
75
|
-
"#{PATHS_ROOT}/tests/power"]
|
76
|
-
list = @file_system_utils.collect_paths(["#{PATHS_ROOT}/tests", "#{PATHS_ROOT}/tests/**"])
|
77
|
-
assert_equal(expected.sort, list.to_a.sort)
|
78
|
-
end
|
79
|
-
|
80
|
-
end
|
@@ -1,75 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../integration_test_helper'
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
|
5
|
-
|
6
|
-
class RakeRulesAuxDependenciesTest < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def setup
|
9
|
-
rake_setup('rakefile_rules_deep_dependencies.rb', :file_finder, :generator)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
Rake.application = nil
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
should "recognize missing dependencies files, find their source, and execute rake tasks from the rule for dependency file generation" do
|
18
|
-
# default values as set in test_helper
|
19
|
-
redefine_global_constant('PROJECT_TEST_DEPENDENCIES_PATH', 'project/build/dependencies')
|
20
|
-
redefine_global_constant('EXTENSION_DEPENDENCIES', '.d')
|
21
|
-
|
22
|
-
# reload rakefile with new global constants
|
23
|
-
setup()
|
24
|
-
|
25
|
-
dependencies_src1 = 'files/source/thing.c'
|
26
|
-
dependencies_src2 = 'tests/test_thing.c'
|
27
|
-
dependencies_src3 = 'lib/stuff.c'
|
28
|
-
dependencies1 = 'project/build/dependencies/thing.d'
|
29
|
-
dependencies2 = 'project/build/dependencies/test_thing.d'
|
30
|
-
dependencies3 = 'project/build/dependencies/stuff.d'
|
31
|
-
|
32
|
-
# fake out rake so it won't look for the header files on disk and find they don't exist.
|
33
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
34
|
-
@rake.define_task(Rake::FileTask, dependencies_src1)
|
35
|
-
@rake.define_task(Rake::FileTask, dependencies_src2)
|
36
|
-
@rake.define_task(Rake::FileTask, dependencies_src3)
|
37
|
-
|
38
|
-
# set up expectations
|
39
|
-
@file_finder.expects.find_compilation_input_file(dependencies1).returns(dependencies_src1)
|
40
|
-
@generator.expects.generate_dependencies_file(dependencies_src1, dependencies1)
|
41
|
-
@file_finder.expects.find_compilation_input_file(dependencies2).returns(dependencies_src2)
|
42
|
-
@generator.expects.generate_dependencies_file(dependencies_src2, dependencies2)
|
43
|
-
@file_finder.expects.find_compilation_input_file(dependencies3).returns(dependencies_src3)
|
44
|
-
@generator.expects.generate_dependencies_file(dependencies_src3, dependencies3)
|
45
|
-
|
46
|
-
# invoke the dependencies creation rule under test
|
47
|
-
@rake[dependencies1].invoke
|
48
|
-
@rake[dependencies2].invoke
|
49
|
-
@rake[dependencies3].invoke
|
50
|
-
end
|
51
|
-
|
52
|
-
should "handle alternate build file paths and file extensions for dependency file generation rule" do
|
53
|
-
# default values as set in test_helper
|
54
|
-
redefine_global_constant('PROJECT_TEST_DEPENDENCIES_PATH', 'dependencies/dump')
|
55
|
-
redefine_global_constant('EXTENSION_DEPENDENCIES', '.i')
|
56
|
-
|
57
|
-
# reload rakefile with new global constants
|
58
|
-
setup()
|
59
|
-
|
60
|
-
dependencies_src1 = 'files/source/thing.c'
|
61
|
-
dependencies1 = 'dependencies/dump/thing.i'
|
62
|
-
|
63
|
-
# fake out rake so it won't look for the header files on disk and find they don't exist.
|
64
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
65
|
-
@rake.define_task(Rake::FileTask, dependencies_src1)
|
66
|
-
|
67
|
-
# set up expectations
|
68
|
-
@file_finder.expects.find_compilation_input_file(dependencies1).returns(dependencies_src1)
|
69
|
-
@generator.expects.generate_dependencies_file(dependencies_src1, dependencies1)
|
70
|
-
|
71
|
-
# invoke the dependencies creation rule under test
|
72
|
-
@rake[dependencies1].invoke
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
|
5
|
-
|
6
|
-
class RakeRulesCmockTest < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def setup
|
9
|
-
rake_setup('rakefile_rules_cmock.rb', :file_finder, :generator)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
Rake.application = nil
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
should "recognize missing mock files, find their source, and execute rake tasks from the rule for mock generation" do
|
18
|
-
# default values as set in test_helper
|
19
|
-
redefine_global_constant('CMOCK_MOCK_PREFIX', 'mock_')
|
20
|
-
redefine_global_constant('EXTENSION_SOURCE', '.c')
|
21
|
-
|
22
|
-
# reload rakefile with new global constants
|
23
|
-
setup()
|
24
|
-
|
25
|
-
mock_src1 = 'files/source/thing.h'
|
26
|
-
mock_src2 = 'stuff.h'
|
27
|
-
mock_src3 = 'files/source/WooDoggie.h'
|
28
|
-
mock1 = 'files/mocks/mock_thing.c'
|
29
|
-
mock2 = 'mock_stuff.c'
|
30
|
-
mock3 = 'files/mocks/mock_WooDoggie.c'
|
31
|
-
|
32
|
-
# fake out rake so it won't look for the header files on disk and find they don't exist.
|
33
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
34
|
-
@rake.define_task(Rake::FileTask, mock_src1)
|
35
|
-
@rake.define_task(Rake::FileTask, mock_src2)
|
36
|
-
@rake.define_task(Rake::FileTask, mock_src3)
|
37
|
-
|
38
|
-
# set up expectations
|
39
|
-
@file_finder.expects.find_mockable_header(mock1).returns(mock_src1)
|
40
|
-
@generator.expects.generate_mock(mock_src1)
|
41
|
-
@file_finder.expects.find_mockable_header(mock2).returns(mock_src2)
|
42
|
-
@generator.expects.generate_mock(mock_src2)
|
43
|
-
@file_finder.expects.find_mockable_header(mock3).returns(mock_src3)
|
44
|
-
@generator.expects.generate_mock(mock_src3)
|
45
|
-
|
46
|
-
# invoke the mock creation rule under test
|
47
|
-
@rake[mock1].invoke
|
48
|
-
@rake[mock2].invoke
|
49
|
-
@rake[mock3].invoke
|
50
|
-
end
|
51
|
-
|
52
|
-
should "handle alternate mock prefixes and source extensions for mock generation rule" do
|
53
|
-
redefine_global_constant('CMOCK_MOCK_PREFIX', 'Mock')
|
54
|
-
redefine_global_constant('EXTENSION_SOURCE', '.x')
|
55
|
-
|
56
|
-
# reload rakefile with new global constants
|
57
|
-
setup()
|
58
|
-
|
59
|
-
mock_src1 = 'files/source/IngBird.h'
|
60
|
-
mock1 = 'files/mocks/MockIngBird.x'
|
61
|
-
|
62
|
-
# fake out rake so it won't look for the header files on disk and find they don't exist.
|
63
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
64
|
-
@rake.define_task(Rake::FileTask, mock_src1)
|
65
|
-
|
66
|
-
# set up expectations
|
67
|
-
@file_finder.expects.find_mockable_header(mock1).returns(mock_src1)
|
68
|
-
@generator.expects.generate_mock(mock_src1)
|
69
|
-
|
70
|
-
# invoke the mock creation rule under test
|
71
|
-
@rake[mock1].invoke
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|
@@ -1,178 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
|
5
|
-
|
6
|
-
class RakeRulesPreprocessTest < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def setup
|
9
|
-
rake_setup('rakefile_rules_preprocess.rb', :file_finder, :generator, :configurator)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
Rake.application = nil
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
################################
|
18
|
-
####### Preprocess Files #######
|
19
|
-
################################
|
20
|
-
|
21
|
-
should "recognize missing preprocessed files, find their source, and execute rake tasks from the rule for generating preprocessed file output" do
|
22
|
-
# default values as set in test_helper
|
23
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_FILES_PATH', 'project/build/preprocess/files')
|
24
|
-
# because rule matches on any file, gotta set this path here to help rake distinguish rules when file is tested
|
25
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_INCLUDES_PATH', 'project/build/preprocess/includes')
|
26
|
-
|
27
|
-
# reload rakefile with new global constants
|
28
|
-
setup()
|
29
|
-
|
30
|
-
# try all different paths and file extensions; we should be able to preprocess any kind of source file
|
31
|
-
preprocess_src1 = 'tests/a/test_thing.c'
|
32
|
-
preprocess_src2 = 'source/a_file.h'
|
33
|
-
preprocess_src3 = 'source/lib/include/API.H'
|
34
|
-
preprocess1 = 'project/build/preprocess/files/test_thing.c'
|
35
|
-
preprocess2 = 'project/build/preprocess/files/a_file.h'
|
36
|
-
preprocess3 = 'project/build/preprocess/files/API.H'
|
37
|
-
|
38
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
39
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
40
|
-
@rake.define_task(Rake::FileTask, preprocess_src1)
|
41
|
-
@rake.define_task(Rake::FileTask, preprocess_src2)
|
42
|
-
@rake.define_task(Rake::FileTask, preprocess_src3)
|
43
|
-
|
44
|
-
# set up expectations
|
45
|
-
@file_finder.expects.find_test_or_source_or_header_file(preprocess1).returns(preprocess_src1)
|
46
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
47
|
-
@generator.expects.generate_preprocessed_file(preprocess_src1)
|
48
|
-
|
49
|
-
@file_finder.expects.find_test_or_source_or_header_file(preprocess2).returns(preprocess_src2)
|
50
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
51
|
-
@generator.expects.generate_preprocessed_file(preprocess_src2)
|
52
|
-
|
53
|
-
@file_finder.expects.find_test_or_source_or_header_file(preprocess3).returns(preprocess_src3)
|
54
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
55
|
-
@generator.expects.generate_preprocessed_file(preprocess_src3)
|
56
|
-
|
57
|
-
# invoke the test preprocess creation rule under test
|
58
|
-
@rake[preprocess1].invoke
|
59
|
-
@rake[preprocess2].invoke
|
60
|
-
@rake[preprocess3].invoke
|
61
|
-
end
|
62
|
-
|
63
|
-
should "complain if file preprocessing rule is executed but auxiliary dependencies are not enabled" do
|
64
|
-
# default values as set in test_helper
|
65
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_FILES_PATH', 'project/build/preprocess/files')
|
66
|
-
# because rule matches on any file, gotta set this path here to help rake distinguish rules when file is tested
|
67
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_INCLUDES_PATH', 'project/build/preprocess/includes')
|
68
|
-
|
69
|
-
# reload rakefile with new global constants
|
70
|
-
setup()
|
71
|
-
|
72
|
-
# try all different paths and file extensions; we should be able to preprocess any kind of source file
|
73
|
-
preprocess_src1 = 'tests/a/test_thing.c'
|
74
|
-
preprocess1 = 'project/build/preprocess/files/test_thing.c'
|
75
|
-
|
76
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
77
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
78
|
-
@rake.define_task(Rake::FileTask, preprocess_src1)
|
79
|
-
|
80
|
-
# set up expectations
|
81
|
-
@file_finder.expects.find_test_or_source_or_header_file(preprocess1).returns(preprocess_src1)
|
82
|
-
@configurator.expects.project_use_deep_dependencies.returns(false)
|
83
|
-
|
84
|
-
# invoke the test preprocess creation rule under test
|
85
|
-
assert_raise(RuntimeError){ @rake[preprocess1].invoke }
|
86
|
-
end
|
87
|
-
|
88
|
-
should "handle alternate output file paths for preprocessed file output rule" do
|
89
|
-
# default values as set in test_helper
|
90
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_FILES_PATH', 'demacroified/files')
|
91
|
-
# because rule matches on any file, gotta set this path here to help rake distinguish rules when file is tested
|
92
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_INCLUDES_PATH', 'includes')
|
93
|
-
|
94
|
-
# reload rakefile with new global constants
|
95
|
-
setup()
|
96
|
-
|
97
|
-
preprocess_src1 = 'tests/a/test_thing.C'
|
98
|
-
preprocess1 = 'demacroified/files/test_thing.C'
|
99
|
-
|
100
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
101
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
102
|
-
@rake.define_task(Rake::FileTask, preprocess_src1)
|
103
|
-
|
104
|
-
# set up expectations
|
105
|
-
@file_finder.expects.find_test_or_source_or_header_file(preprocess1).returns(preprocess_src1)
|
106
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
107
|
-
@generator.expects.generate_preprocessed_file(preprocess_src1)
|
108
|
-
|
109
|
-
# invoke the test preprocess creation rule under test
|
110
|
-
@rake[preprocess1].invoke
|
111
|
-
end
|
112
|
-
|
113
|
-
########################################
|
114
|
-
####### Extract Shallow Includes #######
|
115
|
-
########################################
|
116
|
-
|
117
|
-
should "recognize missing extracted includes files, find their source, and execute rake tasks from the rule for extracting file includes output" do
|
118
|
-
# default values as set in test_helper
|
119
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_INCLUDES_PATH', 'project/build/preprocess/includes')
|
120
|
-
# because rule matches on any file, gotta set this path here to help rake distinguish rules when file is tested
|
121
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_FILES_PATH', 'project/build/preprocess/files')
|
122
|
-
|
123
|
-
# reload rakefile with new global constants
|
124
|
-
setup()
|
125
|
-
|
126
|
-
# try all different paths and file extensions; we should be able to preprocess any kind of source file
|
127
|
-
includes_src1 = 'tests/a/test_thing.c'
|
128
|
-
includes_src2 = 'source/a_file.h'
|
129
|
-
includes_src3 = 'source/lib/include/API.H'
|
130
|
-
includes1 = 'project/build/preprocess/includes/test_thing.c'
|
131
|
-
includes2 = 'project/build/preprocess/includes/a_file.h'
|
132
|
-
includes3 = 'project/build/preprocess/includes/API.H'
|
133
|
-
|
134
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
135
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
136
|
-
@rake.define_task(Rake::FileTask, includes_src1)
|
137
|
-
@rake.define_task(Rake::FileTask, includes_src2)
|
138
|
-
@rake.define_task(Rake::FileTask, includes_src3)
|
139
|
-
|
140
|
-
# set up expectations
|
141
|
-
@file_finder.expects.find_test_or_source_or_header_file(includes1).returns(includes_src1)
|
142
|
-
@generator.expects.generate_shallow_includes_list(includes_src1)
|
143
|
-
@file_finder.expects.find_test_or_source_or_header_file(includes2).returns(includes_src2)
|
144
|
-
@generator.expects.generate_shallow_includes_list(includes_src2)
|
145
|
-
@file_finder.expects.find_test_or_source_or_header_file(includes3).returns(includes_src3)
|
146
|
-
@generator.expects.generate_shallow_includes_list(includes_src3)
|
147
|
-
|
148
|
-
# invoke the test includes creation rule under test
|
149
|
-
@rake[includes1].invoke
|
150
|
-
@rake[includes2].invoke
|
151
|
-
@rake[includes3].invoke
|
152
|
-
end
|
153
|
-
|
154
|
-
should "handle alternate output file paths for preprocessor incluedes file output rule" do
|
155
|
-
# default values as set in test_helper
|
156
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_INCLUDES_PATH', 'include_stuff')
|
157
|
-
# because rule matches on any file, gotta set this path here to help rake distinguish rules when file is tested
|
158
|
-
redefine_global_constant('PROJECT_TEST_PREPROCESS_FILES_PATH', 'project/build/preprocess/files')
|
159
|
-
|
160
|
-
# reload rakefile with new global constants
|
161
|
-
setup()
|
162
|
-
|
163
|
-
includes_src1 = 'tests/a/test_thing.C'
|
164
|
-
includes1 = 'include_stuff/test_thing.C'
|
165
|
-
|
166
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
167
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
168
|
-
@rake.define_task(Rake::FileTask, includes_src1)
|
169
|
-
|
170
|
-
# set up expectations
|
171
|
-
@file_finder.expects.find_test_or_source_or_header_file(includes1).returns(includes_src1)
|
172
|
-
@generator.expects.generate_shallow_includes_list(includes_src1)
|
173
|
-
|
174
|
-
# invoke the test includes creation rule under test
|
175
|
-
@rake[includes1].invoke
|
176
|
-
end
|
177
|
-
|
178
|
-
end
|
@@ -1,268 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../integration_test_helper'
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
|
5
|
-
|
6
|
-
class RakeRulesTest < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def setup
|
9
|
-
rake_setup('rakefile_rules.rb', :file_finder, :file_path_utils, :generator)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
Rake.application = nil
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
######################################
|
18
|
-
####### Test Runner Generation #######
|
19
|
-
######################################
|
20
|
-
|
21
|
-
should "recognize missing test runner files, find their source, and execute rake tasks from the rule for test runner generation" do
|
22
|
-
# default values as set in test_helper
|
23
|
-
redefine_global_constant('PROJECT_TEST_FILE_PREFIX', 'test_')
|
24
|
-
redefine_global_constant('TEST_RUNNER_FILE_SUFFIX', '_runner')
|
25
|
-
redefine_global_constant('EXTENSION_SOURCE', '.c')
|
26
|
-
|
27
|
-
# reload rakefile with new global constants
|
28
|
-
setup()
|
29
|
-
|
30
|
-
runner_src1 = 'tests/a/test_thing.c'
|
31
|
-
runner_src2 = 'tests/b/test_another_thing.c'
|
32
|
-
runner_src3 = 'tests/b/test_and_another_thing.c'
|
33
|
-
runner1 = 'build/tests/runners/test_thing_runner.c'
|
34
|
-
runner2 = 'test_another_thing_runner.c'
|
35
|
-
runner3 = 'runners/test_another_thing_runner.c'
|
36
|
-
|
37
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
38
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
39
|
-
@rake.define_task(Rake::FileTask, runner_src1)
|
40
|
-
@rake.define_task(Rake::FileTask, runner_src2)
|
41
|
-
@rake.define_task(Rake::FileTask, runner_src3)
|
42
|
-
|
43
|
-
# set up expectations
|
44
|
-
@file_finder.expects.find_test_from_runner_path(runner1).returns(runner_src1)
|
45
|
-
@generator.expects.generate_test_runner(runner_src1, runner1)
|
46
|
-
@file_finder.expects.find_test_from_runner_path(runner2).returns(runner_src2)
|
47
|
-
@generator.expects.generate_test_runner(runner_src2, runner2)
|
48
|
-
@file_finder.expects.find_test_from_runner_path(runner3).returns(runner_src3)
|
49
|
-
@generator.expects.generate_test_runner(runner_src3, runner3)
|
50
|
-
|
51
|
-
# invoke the test runner creation rule under test
|
52
|
-
@rake[runner1].invoke
|
53
|
-
@rake[runner2].invoke
|
54
|
-
@rake[runner3].invoke
|
55
|
-
end
|
56
|
-
|
57
|
-
should "handle alternate prefixes, suffixes, and source extensions for test runner generation rule" do
|
58
|
-
redefine_global_constant('PROJECT_TEST_FILE_PREFIX', 'Test')
|
59
|
-
redefine_global_constant('TEST_RUNNER_FILE_SUFFIX', 'Runner')
|
60
|
-
redefine_global_constant('EXTENSION_SOURCE', '.x')
|
61
|
-
|
62
|
-
# reload rakefile with new global constants
|
63
|
-
setup()
|
64
|
-
|
65
|
-
runner_src1 = 'files/tests/TestOneTwoThree.x'
|
66
|
-
runner1 = 'build/runners/TestOneTwoThreeRunner.x'
|
67
|
-
|
68
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
69
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
70
|
-
@rake.define_task(Rake::FileTask, runner_src1)
|
71
|
-
|
72
|
-
# set up expectations
|
73
|
-
@file_finder.expects.find_test_from_runner_path(runner1).returns(runner_src1)
|
74
|
-
@generator.expects.generate_test_runner(runner_src1, runner1)
|
75
|
-
|
76
|
-
# invoke the test runner creation rule under test
|
77
|
-
@rake[runner1].invoke
|
78
|
-
end
|
79
|
-
|
80
|
-
##################################################
|
81
|
-
####### Compilation Object File Generation #######
|
82
|
-
##################################################
|
83
|
-
|
84
|
-
should "recognize missing object files, find their source, and execute rake tasks from the rule for object file generation" do
|
85
|
-
# default values as set in test_helper
|
86
|
-
redefine_global_constant('PROJECT_TEST_BUILD_OUTPUT_PATH', 'project/build/tests/output')
|
87
|
-
redefine_global_constant('EXTENSION_OBJECT', '.o')
|
88
|
-
|
89
|
-
# reload rakefile with new global constants
|
90
|
-
setup()
|
91
|
-
|
92
|
-
object_src1 = 'tests/a/test_thing.c'
|
93
|
-
object_src2 = 'tests/b/test_another_thing.c'
|
94
|
-
object_src3 = 'tests/b/test_and_another_thing.c'
|
95
|
-
object1 = 'project/build/tests/output/test_thing.o'
|
96
|
-
object2 = 'project/build/tests/output/test_another_thing_runner.o'
|
97
|
-
object3 = 'project/build/tests/output/test_and_another_thing.o'
|
98
|
-
|
99
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
100
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
101
|
-
@rake.define_task(Rake::FileTask, object_src1)
|
102
|
-
@rake.define_task(Rake::FileTask, object_src2)
|
103
|
-
@rake.define_task(Rake::FileTask, object_src3)
|
104
|
-
|
105
|
-
# set up expectations
|
106
|
-
@file_finder.expects.find_compilation_input_file(object1).returns(object_src1)
|
107
|
-
@generator.expects.generate_object_file(object_src1, object1)
|
108
|
-
@file_finder.expects.find_compilation_input_file(object2).returns(object_src2)
|
109
|
-
@generator.expects.generate_object_file(object_src2, object2)
|
110
|
-
@file_finder.expects.find_compilation_input_file(object3).returns(object_src3)
|
111
|
-
@generator.expects.generate_object_file(object_src3, object3)
|
112
|
-
|
113
|
-
# invoke the test object creation rule under test
|
114
|
-
@rake[object1].invoke
|
115
|
-
@rake[object2].invoke
|
116
|
-
@rake[object3].invoke
|
117
|
-
end
|
118
|
-
|
119
|
-
should "handle alternate build file paths and object file extensions for object generation rule" do
|
120
|
-
redefine_global_constant('PROJECT_TEST_BUILD_OUTPUT_PATH', 'build/stuff/out')
|
121
|
-
redefine_global_constant('EXTENSION_OBJECT', '.obj')
|
122
|
-
|
123
|
-
# reload rakefile with new global constants
|
124
|
-
setup()
|
125
|
-
|
126
|
-
object_src1 = 'tests/a/test_thing.c'
|
127
|
-
object1 = 'build/stuff/out/test_thing.obj'
|
128
|
-
|
129
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
130
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
131
|
-
@rake.define_task(Rake::FileTask, object_src1)
|
132
|
-
|
133
|
-
# set up expectations
|
134
|
-
@file_finder.expects.find_compilation_input_file(object1).returns(object_src1)
|
135
|
-
@generator.expects.generate_object_file(object_src1, object1)
|
136
|
-
|
137
|
-
# invoke the test runner creation rule under test
|
138
|
-
@rake[object1].invoke
|
139
|
-
end
|
140
|
-
|
141
|
-
##########################################
|
142
|
-
####### Executable File Generation #######
|
143
|
-
##########################################
|
144
|
-
|
145
|
-
should "recognize missing executable files, find their object files, and execute rake tasks from the rule for executable generation" do
|
146
|
-
# default values as set in test_helper
|
147
|
-
redefine_global_constant('PROJECT_TEST_BUILD_OUTPUT_PATH', 'project/build/tests/output')
|
148
|
-
redefine_global_constant('EXTENSION_EXECUTABLE', '.out')
|
149
|
-
|
150
|
-
# reload rakefile with new global constants
|
151
|
-
setup()
|
152
|
-
|
153
|
-
executable_prereqs1 = ['project/build/tests/output/unity.o', 'project/build/tests/output/mock_stuff.o', 'project/build/tests/output/thing.o']
|
154
|
-
executable_prereqs2 = ['project/build/tests/output/able.o', 'project/build/tests/output/unity.o']
|
155
|
-
executable1 = 'project/build/tests/output/test_thing.out'
|
156
|
-
executable2 = 'project/build/tests/output/test_able.out'
|
157
|
-
|
158
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
159
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
160
|
-
@rake.define_task(Rake::FileTask, executable_prereqs1[0])
|
161
|
-
@rake.define_task(Rake::FileTask, executable_prereqs1[1])
|
162
|
-
@rake.define_task(Rake::FileTask, executable_prereqs1[2])
|
163
|
-
@rake.define_task(Rake::FileTask, executable_prereqs2[0])
|
164
|
-
@rake.define_task(Rake::FileTask, executable_prereqs2[1])
|
165
|
-
|
166
|
-
task = @rake.define_task(Rake::FileTask, executable1)
|
167
|
-
task.enhance(executable_prereqs1)
|
168
|
-
task = @rake.define_task(Rake::FileTask, executable2)
|
169
|
-
task.enhance(executable_prereqs2)
|
170
|
-
|
171
|
-
# set up expectations
|
172
|
-
@generator.expects.generate_executable_file(executable_prereqs1, executable1)
|
173
|
-
@generator.expects.generate_executable_file(executable_prereqs2, executable2)
|
174
|
-
|
175
|
-
# invoke the test object creation rule under test
|
176
|
-
@rake[executable1].invoke
|
177
|
-
@rake[executable2].invoke
|
178
|
-
end
|
179
|
-
|
180
|
-
should "handle alternate build file paths and executable extensions for executable generation rule" do
|
181
|
-
# default values as set in test_helper
|
182
|
-
redefine_global_constant('PROJECT_TEST_BUILD_OUTPUT_PATH', 'build/dump')
|
183
|
-
redefine_global_constant('EXTENSION_EXECUTABLE', '.exe')
|
184
|
-
|
185
|
-
# reload rakefile with new global constants
|
186
|
-
setup()
|
187
|
-
|
188
|
-
executable_prereqs1 = ['project/build/tests/output/able.o', 'project/build/tests/output/unity.o']
|
189
|
-
executable1 = 'build/dump/test_able.exe'
|
190
|
-
|
191
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
192
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
193
|
-
@rake.define_task(Rake::FileTask, executable_prereqs1[0])
|
194
|
-
@rake.define_task(Rake::FileTask, executable_prereqs1[1])
|
195
|
-
|
196
|
-
task = @rake.define_task(Rake::FileTask, executable1)
|
197
|
-
task.enhance(executable_prereqs1)
|
198
|
-
|
199
|
-
# set up expectations
|
200
|
-
@generator.expects.generate_executable_file(executable_prereqs1, executable1)
|
201
|
-
|
202
|
-
# invoke the test object creation rule under test
|
203
|
-
@rake[executable1].invoke
|
204
|
-
end
|
205
|
-
|
206
|
-
###############################################################
|
207
|
-
####### Test Pass File Generation (i.e. execute a test) #######
|
208
|
-
###############################################################
|
209
|
-
|
210
|
-
should "recognize missing test pass files, find the test executable, and execute rake tasks from the rule for test result generation" do
|
211
|
-
# default values as set in test_helper
|
212
|
-
redefine_global_constant('PROJECT_TEST_RESULTS_PATH', 'project/build/tests/results')
|
213
|
-
redefine_global_constant('EXTENSION_TESTPASS', '.pass')
|
214
|
-
|
215
|
-
# reload rakefile with new global constants
|
216
|
-
setup()
|
217
|
-
|
218
|
-
pass_results_src1 = 'project/build/tests/output/test_thing.exe'
|
219
|
-
pass_results_src2 = 'project/build/tests/output/test_another_thing.exe'
|
220
|
-
pass_results_src3 = 'project/build/tests/output/test_and_another_thing.exe'
|
221
|
-
pass_results1 = 'project/build/tests/results/test_thing.pass'
|
222
|
-
pass_results2 = 'project/build/tests/results/test_another_thing_runner.pass'
|
223
|
-
pass_results3 = 'project/build/tests/results/test_and_another_thing.pass'
|
224
|
-
|
225
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
226
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
227
|
-
@rake.define_task(Rake::FileTask, pass_results_src1)
|
228
|
-
@rake.define_task(Rake::FileTask, pass_results_src2)
|
229
|
-
@rake.define_task(Rake::FileTask, pass_results_src3)
|
230
|
-
|
231
|
-
# set up expectations
|
232
|
-
@file_path_utils.expects.form_executable_filepath(pass_results1).returns(pass_results_src1)
|
233
|
-
@generator.expects.generate_test_results(pass_results_src1, pass_results1)
|
234
|
-
@file_path_utils.expects.form_executable_filepath(pass_results2).returns(pass_results_src2)
|
235
|
-
@generator.expects.generate_test_results(pass_results_src2, pass_results2)
|
236
|
-
@file_path_utils.expects.form_executable_filepath(pass_results3).returns(pass_results_src3)
|
237
|
-
@generator.expects.generate_test_results(pass_results_src3, pass_results3)
|
238
|
-
|
239
|
-
# invoke the test pass results creation rule under test
|
240
|
-
@rake[pass_results1].invoke
|
241
|
-
@rake[pass_results2].invoke
|
242
|
-
@rake[pass_results3].invoke
|
243
|
-
end
|
244
|
-
|
245
|
-
should "handle alternate test results file paths and test pass file extensions for test results generation rule" do
|
246
|
-
# default values as set in test_helper
|
247
|
-
redefine_global_constant('PROJECT_TEST_RESULTS_PATH', 'project/test_run')
|
248
|
-
redefine_global_constant('EXTENSION_TESTPASS', '.testpass')
|
249
|
-
|
250
|
-
# reload rakefile with new global constants
|
251
|
-
setup()
|
252
|
-
|
253
|
-
pass_results_src1 = 'project/build/tests/output/test_thing.exe'
|
254
|
-
pass_results1 = 'project/test_run/test_thing.testpass'
|
255
|
-
|
256
|
-
# fake out rake so it won't look for the test files on disk and find they don't exist.
|
257
|
-
# by creating file tasks we're telling rake there's a means to create these files that don't exist (but we never use the mechanism).
|
258
|
-
@rake.define_task(Rake::FileTask, pass_results_src1)
|
259
|
-
|
260
|
-
# set up expectations
|
261
|
-
@file_path_utils.expects.form_executable_filepath(pass_results1).returns(pass_results_src1)
|
262
|
-
@generator.expects.generate_test_results(pass_results_src1, pass_results1)
|
263
|
-
|
264
|
-
# invoke the test pass results creation rule under test
|
265
|
-
@rake[pass_results1].invoke
|
266
|
-
end
|
267
|
-
|
268
|
-
end
|