ceedling 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/GIT_COMMIT_SHA +1 -1
- data/README.md +57 -58
- data/Rakefile +5 -3
- data/assets/features/ceedling +1 -1
- data/assets/fixtures/test_source_file_duplicate_basenames/test_calc_typo.c +14 -0
- data/assets/fixtures/tests_with_duplicate_test_names/test_foo.c +21 -0
- data/bin/actionator.rb +6 -12
- data/bin/app_cfg.rb +35 -1
- data/bin/ceedling +13 -3
- data/bin/cli.rb +25 -6
- data/bin/cli_handler.rb +119 -73
- data/bin/cli_helper.rb +56 -78
- data/bin/installation_selector.rb +81 -0
- data/bin/launchinator.rb +69 -0
- data/bin/mixin_resolvinator.rb +26 -36
- data/bin/objects.yml +13 -0
- data/bin/path_validator.rb +25 -29
- data/bin/versionator.rb +47 -48
- data/ceedling.gemspec +19 -15
- data/docs/BreakingChanges.md +70 -1
- data/docs/Changelog.md +84 -3
- data/docs/KnownIssues.md +90 -4
- data/docs/ReleaseNotes.md +13 -0
- data/docs/overrides/main.html +11 -8
- data/lib/ceedling/build_log_writer.rb +33 -0
- data/lib/ceedling/config/build_root_policy.rb +70 -0
- data/lib/ceedling/config/configurator.rb +19 -18
- data/lib/ceedling/config/configurator_builder.rb +58 -28
- data/lib/ceedling/config/configurator_paths_validator.rb +179 -0
- data/lib/ceedling/config/configurator_plugins.rb +1 -1
- data/lib/ceedling/config/configurator_setup.rb +39 -41
- data/lib/ceedling/config/configurator_validator.rb +1 -110
- data/lib/ceedling/defaults.rb +4 -4
- data/lib/ceedling/dependencies/README.md +18 -16
- data/lib/ceedling/dependencies/dependency_cache_store.rb +20 -3
- data/lib/ceedling/dependencies/dependency_hasher.rb +35 -1
- data/lib/ceedling/filename_extension.rb +7 -1
- data/lib/ceedling/filesystem/FILE_TREE.md +253 -0
- data/lib/ceedling/filesystem/PATH_HANDLING.md +304 -0
- data/lib/ceedling/filesystem/README.md +41 -0
- data/lib/ceedling/filesystem/build_subpath.rb +102 -0
- data/lib/ceedling/filesystem/destination_collision.rb +25 -0
- data/lib/ceedling/{file_finder.rb → filesystem/file_finder.rb} +159 -104
- data/lib/ceedling/{file_finder_helper.rb → filesystem/file_finder_helper.rb} +36 -31
- data/lib/ceedling/filesystem/file_path_collection_utils.rb +183 -0
- data/lib/ceedling/{file_path_utils.rb → filesystem/file_path_utils.rb} +108 -97
- data/lib/ceedling/{file_system_wrapper.rb → filesystem/file_system_wrapper.rb} +6 -5
- data/lib/ceedling/filesystem/file_tree.rb +241 -0
- data/lib/ceedling/{file_wrapper.rb → filesystem/file_wrapper.rb} +65 -28
- data/lib/ceedling/filesystem/path_exclusions.rb +30 -0
- data/lib/ceedling/{path_matcher.rb → filesystem/path_matcher.rb} +27 -23
- data/lib/ceedling/{path_mirror.rb → filesystem/path_mirror.rb} +19 -18
- data/lib/ceedling/filesystem/path_spellings.rb +55 -0
- data/lib/ceedling/filesystem/project_paths.rb +184 -0
- data/lib/ceedling/filesystem/working_dir.rb +40 -0
- data/lib/ceedling/generators/generator.rb +5 -6
- data/lib/ceedling/generators/generator_partials.rb +1 -1
- data/lib/ceedling/generators/generator_test_results_backtrace.rb +7 -7
- data/lib/ceedling/handoff.rb +121 -0
- data/lib/ceedling/includes/include_factory.rb +3 -3
- data/lib/ceedling/includes/include_pathinator.rb +67 -10
- data/lib/ceedling/includes/includes.rb +1 -1
- data/lib/ceedling/installation.rb +92 -0
- data/lib/ceedling/library_resolver.rb +99 -0
- data/lib/ceedling/objects.yml +23 -2
- data/lib/ceedling/partials/partializer.rb +4 -4
- data/lib/ceedling/partials/partializer_config.rb +3 -1
- data/lib/ceedling/plugins/report_log_writer_plugin.rb +3 -5
- data/lib/ceedling/preprocess/preprocessinator_file_assembler.rb +1 -1
- data/lib/ceedling/preprocess/preprocessinator_includes_handler.rb +1 -1
- data/lib/ceedling/preprocess/preprocessinator_line_marker_includes_extractor.rb +1 -1
- data/lib/ceedling/rake_app/rakefile_component_resolver.rb +10 -17
- data/lib/ceedling/rake_app/test_task_name.rb +29 -0
- data/lib/ceedling/rakefile.rb +16 -1
- data/lib/ceedling/rakefiles/base/tasks_base.rake +1 -1
- data/lib/ceedling/rakefiles/release/rules_release.rake +4 -7
- data/lib/ceedling/rakefiles/tests/rules_tests.rake +3 -20
- data/lib/ceedling/rakefiles/tests/rules_tests_generate.rake +4 -30
- data/lib/ceedling/release_invoker/release_build_executor.rb +33 -44
- data/lib/ceedling/release_invoker/release_build_planner.rb +14 -6
- data/lib/ceedling/reportinator.rb +3 -4
- data/lib/ceedling/setupinator.rb +95 -87
- data/lib/ceedling/test_context_extractor.rb +5 -1
- data/lib/ceedling/test_invoker/PIPELINE.md +9 -7
- data/lib/ceedling/test_invoker/mock_locator.rb +60 -2
- data/lib/ceedling/test_invoker/partials_manager.rb +12 -0
- data/lib/ceedling/test_invoker/standin_headerinator.rb +22 -13
- data/lib/ceedling/test_invoker/test_build_executor.rb +42 -41
- data/lib/ceedling/test_invoker/test_build_planner.rb +37 -18
- data/lib/ceedling/test_invoker/test_build_setup.rb +17 -12
- data/lib/ceedling/test_invoker/test_build_validations.rb +16 -31
- data/lib/ceedling/test_invoker/test_file_preprocessinator.rb +1 -1
- data/lib/ceedling/test_invoker/test_invoker.rb +6 -1
- data/lib/ceedling/test_invoker/test_pipeline_helpers.rb +1 -1
- data/lib/ceedling/test_invoker/test_source_file_directive_resolver.rb +40 -20
- data/lib/ceedling/tool_executor.rb +9 -3
- data/lib/ceedling/yaml_wrapper.rb +3 -2
- data/lib/version.rb +1 -1
- data/plugins/bullseye/bullseye.rake +6 -9
- data/plugins/bullseye/config/defaults_bullseye.rb +1 -1
- data/plugins/bullseye/lib/bullseye.rb +9 -7
- data/plugins/cppcheck/config/defaults_cppcheck.rb +1 -1
- data/plugins/dependencies/config/defaults.yml +6 -6
- data/plugins/dependencies/dependencies.rake +4 -1
- data/plugins/dependencies/lib/dependencies.rb +18 -8
- data/plugins/dependencies/lib/dependency_spec.rb +17 -5
- data/plugins/fff/lib/fff.rb +45 -39
- data/plugins/fff/spec/fff_cmock_wrapper_spec.rb +128 -0
- data/plugins/gcov/config/defaults_gcov.rb +1 -1
- data/plugins/gcov/gcov.rake +6 -9
- data/plugins/gcov/lib/console_reportinator.rb +4 -18
- data/plugins/gcov/lib/gcov.rb +9 -2
- data/plugins/gcov/lib/gcovr_reportinator.rb +8 -40
- data/plugins/gcov/lib/gcovr_thresholds.rb +74 -0
- data/plugins/gcov/lib/reportgenerator_reportinator.rb +1 -1
- data/plugins/module_generator/lib/module_generator.rb +3 -3
- data/plugins/report_tests_teamcity_stdout/lib/report_tests_teamcity_stdout.rb +53 -80
- data/plugins/sanitize/lib/sanitize_records.rb +3 -6
- data/plugins/sanitize/sanitize.rake +6 -6
- data/plugins/valgrind/lib/valgrind.rb +14 -7
- data/plugins/valgrind/valgrind.rake +6 -6
- data/site-local/404.html +6 -20
- data/site-local/assets/javascripts/{bundle.d7400e89.min.js → bundle.c21346df.min.js} +3 -3
- data/site-local/assets/javascripts/{bundle.d7400e89.min.js.map → bundle.c21346df.min.js.map} +2 -2
- data/site-local/assets/javascripts/workers/{search.2c215733.min.js → search.a7633da7.min.js} +2 -2
- data/site-local/assets/javascripts/workers/{search.2c215733.min.js.map → search.a7633da7.min.js.map} +1 -1
- data/site-local/assets/stylesheets/main.57a0d79d.min.css +6 -0
- data/site-local/assets/stylesheets/main.57a0d79d.min.css.map +1 -0
- data/site-local/assets/stylesheets/palette.fb2fffe2.min.css +4 -0
- data/site-local/assets/stylesheets/palette.fb2fffe2.min.css.map +1 -0
- data/site-local/configuration/environment-vars.html +6 -20
- data/site-local/configuration/global-collections.html +6 -20
- data/site-local/configuration/index.html +6 -20
- data/site-local/configuration/loading.html +6 -20
- data/site-local/configuration/mixins.html +10 -24
- data/site-local/configuration/parallel-builds.html +6 -20
- data/site-local/configuration/project-file.html +8 -22
- data/site-local/configuration/reference/cexception.html +6 -20
- data/site-local/configuration/reference/cmock.html +8 -21
- data/site-local/configuration/reference/defines.html +16 -30
- data/site-local/configuration/reference/environment.html +10 -24
- data/site-local/configuration/reference/extension.html +6 -20
- data/site-local/configuration/reference/files.html +22 -30
- data/site-local/configuration/reference/flags.html +13 -27
- data/site-local/configuration/reference/index.html +6 -20
- data/site-local/configuration/reference/libraries.html +27 -23
- data/site-local/configuration/reference/mixins.html +6 -20
- data/site-local/configuration/reference/partials.html +6 -20
- data/site-local/configuration/reference/paths.html +38 -29
- data/site-local/configuration/reference/plugins.html +6 -20
- data/site-local/configuration/reference/project.html +32 -36
- data/site-local/configuration/reference/release-build.html +8 -20
- data/site-local/configuration/reference/test-build.html +6 -20
- data/site-local/configuration/reference/test-runner.html +6 -20
- data/site-local/configuration/reference/tools.html +27 -32
- data/site-local/configuration/reference/unity.html +6 -20
- data/site-local/configuration/which-ceedling.html +383 -37
- data/site-local/development/index.html +6 -20
- data/site-local/development/plugins/configuration.html +6 -20
- data/site-local/development/plugins/index.html +6 -20
- data/site-local/development/plugins/plugin-subclass.html +54 -68
- data/site-local/development/plugins/rake-tasks.html +8 -22
- data/site-local/development/releases.html +84 -29
- data/site-local/development/workflow.html +62 -71
- data/site-local/getting-started/builds.html +8 -20
- data/site-local/getting-started/command-line.html +62 -24
- data/site-local/getting-started/example-projects/cipher-quest.html +6 -20
- data/site-local/getting-started/example-projects/index.html +6 -20
- data/site-local/getting-started/example-projects/temp-sensor.html +6 -20
- data/site-local/getting-started/example-projects/wondrous-forest.html +6 -20
- data/site-local/getting-started/index.html +6 -20
- data/site-local/getting-started/installation.html +6 -20
- data/site-local/getting-started/quick-start.html +6 -20
- data/site-local/help.html +6 -20
- data/site-local/index.html +11 -24
- data/site-local/overview/build-system.html +6 -20
- data/site-local/overview/index.html +6 -20
- data/site-local/overview/test-environments.html +6 -20
- data/site-local/overview/tools-and-frameworks.html +6 -20
- data/site-local/plugins/beep.html +6 -20
- data/site-local/plugins/bullseye/index.html +13 -24
- data/site-local/plugins/bullseye/licensing.html +14 -28
- data/site-local/plugins/command-hooks.html +8 -22
- data/site-local/plugins/compile-commands-json-db.html +6 -20
- data/site-local/plugins/cppcheck.html +8 -22
- data/site-local/plugins/dependencies.html +16 -27
- data/site-local/plugins/fff.html +49 -32
- data/site-local/plugins/gcov/examples.html +7 -21
- data/site-local/plugins/gcov/gcovr.html +22 -33
- data/site-local/plugins/gcov/index.html +6 -20
- data/site-local/plugins/gcov/overview.html +9 -20
- data/site-local/plugins/gcov/reportgenerator.html +9 -23
- data/site-local/plugins/gcov/reporting.html +6 -20
- data/site-local/plugins/gcov/setup.html +8 -21
- data/site-local/plugins/gcov/tool-versions.html +6 -20
- data/site-local/plugins/gcov/troubleshooting.html +10 -24
- data/site-local/plugins/index.html +6 -20
- data/site-local/plugins/module-generator.html +21 -35
- data/site-local/plugins/report-build-warnings-log.html +53 -67
- data/site-local/plugins/report-tests-gtestlike-stdout.html +6 -20
- data/site-local/plugins/report-tests-ide-stdout.html +43 -57
- data/site-local/plugins/report-tests-log-factory.html +50 -64
- data/site-local/plugins/report-tests-pretty-stdout.html +7 -21
- data/site-local/plugins/report-tests-raw-output-log.html +9 -21
- data/site-local/plugins/report-tests-teamcity-stdout.html +20 -31
- data/site-local/plugins/sanitize.html +56 -65
- data/site-local/plugins/valgrind.html +49 -58
- data/site-local/project/index.html +6 -20
- data/site-local/project/release-history.html +6 -20
- data/site-local/project/sbom.html +6 -20
- data/site-local/project/upgrade.html +9 -20
- data/site-local/reference/build-directives.html +6 -20
- data/site-local/reference/command-line.html +15 -22
- data/site-local/reference/environment-vars.html +6 -20
- data/site-local/reference/gcov-plugin.html +6 -20
- data/site-local/reference/global-collections.html +6 -20
- data/site-local/reference/index.html +6 -20
- data/site-local/reference/partials-macros.html +6 -20
- data/site-local/reference/project-configuration.html +6 -20
- data/site-local/sitemap.xml.gz +0 -0
- data/site-local/snapshot/examples/cipher_quest/index.html +16 -30
- data/site-local/snapshot/examples/temp_sensor/index.html +8 -22
- data/site-local/snapshot/examples/wondrous_forest/index.html +6 -20
- data/site-local/snapshot/plugins/bullseye/config/defaults_bullseye.rb +1 -1
- data/site-local/snapshot/plugins/gcov/config/defaults_gcov.rb +1 -1
- data/site-local/testing-guide/build-directives.html +14 -28
- data/site-local/testing-guide/conventions.html +66 -27
- data/site-local/testing-guide/frameworks.html +11 -25
- data/site-local/testing-guide/index.html +6 -20
- data/site-local/testing-guide/partials/configuration.html +8 -22
- data/site-local/testing-guide/partials/conventions.html +8 -22
- data/site-local/testing-guide/partials/directives.html +16 -30
- data/site-local/testing-guide/partials/example.html +14 -28
- data/site-local/testing-guide/partials/index.html +6 -20
- data/site-local/testing-guide/partials/overview.html +6 -20
- data/site-local/testing-guide/partials/variables.html +11 -25
- data/site-local/testing-guide/test-cases.html +13 -27
- data/site-local/testing-guide/test-sample.html +12 -26
- data/site-local/testing-guide/test-suite-anatomy.html +6 -20
- data/spec/integration/actionator_file_operations_spec.rb +91 -1
- data/spec/integration/compile_commands_json_db_spec.rb +1 -1
- data/spec/integration/configurator_pipeline_spec.rb +10 -0
- data/spec/integration/configurator_validation_spec.rb +1 -1
- data/spec/integration/dependencies/dependency_tracker_cache_hardening_spec.rb +26 -0
- data/spec/integration/dependencies/dependency_tracker_core_spec.rb +62 -0
- data/spec/integration/launcher_handoff_spec.rb +297 -0
- data/spec/integration/mixin_loading_spec.rb +1 -1
- data/spec/integration/module_generator_spec.rb +3 -3
- data/spec/integration/nested_test_artifacts_spec.rb +99 -0
- data/spec/integration/partials_module_resolution_spec.rb +7 -4
- data/spec/integration/path_intake_scenarios_spec.rb +101 -0
- data/spec/integration/path_scenarios_spec.rb +322 -0
- data/spec/integration/quote_include_isolator_spec.rb +1 -1
- data/spec/integration/rake_task_registry_plugins_spec.rb +95 -0
- data/spec/integration/report_build_warnings_log_spec.rb +1 -1
- data/spec/integration/report_tests_log_factory_spec.rb +1 -1
- data/spec/integration/test_executable_manifest_spec.rb +1 -1
- data/spec/integration/test_includes_extractinator_spec.rb +2 -1
- data/spec/integration/test_naming_spec.rb +198 -0
- data/spec/integration/test_source_file_checks_spec.rb +166 -0
- data/spec/integration/tool_validator_spec.rb +1 -1
- data/spec/integration/upgrade_docs_spec.rb +84 -0
- data/spec/integration/vendor_copy_transient_io_retry_spec.rb +192 -75
- data/spec/support/file_tree_helper.rb +88 -0
- data/spec/support/integration/configurator_integration_helper.rb +10 -7
- data/spec/support/integration/dependency_tracker_integration_helper.rb +1 -1
- data/spec/support/integration/partials_generation_integration_helper.rb +2 -2
- data/spec/support/integration/path_scenario_harness.rb +173 -0
- data/spec/support/integration/spec_integration_helper.rb +1 -1
- data/spec/support/integration/test_includes_harness.rb +13 -2
- data/spec/support/spec_helper.rb +2 -0
- data/spec/support/system/spec_system_helper.rb +7 -6
- data/spec/support/system/system_context.rb +21 -3
- data/spec/support/working_dir_tracking.rb +49 -0
- data/spec/system/build_output_mirroring_spec.rb +2 -2
- data/spec/system/conditional_mock_includes_spec.rb +1 -1
- data/spec/system/delta_builds_spec.rb +137 -11
- data/spec/system/gcov_deployment_spec.rb +1 -0
- data/spec/system/header_include_path_validation_spec.rb +4 -4
- data/spec/system/launcher_handoff_spec.rb +82 -0
- data/spec/system/mock_include_folders_spec.rb +91 -0
- data/spec/system/parent_directory_reference_spec.rb +5 -3
- data/spec/system/path_handling_probes_spec.rb +192 -0
- data/spec/system/preprocessing_parameterized_tests_spec.rb +1 -1
- data/spec/system/rake_release_task_path_disambiguation_spec.rb +6 -6
- data/spec/system/rake_test_task_path_disambiguation_spec.rb +85 -0
- data/spec/system/special_path_characters_spec.rb +86 -0
- data/spec/system/support/common_test_cases.rb +23 -21
- data/spec/system/support/gcov_common_test_cases.rb +37 -9
- data/spec/system/support/sanitize_common_test_cases.rb +2 -2
- data/spec/system/support/valgrind_common_test_cases.rb +12 -12
- data/spec/system/test_pipeline_stop_points_spec.rb +4 -4
- data/spec/system/test_runner_system_include_spec.rb +1 -1
- data/spec/system/test_source_file_directive_spec.rb +34 -5
- data/spec/units/bin/actionator_spec.rb +14 -17
- data/spec/units/bin/app_cfg_spec.rb +47 -0
- data/spec/units/bin/cli_handler_spec.rb +284 -7
- data/spec/units/bin/cli_helper_spec.rb +126 -45
- data/spec/units/bin/installation_selector_spec.rb +114 -0
- data/spec/units/bin/launchinator_spec.rb +171 -0
- data/spec/units/bin/path_validator_spec.rb +10 -0
- data/spec/units/bin/versionator_spec.rb +38 -6
- data/spec/units/build_log_writer_spec.rb +57 -0
- data/spec/units/config/build_root_policy_spec.rb +61 -0
- data/spec/units/config/configurator_builder_spec.rb +37 -6
- data/spec/units/config/configurator_paths_validator_spec.rb +292 -0
- data/spec/units/config/configurator_setup_spec.rb +65 -103
- data/spec/units/config/configurator_spec.rb +37 -6
- data/spec/units/config/configurator_validator_spec.rb +1 -172
- data/spec/units/default_tools_quoting_spec.rb +83 -0
- data/spec/units/dependencies/dependency_cache_store_spec.rb +33 -2
- data/spec/units/dependencies/dependency_debug_tree_spec.rb +1 -1
- data/spec/units/dependencies/dependency_hasher_spec.rb +42 -1
- data/spec/units/dependencies/dependency_path_normalizer_spec.rb +1 -1
- data/spec/units/dependencies/dependency_tracker_spec.rb +3 -1
- data/spec/units/filename_extension_spec.rb +11 -0
- data/spec/units/filesystem/build_subpath_spec.rb +122 -0
- data/spec/units/filesystem/destination_collision_spec.rb +30 -0
- data/spec/units/{file_finder_helper_spec.rb → filesystem/file_finder_helper_spec.rb} +46 -1
- data/spec/units/{file_finder_spec.rb → filesystem/file_finder_spec.rb} +188 -22
- data/spec/units/{file_path_collection_utils_spec.rb → filesystem/file_path_collection_utils_spec.rb} +181 -1
- data/spec/units/{file_path_utils_spec.rb → filesystem/file_path_utils_spec.rb} +204 -87
- data/spec/units/filesystem/file_system_wrapper_spec.rb +33 -0
- data/spec/units/filesystem/file_tree_spec.rb +511 -0
- data/spec/units/filesystem/file_tree_windows_spec.rb +78 -0
- data/spec/units/{file_wrapper_spec.rb → filesystem/file_wrapper_spec.rb} +154 -32
- data/spec/units/{path_matcher_spec.rb → filesystem/path_matcher_spec.rb} +12 -1
- data/spec/units/{path_mirror_spec.rb → filesystem/path_mirror_spec.rb} +32 -4
- data/spec/units/filesystem/project_paths_spec.rb +147 -0
- data/spec/units/filesystem/working_dir_spec.rb +71 -0
- data/spec/units/generators/generator_spec.rb +12 -6
- data/spec/units/generators/generator_test_results_backtrace_spec.rb +50 -46
- data/spec/units/generators/generator_test_results_spec.rb +1 -1
- data/spec/units/handoff_spec.rb +205 -0
- data/spec/units/includes/include_factory_spec.rb +3 -3
- data/spec/units/includes/include_pathinator_spec.rb +46 -0
- data/spec/units/installation_spec.rb +228 -0
- data/spec/units/library_resolver_spec.rb +157 -0
- data/spec/units/mock_locator_spec.rb +76 -1
- data/spec/units/partials/partializer_config_spec.rb +7 -0
- data/spec/units/partials/partializer_spec.rb +1 -0
- data/spec/units/partials_manager_spec.rb +17 -0
- data/spec/units/plugins/bullseye_spec.rb +15 -2
- data/spec/units/plugins/console_reportinator_spec.rb +18 -20
- data/spec/units/plugins/dependencies_spec.rb +33 -7
- data/spec/units/plugins/dependency_spec_spec.rb +17 -0
- data/spec/units/plugins/gcov_spec.rb +28 -3
- data/spec/units/plugins/gcovr_reportinator_spec.rb +19 -47
- data/spec/units/plugins/gcovr_thresholds_spec.rb +95 -0
- data/spec/units/plugins/module_generator_spec.rb +5 -5
- data/spec/units/plugins/report_build_warnings_log_spec.rb +3 -3
- data/spec/units/plugins/report_log_writer_plugin_spec.rb +10 -1
- data/spec/units/plugins/report_tests_raw_output_log_spec.rb +13 -2
- data/spec/units/plugins/report_tests_teamcity_stdout_spec.rb +77 -3
- data/spec/units/plugins/reportgenerator_reportinator_spec.rb +1 -1
- data/spec/units/plugins/sanitize_records_spec.rb +3 -1
- data/spec/units/plugins/sanitize_spec.rb +1 -1
- data/spec/units/plugins/valgrind_spec.rb +23 -8
- data/spec/units/preprocess/preprocessinator_comment_stripper_spec.rb +1 -1
- data/spec/units/rake_app/rakefile_component_resolver_spec.rb +21 -0
- data/spec/units/rake_app/test_task_name_spec.rb +47 -0
- data/spec/units/release_build_executor_spec.rb +53 -14
- data/spec/units/release_build_planner_spec.rb +15 -3
- data/spec/units/reportinator_spec.rb +5 -5
- data/spec/units/standin_headerinator_spec.rb +31 -1
- data/spec/units/test_build_executor_spec.rb +107 -5
- data/spec/units/test_build_planner_spec.rb +104 -2
- data/spec/units/test_build_setup_spec.rb +96 -12
- data/spec/units/test_context_extractor_spec.rb +25 -0
- data/spec/units/test_file_preprocessinator_spec.rb +17 -1
- data/spec/units/test_includes_extractinator_spec.rb +5 -1
- data/spec/units/test_invoker/objects_wiring_spec.rb +6 -3
- data/spec/units/test_invoker_spec.rb +14 -1
- data/spec/units/test_source_file_directive_resolver_spec.rb +38 -7
- data/spec/units/tool_executor_spec.rb +26 -0
- data/spec/units/yaml_wrapper_spec.rb +11 -0
- metadata +122 -33
- data/lib/ceedling/file_path_collection_utils.rb +0 -164
- data/site-local/assets/stylesheets/main.ec1eaa64.min.css +0 -1
- data/site-local/assets/stylesheets/main.ec1eaa64.min.css.map +0 -1
- data/site-local/assets/stylesheets/palette.ab4e12ef.min.css +0 -1
- data/site-local/assets/stylesheets/palette.ab4e12ef.min.css.map +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea37cd2499cbbf39a49993a77cd3e1fbe6a5e1777b70b8ba4ed1fff23823a446
|
|
4
|
+
data.tar.gz: 7dabe29c6ccc55ee156da20783cae2a52496e4efcee00ded8c5259b24128c57c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7990a5a91fbd7eb56b476f7c71236cc1774eb914d41a24e8774ba534ef56cf29155b8edd8e3968152899c1fdbe266258fe8c7e738502b79deb78b6c405b14c2a
|
|
7
|
+
data.tar.gz: 66de8b40c53aadb9ea483dd8d2c9a2deecbc6034ca4075720ac996b77220ea542c16845f019533b825fc243a95624dd7a314b9163939c1f8b4dd0dd37a9cfce1
|
data/GIT_COMMIT_SHA
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3b30ae3
|
data/README.md
CHANGED
|
@@ -1,25 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://www.bestpractices.dev/projects/15117) [](https://docs.throwtheswitch.org/Ceedling/) [](https://throwtheswitch.discourse.group) 
|
|
2
2
|
========
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
# 🌱 Ceedling is a handy-dandy build system for C projects
|
|
5
|
+
|
|
6
|
+
## Developer-friendly release _and_ test builds
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
not yet updated.
|
|
8
|
+
Ceedling can build your release artifact but is especially adept at building
|
|
9
|
+
unit test suites for your C projects — even in tricky embedded systems.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
⭐️ **Eager to just get going? Jump to
|
|
12
|
+
[📚 Documentation & Learning](#-documentation--learning) and
|
|
13
|
+
[🚀 Getting Started](#-getting-started).**
|
|
14
|
+
|
|
15
|
+
For a test suite project using the default toolchain `gcc`, Ceedling’s
|
|
16
|
+
configuration file could be as simple as this:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
:project:
|
|
20
|
+
:build_root: project/build/
|
|
21
|
+
|
|
22
|
+
:paths:
|
|
23
|
+
:test:
|
|
24
|
+
- tests/**
|
|
25
|
+
:source:
|
|
26
|
+
- source/**
|
|
27
|
+
:include:
|
|
28
|
+
- inc/**
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
To execute all your unit tests, you would run `ceedling test:all`. That‘s it!
|
|
32
|
+
|
|
33
|
+
Ceedling works the way developers want to work. It is flexible and entirely
|
|
34
|
+
command-line driven. It drives code generation and command line tools for you.
|
|
35
|
+
All generated and framework code is easy to see and understand.
|
|
36
|
+
|
|
37
|
+
Ceedling’s features support all types of C development from low-level embedded
|
|
38
|
+
to enterprise systems. No tool is perfect, but Ceedling can do a whole lot to
|
|
39
|
+
help you and your team produce quality software.
|
|
40
|
+
|
|
41
|
+
## Ceedling 1.2.2 is the latest and greatest
|
|
42
|
+
|
|
43
|
+
See [_Changelog_](docs/Changelog.md), [_Release Notes_][release-notes], [_Breaking Changes_][breaking-changes], and [_Known Issues_][known-issues].
|
|
12
44
|
|
|
13
45
|
**New goodies in 1.2.0:**
|
|
14
46
|
* **[Delta builds][delta-builds]** have been restored after a temporary hiatus following a major refactoring for 1.0.0. A [delta build][delta-build-overview] is simply a build run that only performs regeneration, compilation, or linking as needed because of changed files. [Delta builds][delta-builds] are automatic with no configuration and complement [parallel builds][parallel-builds] introduced in 1.0.0 for build time speedups.
|
|
15
47
|
* **`#include` relative paths & duplicate filename disambiguation**. Ceedling now fully supports [relative paths in `#include` directives][same-named-files] and [`TEST_SOURCE_FILE()` build directive macros][test-source-file]. Ceedling is now also able to distinguish files of the same name using paths in the preceding and [at the command line][test-path-task] to distinguish test files of the same name (e.g. `ceedling test:foo/file` vs. `ceedling test:bar/file`).
|
|
16
48
|
* **Multiple file extensions per file type.** You may now provide a list of file types via [`:extensions`][extension-config] to gather files into your project’s build. For instance, the extensions `.c` and `.cc` can now both be used together to collect all source file in your project.
|
|
17
49
|
* **Shuffled test order.** Ceedling now supports [Unity’s][unity-framework] randomized test case ordering (via a [`:unity` configuration setting][shuffle-tests]). [Delta builds][delta-builds] automatically adjust to always rerun test executables so test case ordering is shuffled.
|
|
18
|
-
* The [`TEST_SOURCE_FILE()` build directive macro][test-source-file-subtractive] can now be used to remove source files from a test executable build. This can be handy in overriding [Ceedling’s conventions][header-source-convention] for associating source files with a test executable if your project structure does not match up with
|
|
19
|
-
* The [
|
|
20
|
-
* [
|
|
50
|
+
* The **[`TEST_SOURCE_FILE()` build directive macro][test-source-file-subtractive]** can now be used to remove source files from a test executable build. This can be handy in overriding [Ceedling’s conventions][header-source-convention] for associating source files with a test executable if your project structure does not match up with Ceedling’s conventions.
|
|
51
|
+
* The **new [Sanitize plugin][sanitize-plugin]** builds and runs tests with ASan, UBSan, and LeakSanitizer, naming each finding where a test fails and writing text, JSON, and SARIF reports.
|
|
52
|
+
* The **[build warnings]**, **[JUnit report]**, **[IDE integration]**, **[GoogleTest report]**, **[module generator]**, and **[dependencies]** plugins all received numerous bug fixes and feature expansions.
|
|
53
|
+
* **[Bullseye code coverage plugin][bullseye-plugin]** re-enabled and modernized (disabled since 1.0.0).
|
|
21
54
|
* **Dedicated mocks and test runner generation build tasks.** It is now possible to run the test build pipeline only up through generating mocks or test runners without running the rest of a build using `ceedling gen:mocks:<test>` and `ceedling gen:test_runner:<test>` mirroring the convention of `test:` tasks.
|
|
22
|
-
* Ceedling prerelease and release builds now automatically [generate Software Bills of Material][sbom-docs] (SBOMs) and attach them to GitHub pre/releases along with the final Ruby gem.
|
|
55
|
+
* Ceedling prerelease and release builds now automatically **[generate Software Bills of Material][sbom-docs]** (SBOMs) and attach them to GitHub pre/releases along with the final Ruby gem.
|
|
23
56
|
|
|
24
57
|
**Goodness introduced in 1.1.0:**
|
|
25
58
|
* A [Partial][partials-docs] allows a test to mix mocked and real functions
|
|
@@ -48,47 +81,11 @@ from the same source module in a single test file and enables testing of
|
|
|
48
81
|
[GoogleTest report]: https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/report-tests-gtestlike-stdout/
|
|
49
82
|
[module generator]: https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/module-generator/
|
|
50
83
|
[dependencies]: https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/dependencies/
|
|
84
|
+
[sanitize-plugin]: https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/sanitize/
|
|
51
85
|
[bullseye-plugin]: https://docs.throwtheswitch.org/Ceedling/1.2.0/plugins/bullseye/
|
|
52
86
|
[sbom-docs]: https://docs.throwtheswitch.org/Ceedling/latest/project/sbom/
|
|
53
|
-
[partials-docs]: https://throwtheswitch.
|
|
54
|
-
[ceedling-docs-site]: https://throwtheswitch.
|
|
55
|
-
|
|
56
|
-
# 🌱 Ceedling is a handy-dandy build system for C projects
|
|
57
|
-
|
|
58
|
-
## Developer-friendly release _and_ test builds
|
|
59
|
-
|
|
60
|
-
Ceedling can build your release artifact but is especially adept at building
|
|
61
|
-
unit test suites for your C projects — even in tricky embedded systems.
|
|
62
|
-
|
|
63
|
-
⭐️ **Eager to just get going? Jump to
|
|
64
|
-
[📚 Documentation & Learning](#-documentation--learning) and
|
|
65
|
-
[🚀 Getting Started](#-getting-started).**
|
|
66
|
-
|
|
67
|
-
For a test suite project using the default toolchain `gcc`, Ceedling’s
|
|
68
|
-
configuration file could be as simple as this:
|
|
69
|
-
|
|
70
|
-
```yaml
|
|
71
|
-
:project:
|
|
72
|
-
:build_root: project/build/
|
|
73
|
-
|
|
74
|
-
:paths:
|
|
75
|
-
:test:
|
|
76
|
-
- tests/**
|
|
77
|
-
:source:
|
|
78
|
-
- source/**
|
|
79
|
-
:include:
|
|
80
|
-
- inc/**
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
To execute all your unit tests, you would run `ceedling test:all`. That‘s it!
|
|
84
|
-
|
|
85
|
-
Ceedling works the way developers want to work. It is flexible and entirely
|
|
86
|
-
command-line driven. It drives code generation and command line tools for you.
|
|
87
|
-
All generated and framework code is easy to see and understand.
|
|
88
|
-
|
|
89
|
-
Ceedling’s features support all types of C development from low-level embedded
|
|
90
|
-
to enterprise systems. No tool is perfect, but Ceedling can do a whole lot to
|
|
91
|
-
help you and your team produce quality software.
|
|
87
|
+
[partials-docs]: https://docs.throwtheswitch.org/Ceedling/1.1.0/testing-guide/partials/
|
|
88
|
+
[ceedling-docs-site]: https://docs.throwtheswitch.org/Ceedling/
|
|
92
89
|
|
|
93
90
|
## Supporting this work
|
|
94
91
|
|
|
@@ -674,11 +671,9 @@ of your choosing.
|
|
|
674
671
|
#### Attaching a Ceedling version to your project
|
|
675
672
|
|
|
676
673
|
Ceedling can be installed as a globally available Ruby gem. Ceedling can
|
|
677
|
-
also deploy all its guts into your project instead.
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
just because you updated your gems. No need to worry about changes in
|
|
681
|
-
Unity or CMock breaking your build in the future.
|
|
674
|
+
also deploy all its guts into your project instead. Your project then keeps
|
|
675
|
+
its own copy of Ceedling, Unity, and CMock, which updating your gems leaves
|
|
676
|
+
alone. Ceedling itself still needs Ruby and the gems Ceedling depends on.
|
|
682
677
|
|
|
683
678
|
To use Ceedling this way, tell it you want a local copy when you create
|
|
684
679
|
your project:
|
|
@@ -692,6 +687,10 @@ into a new folder `vendor/` inside your project `YourNewProjectName/`.
|
|
|
692
687
|
It will create the same simple empty directory structure for you with
|
|
693
688
|
`src/` and `test/` folders as the standard `new` command.
|
|
694
689
|
|
|
690
|
+
Run your project with `./ceedling` from its root (`.\ceedling.cmd` on
|
|
691
|
+
Windows), or with the gem’s `ceedling` command. Either way, your project’s copy
|
|
692
|
+
runs every command. The gem’s `ceedling` command hands off to it.
|
|
693
|
+
|
|
695
694
|
### Running build & plugin tasks
|
|
696
695
|
|
|
697
696
|
You can view all the build and plugin tasks available to you thanks to your
|
|
@@ -731,11 +730,11 @@ If you want to force a vendored version of Ceedling inside your project to
|
|
|
731
730
|
upgrade to match your latest gem, no problem. Just do the following…
|
|
732
731
|
|
|
733
732
|
```shell
|
|
734
|
-
> ceedling upgrade
|
|
733
|
+
> ceedling upgrade YourProjectName
|
|
735
734
|
```
|
|
736
735
|
|
|
737
|
-
|
|
738
|
-
|
|
736
|
+
`upgrade` takes the path to your project and copies the Ceedling you run
|
|
737
|
+
into it, along with Unity and CMock.
|
|
739
738
|
|
|
740
739
|
### Git integration
|
|
741
740
|
|
data/Rakefile
CHANGED
|
@@ -523,7 +523,8 @@ task 'ci:summary' do
|
|
|
523
523
|
jobs_path: ENV['CI_SUMMARY_JOBS'],
|
|
524
524
|
baseline_path: ENV['CI_SUMMARY_BASELINE'],
|
|
525
525
|
diff_path: ENV['CI_SUMMARY_DIFF'],
|
|
526
|
-
merge_base: ENV['CI_SUMMARY_MERGE_BASE']
|
|
526
|
+
merge_base: ENV['CI_SUMMARY_MERGE_BASE'],
|
|
527
|
+
todo_path: ENV['CI_SUMMARY_RUBOCOP_TODO']
|
|
527
528
|
)
|
|
528
529
|
|
|
529
530
|
sha = ENV.fetch( 'CI_SUMMARY_SHA' )
|
|
@@ -948,10 +949,11 @@ namespace :docs do
|
|
|
948
949
|
end
|
|
949
950
|
|
|
950
951
|
namespace :release do
|
|
951
|
-
desc "Deploy release docs to Github Pages
|
|
952
|
+
desc "Deploy release docs to Github Pages and set it as 'latest'"
|
|
952
953
|
task :latest, [:version] => [:snapshot] do |t, args|
|
|
953
954
|
version = args[:version] || raise("Version required: rake docs:deploy:release:latest[#.#.#]")
|
|
954
|
-
|
|
955
|
+
# --update-aliases moves 'latest' off whichever version currently holds it
|
|
956
|
+
venv_sh "mike deploy --push --update-aliases #{version} latest"
|
|
955
957
|
end
|
|
956
958
|
end
|
|
957
959
|
end
|
data/assets/features/ceedling
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#include "unity.h"
|
|
2
|
+
|
|
3
|
+
// Misspells alpha/calc.c on purpose, so no source file matches this entry.
|
|
4
|
+
TEST_SOURCE_FILE("alpha/clac.c")
|
|
5
|
+
|
|
6
|
+
extern int calc_value(void);
|
|
7
|
+
|
|
8
|
+
void setUp(void) {}
|
|
9
|
+
void tearDown(void) {}
|
|
10
|
+
|
|
11
|
+
void test_calc_value_from_a_misspelled_source(void)
|
|
12
|
+
{
|
|
13
|
+
TEST_ASSERT_EQUAL(111, calc_value());
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#include "unity.h"
|
|
9
|
+
|
|
10
|
+
void setUp(void)
|
|
11
|
+
{
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
void tearDown(void)
|
|
15
|
+
{
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
void test_this_is_the_root_directory_test_foo(void)
|
|
19
|
+
{
|
|
20
|
+
TEST_ASSERT_EQUAL(1, 1);
|
|
21
|
+
}
|
data/bin/actionator.rb
CHANGED
|
@@ -36,6 +36,9 @@ class Actionator
|
|
|
36
36
|
|
|
37
37
|
JUNK_FILE_EXCLUDE_REGEX = /(\.DS_Store)|(thumbs\.db)/
|
|
38
38
|
|
|
39
|
+
# A file or directory named with a leading dot stays out of a copy, and is never entered
|
|
40
|
+
HIDDEN = ->( name ) { name.start_with?( '.' ) }
|
|
41
|
+
|
|
39
42
|
BOLD = "\e[1m"
|
|
40
43
|
CLEAR = "\e[0m"
|
|
41
44
|
|
|
@@ -93,19 +96,15 @@ class Actionator
|
|
|
93
96
|
def copy_directory(source, destination, force: false, verbose: true,
|
|
94
97
|
exclude_pattern: JUNK_FILE_EXCLUDE_REGEX)
|
|
95
98
|
# Trailing separators arrive from the vendored component paths in cli_helper.
|
|
96
|
-
# They would otherwise survive into the
|
|
99
|
+
# They would otherwise survive into the rebasing below.
|
|
97
100
|
src = resolve_source( source ).sub( /\/+\z/, '' )
|
|
98
101
|
dest = resolve_destination( destination )
|
|
99
102
|
|
|
100
103
|
# Thor reported the destination directory itself ahead of its contents.
|
|
101
104
|
make_directory( dest, verbose: verbose )
|
|
102
105
|
|
|
103
|
-
#
|
|
104
|
-
|
|
105
|
-
listing = @file_wrapper.directory_listing( File.join( escape_globs( src ), '**', '*' ) )
|
|
106
|
-
|
|
107
|
-
listing.each do |entry|
|
|
108
|
-
next if @file_wrapper.directory?( entry )
|
|
106
|
+
# The listing holds regular files only, in sorted path order
|
|
107
|
+
@file_wrapper.tree_files( src, skip: HIDDEN ).each do |entry|
|
|
109
108
|
next if entry.match( exclude_pattern )
|
|
110
109
|
|
|
111
110
|
copy_file( entry, rebase( entry, src, dest ), force: force, verbose: verbose )
|
|
@@ -198,11 +197,6 @@ class Actionator
|
|
|
198
197
|
end
|
|
199
198
|
|
|
200
199
|
|
|
201
|
-
def escape_globs(path)
|
|
202
|
-
return path.gsub( /[*?{}\[\]]/ ) { |char| '\\' + char }
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
|
|
206
200
|
def status(verb, path, verbose)
|
|
207
201
|
return unless verbose
|
|
208
202
|
|
data/bin/app_cfg.rb
CHANGED
|
@@ -12,12 +12,21 @@ require "io/console"
|
|
|
12
12
|
|
|
13
13
|
class CeedlingAppConfig
|
|
14
14
|
|
|
15
|
-
def initialize()
|
|
15
|
+
def initialize(argv: [])
|
|
16
16
|
# Default installation location determined from the location of this file
|
|
17
17
|
ceedling_root_path = File.join( File.dirname( __FILE__ ), '..' )
|
|
18
18
|
|
|
19
19
|
# Create internal hash of needed values
|
|
20
20
|
@app_cfg = {
|
|
21
|
+
# The command line as given, before Thor consumes it, for handing off to another installation
|
|
22
|
+
:argv => argv.dup().freeze(),
|
|
23
|
+
|
|
24
|
+
# Markers from a launcher that handed off to this process, or nil
|
|
25
|
+
:handoff => nil,
|
|
26
|
+
|
|
27
|
+
# Base path of the installation running this launcher, unchanged by #set_paths
|
|
28
|
+
:launcher_root_path => File.expand_path( ceedling_root_path ),
|
|
29
|
+
|
|
21
30
|
# Base path of any Ceedling installation
|
|
22
31
|
:ceedling_root_path => '',
|
|
23
32
|
|
|
@@ -61,6 +70,11 @@ class CeedlingAppConfig
|
|
|
61
70
|
# Default to task categry other than build/plugin tasks
|
|
62
71
|
:build_tasks? => false,
|
|
63
72
|
|
|
73
|
+
# Whether the tasks build tests (test:, gcov:, ...) or a release, which decides what
|
|
74
|
+
# build/vendor needs
|
|
75
|
+
:test_build_tasks? => false,
|
|
76
|
+
:release_build_tasks? => false,
|
|
77
|
+
|
|
64
78
|
# Default to `exit(1)` upon failing test cases
|
|
65
79
|
:tests_graceful_fail? => false,
|
|
66
80
|
|
|
@@ -78,6 +92,10 @@ class CeedlingAppConfig
|
|
|
78
92
|
end
|
|
79
93
|
end
|
|
80
94
|
|
|
95
|
+
def set_handoff(markers)
|
|
96
|
+
@app_cfg[:handoff] = markers
|
|
97
|
+
end
|
|
98
|
+
|
|
81
99
|
def set_project_config(config)
|
|
82
100
|
@app_cfg[:project_config] = config
|
|
83
101
|
end
|
|
@@ -106,6 +124,14 @@ class CeedlingAppConfig
|
|
|
106
124
|
@app_cfg[:build_tasks?] = enable
|
|
107
125
|
end
|
|
108
126
|
|
|
127
|
+
def set_test_build_tasks(enable)
|
|
128
|
+
@app_cfg[:test_build_tasks?] = enable
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def set_release_build_tasks(enable)
|
|
132
|
+
@app_cfg[:release_build_tasks?] = enable
|
|
133
|
+
end
|
|
134
|
+
|
|
109
135
|
def set_tests_graceful_fail(enable)
|
|
110
136
|
@app_cfg[:tests_graceful_fail?] = enable
|
|
111
137
|
end
|
|
@@ -129,6 +155,14 @@ class CeedlingAppConfig
|
|
|
129
155
|
return @app_cfg[:build_tasks?]
|
|
130
156
|
end
|
|
131
157
|
|
|
158
|
+
def test_build_tasks?()
|
|
159
|
+
return @app_cfg[:test_build_tasks?]
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def release_build_tasks?()
|
|
163
|
+
return @app_cfg[:release_build_tasks?]
|
|
164
|
+
end
|
|
165
|
+
|
|
132
166
|
def tests_graceful_fail?()
|
|
133
167
|
return @app_cfg[:tests_graceful_fail?]
|
|
134
168
|
end
|
data/bin/ceedling
CHANGED
|
@@ -16,11 +16,17 @@ $LOAD_PATH.unshift( ceedling_bin_path )
|
|
|
16
16
|
|
|
17
17
|
# Pull in our startup configuration code in bin/
|
|
18
18
|
require 'app_cfg'
|
|
19
|
-
|
|
19
|
+
# The command line as given, before Thor consumes it
|
|
20
|
+
CEEDLING_APPCFG = CeedlingAppConfig.new( argv: ARGV )
|
|
20
21
|
|
|
21
22
|
# Add load paths for `require 'ceedling/*'` statements in bin/ code
|
|
22
23
|
$LOAD_PATH.unshift( CEEDLING_APPCFG[:ceedling_lib_base_path] )
|
|
23
24
|
|
|
25
|
+
# A launcher that handed off to this process left markers. Taking them here keeps any
|
|
26
|
+
# subprocess of this build from inheriting them.
|
|
27
|
+
require 'ceedling/handoff'
|
|
28
|
+
CEEDLING_APPCFG.set_handoff( Handoff.take_markers( ENV ) )
|
|
29
|
+
|
|
24
30
|
# Assumed installed via Ceedling gem dependencies
|
|
25
31
|
require 'constructor'
|
|
26
32
|
# Commonly needed modules
|
|
@@ -60,12 +66,16 @@ begin
|
|
|
60
66
|
# 5. Remove all paths added to $LOAD_PATH
|
|
61
67
|
# (Main application will restore certain paths -- possibly updated by :which_ceedling)
|
|
62
68
|
$LOAD_PATH.unshift(
|
|
63
|
-
# lib/ceedling for base of any require statements
|
|
64
|
-
CEEDLING_APPCFG[:ceedling_lib_path],
|
|
65
69
|
# Add lib/ceedling/config to load configuration handling utils
|
|
66
70
|
File.join( CEEDLING_APPCFG[:ceedling_lib_path], 'config' ),
|
|
71
|
+
# Add lib/ceedling/filesystem to load file and path handling code
|
|
72
|
+
File.join( CEEDLING_APPCFG[:ceedling_lib_path], 'filesystem' ),
|
|
67
73
|
# Add lib/ceedling/rake_app to load Rake application handling code
|
|
68
74
|
File.join( CEEDLING_APPCFG[:ceedling_lib_path], 'rake_app' ),
|
|
75
|
+
# lib/ceedling for base of any require statements. It follows its subdirectories, so a
|
|
76
|
+
# file an older Ceedling left directly in lib/ceedling/ never stands in for one that has
|
|
77
|
+
# moved below it.
|
|
78
|
+
CEEDLING_APPCFG[:ceedling_lib_path],
|
|
69
79
|
# DIY vendored path
|
|
70
80
|
diy_vendor_path
|
|
71
81
|
)
|
data/bin/cli.rb
CHANGED
|
@@ -603,13 +603,16 @@ module CeedlingTasks
|
|
|
603
603
|
) )
|
|
604
604
|
def docs(dest=nil)
|
|
605
605
|
_dest = dest.dup() if !dest.nil?
|
|
606
|
-
@handler.docs( @app_cfg, _dest )
|
|
606
|
+
@handler.docs( ENV, @app_cfg, _dest )
|
|
607
607
|
end
|
|
608
608
|
# simplecov:enable line
|
|
609
609
|
|
|
610
610
|
|
|
611
611
|
# simplecov:disable line
|
|
612
612
|
desc "version", "Display version details of Ceedling components"
|
|
613
|
+
method_option :project, :type => :string, :default => nil, :lazy_default => CLI_MISSING_PARAMETER_DEFAULT, :aliases => ['-p'], :desc => DOC_PROJECT_FLAG
|
|
614
|
+
method_option :mixin, :type => :string, :default => [], :repeatable => true, :aliases => ['-m'], :desc => DOC_MIXIN_FLAG
|
|
615
|
+
method_option :debug, :type => :boolean, :default => false, :hide => true
|
|
613
616
|
long_desc( CEEDLING_HANDOFF_OBJECTS[:loginator].sanitize(
|
|
614
617
|
<<-LONGDESC
|
|
615
618
|
`ceedling version` displays the version details of Ceedling and its supporting
|
|
@@ -620,9 +623,9 @@ module CeedlingTasks
|
|
|
620
623
|
command line. The application runs your build and plugin tasks. The
|
|
621
624
|
launcher hands off to the application. The two components are not
|
|
622
625
|
necessarily from the same installation or of the same version. Local
|
|
623
|
-
vendoring options, the WHICH_CEEDLING environment variable,
|
|
624
|
-
|
|
625
|
-
|
|
626
|
+
vendoring options, the WHICH_CEEDLING environment variable, your project
|
|
627
|
+
configuration's :project ↳ :which_ceedling, and more can select a Ceedling
|
|
628
|
+
application at a different path than the launcher.
|
|
626
629
|
|
|
627
630
|
If the launcher and application are from different locations, the version
|
|
628
631
|
output lists details for both. If they are from the same location, only a
|
|
@@ -630,14 +633,30 @@ module CeedlingTasks
|
|
|
630
633
|
|
|
631
634
|
NOTES:
|
|
632
635
|
|
|
633
|
-
• `version`
|
|
636
|
+
• `version` reads your project file, when one is available, to find the
|
|
637
|
+
Ceedling application it selects. A project file that cannot be loaded is
|
|
638
|
+
skipped unless you name it with --project.
|
|
639
|
+
|
|
640
|
+
• #{LONGDOC_MIXIN_FLAG}
|
|
634
641
|
|
|
635
642
|
• The build frameworks Unity, CMock, and CException are always sourced from
|
|
636
643
|
the Ceedling application.
|
|
637
644
|
LONGDESC
|
|
638
645
|
) )
|
|
639
646
|
def version()
|
|
640
|
-
@handler.
|
|
647
|
+
@handler.validate_string_param(
|
|
648
|
+
options[:project],
|
|
649
|
+
CLI_MISSING_PARAMETER_DEFAULT,
|
|
650
|
+
"--project is missing a required filepath parameter"
|
|
651
|
+
)
|
|
652
|
+
|
|
653
|
+
# Get an unfrozen copy so we can add / modify
|
|
654
|
+
_options = options.dup()
|
|
655
|
+
|
|
656
|
+
_options[:verbosity] = Verbosity::ERRORS
|
|
657
|
+
CliOptionsTransform.apply_debug_flag( _options )
|
|
658
|
+
|
|
659
|
+
@handler.version( ENV, @app_cfg, _options )
|
|
641
660
|
end
|
|
642
661
|
# simplecov:enable line
|
|
643
662
|
|