Skip to content

Commit

Permalink
Merge pull request #876 from ThrowTheSwitch/test/0_32/merge_proj_file…
Browse files Browse the repository at this point in the history
…_changes_and_rc

Test/0 32/merge proj file changes and rc
  • Loading branch information
mvandervoord authored Apr 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 313385e + 4710fa6 commit 1eb653c
Showing 67 changed files with 3,283 additions and 1,765 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -336,6 +336,12 @@ Matt Chernosky’s **[detailed tutorial][tutorial]** demonstrates using Ceedling

## The basics

### Docker image

A fully packaged [Ceedling Docker image][docker-image] containing Ruby, Ceedling, the GCC toolchain, and some helper scripts is also available. A Docker container is a self-contained, portable, well managed alternative to a local installation of Ceedling.

[docker-image]: https://hub.docker.com/r/throwtheswitch/madsciencelab

### Local installation

1. Install [Ruby]. (Only Ruby 3+ supported.)
@@ -350,12 +356,6 @@ Matt Chernosky’s **[detailed tutorial][tutorial]** demonstrates using Ceedling
> ceedling test:all release
```

### Docker image

A fully packaged [Ceedling Docker image][docker-image] containing Ruby, Ceedling, the GCC toolchain, and some helper scripts is also available. A Docker container is a self-contained, portable, well managed alternative to a local installation of Ceedling.

[docker-image]: https://hub.docker.com/r/throwtheswitch/madsciencelab

### Example super-duper simple Ceedling configuration file

```yaml
@@ -441,19 +441,21 @@ from within the root directory of your project.

Are you afraid of losing all your local changes when this happens? You
can prevent Ceedling from updating your project file by adding
`--no_configs`.
`--no-configs`.

```shell
> ceedling upgrade --local --no_configs YourSweetProject
> ceedling upgrade --local --no-configs YourSweetProject
```

## Git integration

Are you using Git? You might want Ceedling to create a `.gitignore`
file for you by adding `--gitignore` to your `new` call.
which ignores the build folder (while retaining control of the artifacts
folder). This will also add a `.gitkeep` file to your `test/support` folder.
You can enable this by adding `--gitsupport` to your `new` call.

```shell
> ceedling new --gitignore YourNewProjectName
> ceedling new --gitsupport YourNewProjectName
```
<br/>

3 changes: 0 additions & 3 deletions assets/project_as_gem.yml
Original file line number Diff line number Diff line change
@@ -20,9 +20,6 @@
:test_threads: 8
:compile_threads: 8

# you can specify different yaml config files which modify the existing one
:options_paths: []

# enable release build (more details in release_build section below)
:release_build: FALSE

3 changes: 0 additions & 3 deletions assets/project_with_guts.yml
Original file line number Diff line number Diff line change
@@ -20,9 +20,6 @@
:test_threads: 8
:compile_threads: 8

# you can specify different yaml config files which modify the existing one
:options_paths: []

# enable release build (more details in release_build section below)
:release_build: FALSE

3 changes: 0 additions & 3 deletions assets/project_with_guts_gcov.yml
Original file line number Diff line number Diff line change
@@ -20,9 +20,6 @@
:test_threads: 8
:compile_threads: 8

# you can specify different yaml config files which modify the existing one
:options_paths: []

# enable release build (more details in release_build section below)
:release_build: FALSE

35 changes: 35 additions & 0 deletions bin/actions_wrapper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require 'thor'
require 'fileutils'

# Wrapper for handy Thor Actions
class ActionsWrapper
include Thor::Base
include Thor::Actions

source_root( CEEDLING_ROOT )

def _directory(src, *args)
directory( src, *args )
end

def _copy_file(src, *args)
copy_file( src, *args )
end

def _touch_file(src)
FileUtils.touch(src)
end

def _chmod(src, mode, *args)
chmod( src, mode, *args )
end

def _empty_directory(dest, *args)
empty_directory( dest, *args )
end

def _gsub_file(path, flag, *args, &block)
gsub_file( path, flag, *args, &block )
end

end
31 changes: 31 additions & 0 deletions bin/app_cfg.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# Create our global application configuration option set
# This approach bridges clean Ruby and Rake
def get_app_cfg()
app_cfg = {
# Blank initial value for completeness
:project_config => {},

# Default, blank value
:log_filepath => '',

# Only specified in project config (no command line or environment variable)
:default_tasks => ['test:all'],

# Basic check from working directory
# If vendor/ceedling exists, default to running vendored Ceedling
:which_ceedling => (Dir.exist?( 'vendor/ceedling' ) ? 'vendor/ceedling' : 'gem'),

# Default, blank test case filters
:include_test_case => '',
:exclude_test_case => '',

# Default to no duration logging for setup & build ops in Rake context
:stopwatch => false,

# Default to `exit(1)` upon failing test cases
:tests_graceful_fail => false,
}

return app_cfg
end
Loading

0 comments on commit 1eb653c

Please sign in to comment.