ceedling 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/Rakefile +55 -6
  2. data/examples/temp_sensor/project.yml +2 -2
  3. data/lib/ceedling/version.rb +3 -3
  4. data/lib/ceedling/version.rb.erb +1 -1
  5. data/new_project_template/project.yml +1 -1
  6. data/new_project_template/vendor/ceedling/{vendor/c_exception/docs → docs}/CExceptionSummary.pdf +0 -0
  7. data/new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.pdf b/data/new_project_template/vendor/ceedling/docs/CMock → Summary.pdf +0 -0
  8. data/new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf b/data/new_project_template/vendor/ceedling/docs/Unity → Summary.pdf +0 -0
  9. data/new_project_template/vendor/ceedling/lib/configurator.rb +65 -16
  10. data/new_project_template/vendor/ceedling/lib/configurator_builder.rb +1 -8
  11. data/new_project_template/vendor/ceedling/lib/configurator_plugins.rb +8 -1
  12. data/new_project_template/vendor/ceedling/lib/configurator_setup.rb +30 -34
  13. data/new_project_template/vendor/ceedling/lib/configurator_validator.rb +32 -5
  14. data/new_project_template/vendor/ceedling/lib/constants.rb +17 -4
  15. data/new_project_template/vendor/ceedling/lib/defaults.rb +120 -106
  16. data/new_project_template/vendor/ceedling/lib/file_path_utils.rb +1 -1
  17. data/new_project_template/vendor/ceedling/lib/generator.rb +14 -6
  18. data/new_project_template/vendor/ceedling/lib/objects.yml +5 -0
  19. data/new_project_template/vendor/ceedling/lib/plugin.rb +2 -1
  20. data/new_project_template/vendor/ceedling/lib/plugin_manager.rb +6 -1
  21. data/new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb +2 -2
  22. data/new_project_template/vendor/ceedling/lib/preprocessinator_includes_handler.rb +2 -2
  23. data/new_project_template/vendor/ceedling/lib/rules_cmock.rake +1 -1
  24. data/new_project_template/vendor/ceedling/lib/rules_preprocess.rake +2 -2
  25. data/new_project_template/vendor/ceedling/lib/rules_release.rake +4 -4
  26. data/new_project_template/vendor/ceedling/lib/rules_release_aux_dependencies.rake +1 -1
  27. data/new_project_template/vendor/ceedling/lib/rules_tests.rake +5 -5
  28. data/new_project_template/vendor/ceedling/lib/rules_tests_aux_dependencies.rake +1 -1
  29. data/new_project_template/vendor/ceedling/lib/setupinator.rb +10 -3
  30. data/new_project_template/vendor/ceedling/lib/system_utils.rb +32 -0
  31. data/new_project_template/vendor/ceedling/lib/system_wrapper.rb +13 -5
  32. data/new_project_template/vendor/ceedling/lib/tasks_base.rake +2 -2
  33. data/new_project_template/vendor/ceedling/lib/tasks_release.rake +1 -1
  34. data/new_project_template/vendor/ceedling/lib/tasks_tests.rake +1 -1
  35. data/new_project_template/vendor/ceedling/lib/tool_executor.rb +38 -10
  36. data/new_project_template/vendor/ceedling/lib/tool_executor_helper.rb +68 -10
  37. data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rake +142 -0
  38. data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rb +145 -0
  39. data/new_project_template/vendor/ceedling/plugins/bullseye/defaults.yml +49 -0
  40. data/new_project_template/vendor/ceedling/plugins/bullseye/template.erb +15 -0
  41. data/new_project_template/vendor/ceedling/plugins/gcov/defaults.yml +34 -0
  42. data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rake +136 -0
  43. data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rb +115 -0
  44. data/new_project_template/vendor/ceedling/plugins/gcov/template.erb +15 -0
  45. data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.rb +1 -1
  46. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb +3 -63
  47. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/template.erb +59 -0
  48. data/new_project_template/vendor/ceedling/plugins/warnings_report/warnings_report.rb +71 -0
  49. data/new_project_template/vendor/ceedling/release/build.info +1 -1
  50. data/new_project_template/vendor/ceedling/vendor/c_exception/release/version.info +1 -1
  51. data/new_project_template/vendor/ceedling/vendor/unity/src/unity.c +30 -21
  52. metadata +18 -27
  53. data/new_project_template/vendor/ceedling/docs/Ceedling Packet.odt +0 -0
  54. data/new_project_template/vendor/ceedling/docs/CeedlingLogo.png +0 -0
  55. data/new_project_template/vendor/ceedling/rakefile.rb +0 -59
  56. data/new_project_template/vendor/ceedling/rakefile_helper.rb +0 -23
  57. data/new_project_template/vendor/ceedling/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  58. data/new_project_template/vendor/ceedling/vendor/c_exception/docs/license.txt +0 -30
  59. data/new_project_template/vendor/ceedling/vendor/c_exception/docs/readme.txt +0 -236
  60. data/new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -217
  61. data/new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.odt +0 -0
  62. data/new_project_template/vendor/ceedling/vendor/cmock/docs/license.txt +0 -31
  63. data/new_project_template/vendor/ceedling/vendor/deep_merge/MIT-LICENSE +0 -20
  64. data/new_project_template/vendor/ceedling/vendor/deep_merge/README +0 -94
  65. data/new_project_template/vendor/ceedling/vendor/deep_merge/Rakefile +0 -28
  66. data/new_project_template/vendor/ceedling/vendor/deep_merge/test/test_deep_merge.rb +0 -553
  67. data/new_project_template/vendor/ceedling/vendor/diy/History.txt +0 -28
  68. data/new_project_template/vendor/ceedling/vendor/diy/README.rdoc +0 -233
  69. data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.odt +0 -0
  70. data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.pdf +0 -0
  71. data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.txt +0 -217
  72. data/new_project_template/vendor/ceedling/vendor/unity/docs/license.txt +0 -31
@@ -24,6 +24,15 @@ class StdErrRedirect
24
24
  TCSH = :tcsh
25
25
  end
26
26
 
27
+
28
+ class BackgroundExec
29
+ NONE = :none
30
+ AUTO = :auto
31
+ WIN = :win
32
+ UNIX = :unix
33
+ end
34
+
35
+
27
36
  CEXCEPTION_ROOT_PATH = 'c_exception'
28
37
  CEXCEPTION_LIB_PATH = "#{CEXCEPTION_ROOT_PATH}/lib"
29
38
  CEXCEPTION_C_FILE = 'CException.c'
@@ -49,11 +58,15 @@ INPUT_CONFIGURATION_CACHE_FILE = 'input.yml' # input configuration file du
49
58
 
50
59
  TEST_ROOT_NAME = 'test'
51
60
  TEST_TASK_ROOT = TEST_ROOT_NAME + ':'
52
- TEST_CONTEXT = TEST_ROOT_NAME.to_sym
61
+ TEST_SYM = TEST_ROOT_NAME.to_sym
53
62
 
54
63
  RELEASE_ROOT_NAME = 'release'
55
64
  RELEASE_TASK_ROOT = RELEASE_ROOT_NAME + ':'
56
- RELEASE_CONTEXT = RELEASE_ROOT_NAME.to_sym
65
+ RELEASE_SYM = RELEASE_ROOT_NAME.to_sym
66
+
67
+ UTILS_ROOT_NAME = 'utils'
68
+ UTILS_TASK_ROOT = UTILS_ROOT_NAME + ':'
69
+ UTILS_SYM = UTILS_ROOT_NAME.to_sym
57
70
 
58
71
 
59
72
  RUBY_STRING_REPLACEMENT_PATTERN = /#\{.+\}/
@@ -62,5 +75,5 @@ TOOL_EXECUTOR_ARGUMENT_REPLACEMENT_PATTERN = /(\$\{(\d+)\})/
62
75
 
63
76
  NULL_FILE_PATH = '/dev/null'
64
77
 
65
- TESTS_BASE_PATH = 'tests'
66
- RELEASE_BASE_PATH = 'release'
78
+ TESTS_BASE_PATH = TEST_ROOT_NAME
79
+ RELEASE_BASE_PATH = RELEASE_ROOT_NAME
@@ -4,151 +4,165 @@ require 'file_path_utils'
4
4
 
5
5
 
6
6
  DEFAULT_TEST_COMPILER_TOOL = {
7
- :executable => FilePathUtils.os_executable_ext('gcc'),
8
- :name => 'default_test_compiler',
9
- :stderr_redirect => StdErrRedirect::NONE,
7
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
8
+ :name => 'default_test_compiler'.freeze,
9
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
10
+ :background_exec => BackgroundExec::NONE.freeze,
11
+ :optional => false.freeze,
10
12
  :arguments => [
11
- {"-I\"$\"" => 'COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'},
12
- {"-I\"$\"" => 'COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'},
13
- {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'},
14
- "-DGNU_COMPILER",
15
- {"$" => 'TEST_COMPILER_ARGUMENTS'},
16
- "-c \"${1}\"",
17
- "-o \"${2}\"",
18
- ]
13
+ {"-I\"$\"" => 'COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'}.freeze,
14
+ {"-I\"$\"" => 'COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'}.freeze,
15
+ {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'}.freeze,
16
+ "-DGNU_COMPILER".freeze,
17
+ "-c \"${1}\"".freeze,
18
+ "-o \"${2}\"".freeze,
19
+ ].freeze
19
20
  }
20
21
 
21
22
  DEFAULT_TEST_LINKER_TOOL = {
22
- :executable => FilePathUtils.os_executable_ext('gcc'),
23
- :name => 'default_test_linker',
24
- :stderr_redirect => StdErrRedirect::NONE,
23
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
24
+ :name => 'default_test_linker'.freeze,
25
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
26
+ :background_exec => BackgroundExec::NONE.freeze,
27
+ :optional => false.freeze,
25
28
  :arguments => [
26
- {"$" => 'TEST_LINKER_ARGUMENTS'},
27
- "\"${1}\"",
28
- "-o \"${2}\"",
29
- ]
29
+ "\"${1}\"".freeze,
30
+ "-o \"${2}\"".freeze,
31
+ ].freeze
30
32
  }
31
33
 
32
34
  DEFAULT_TEST_FIXTURE_TOOL = {
33
- :executable => '${1}',
34
- :name => 'default_test_fixture',
35
- :stderr_redirect => StdErrRedirect::AUTO,
36
- :arguments => [
37
- {"$" => 'TEST_FIXTURE_ARGUMENTS'},
38
- ]
35
+ :executable => '${1}'.freeze,
36
+ :name => 'default_test_fixture'.freeze,
37
+ :stderr_redirect => StdErrRedirect::AUTO.freeze,
38
+ :background_exec => BackgroundExec::NONE.freeze,
39
+ :optional => false.freeze,
40
+ :arguments => [].freeze
39
41
  }
40
42
 
41
43
 
42
44
 
43
45
  DEFAULT_TEST_INCLUDES_PREPROCESSOR_TOOL = {
44
- :executable => FilePathUtils.os_executable_ext('cpp'),
45
- :name => 'default_test_includes_preprocessor',
46
- :stderr_redirect => StdErrRedirect::NONE,
46
+ :executable => FilePathUtils.os_executable_ext('cpp').freeze,
47
+ :name => 'default_test_includes_preprocessor'.freeze,
48
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
49
+ :background_exec => BackgroundExec::NONE.freeze,
50
+ :optional => false.freeze,
47
51
  :arguments => [
48
- '-MM', '-MG',
52
+ '-MM'.freeze,
53
+ '-MG'.freeze,
49
54
  # avoid some possibility of deep system lib header file complications by omitting vendor paths
50
55
  # if cpp is run on *nix system, escape spaces in paths; if cpp on windows just use the paths collection as is
51
- {"-I\"$\"" => "{SystemWrapper.is_windows? ? COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE : COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE.map{|path| path.gsub(\/ \/, \'\\\\ \') }}"},
52
- {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'},
53
- {"-D$" => 'DEFINES_TEST_PREPROCESS'},
54
- "-DGNU_PREPROCESSOR",
55
- {"$" => 'TEST_INCLUDES_PREPROCESSOR_ARGUMENTS'},
56
- '-w',
57
- '-nostdinc',
58
- "\"${1}\""
59
- ]
56
+ {"-I\"$\"" => "{SystemWrapper.windows? ? COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE : COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE.map{|path| path.gsub(\/ \/, \'\\\\ \') }}"}.freeze,
57
+ {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'}.freeze,
58
+ {"-D$" => 'DEFINES_TEST_PREPROCESS'}.freeze,
59
+ "-DGNU_PREPROCESSOR".freeze,
60
+ '-w'.freeze,
61
+ '-nostdinc'.freeze,
62
+ "\"${1}\"".freeze
63
+ ].freeze
60
64
  }
61
65
 
62
66
  DEFAULT_TEST_FILE_PREPROCESSOR_TOOL = {
63
- :executable => FilePathUtils.os_executable_ext('gcc'),
64
- :name => 'default_test_file_preprocessor',
65
- :stderr_redirect => StdErrRedirect::NONE,
67
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
68
+ :name => 'default_test_file_preprocessor'.freeze,
69
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
70
+ :background_exec => BackgroundExec::NONE.freeze,
71
+ :optional => false.freeze,
66
72
  :arguments => [
67
- '-E',
68
- {"-I\"$\"" => 'COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'},
69
- {"-I\"$\"" => 'PATHS_TEST_TOOLCHAIN_INCLUDE'},
70
- {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'},
71
- {"-D$" => 'DEFINES_TEST_PREPROCESS'},
72
- "-DGNU_PREPROCESSOR",
73
- {"$" => 'TEST_FILE_PREPROCESSOR_ARGUMENTS'},
74
- "\"${1}\"",
75
- "-o \"${2}\""
76
- ]
73
+ '-E'.freeze,
74
+ {"-I\"$\"" => 'COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'}.freeze,
75
+ {"-I\"$\"" => 'PATHS_TEST_TOOLCHAIN_INCLUDE'}.freeze,
76
+ {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'}.freeze,
77
+ {"-D$" => 'DEFINES_TEST_PREPROCESS'}.freeze,
78
+ "-DGNU_PREPROCESSOR".freeze,
79
+ "\"${1}\"".freeze,
80
+ "-o \"${2}\"".freeze
81
+ ].freeze
77
82
  }
78
83
 
79
84
  DEFAULT_TEST_DEPENDENCIES_GENERATOR_TOOL = {
80
- :executable => FilePathUtils.os_executable_ext('gcc'),
81
- :name => 'default_test_dependencies_generator',
82
- :stderr_redirect => StdErrRedirect::NONE,
85
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
86
+ :name => 'default_test_dependencies_generator'.freeze,
87
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
88
+ :background_exec => BackgroundExec::NONE.freeze,
89
+ :optional => false.freeze,
83
90
  :arguments => [
84
- {"-I\"$\"" => 'COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'},
85
- {"-I\"$\"" => 'COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'},
86
- {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'},
87
- {"-D$" => 'DEFINES_TEST_PREPROCESS'},
88
- "-DGNU_PREPROCESSOR",
89
- "-MT \"${3}\"",
90
- '-MM', '-MD', '-MG',
91
- "-MF \"${2}\"",
92
- {"$" => 'TEST_DEPENDENCIES_GENERATOR_ARGUMENTS'},
93
- "-c \"${1}\"",
94
- ]
91
+ {"-I\"$\"" => 'COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'}.freeze,
92
+ {"-I\"$\"" => 'COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'}.freeze,
93
+ {"-D$" => 'COLLECTION_DEFINES_TEST_AND_VENDOR'}.freeze,
94
+ {"-D$" => 'DEFINES_TEST_PREPROCESS'}.freeze,
95
+ "-DGNU_PREPROCESSOR".freeze,
96
+ "-MT \"${3}\"".freeze,
97
+ '-MM'.freeze,
98
+ '-MD'.freeze,
99
+ '-MG'.freeze,
100
+ "-MF \"${2}\"".freeze,
101
+ "-c \"${1}\"".freeze,
102
+ ].freeze
95
103
  }
96
104
 
97
105
  DEFAULT_RELEASE_DEPENDENCIES_GENERATOR_TOOL = {
98
- :executable => FilePathUtils.os_executable_ext('gcc'),
99
- :name => 'default_release_dependencies_generator',
100
- :stderr_redirect => StdErrRedirect::NONE,
106
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
107
+ :name => 'default_release_dependencies_generator'.freeze,
108
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
109
+ :background_exec => BackgroundExec::NONE.freeze,
110
+ :optional => false.freeze,
101
111
  :arguments => [
102
- {"-I\"$\"" => 'COLLECTION_PATHS_SOURCE_AND_INCLUDE'},
103
- {"-I\"$\"" => 'COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE'},
104
- {"-D$" => 'COLLECTION_DEFINES_RELEASE_AND_VENDOR'},
105
- {"-D$" => 'DEFINES_RELEASE_PREPROCESS'},
106
- "-DGNU_PREPROCESSOR",
107
- "-MT \"${3}\"",
108
- '-MM', '-MD', '-MG',
109
- "-MF \"${2}\"",
110
- {"$" => 'RELEASE_DEPENDENCIES_GENERATOR_ARGUMENTS'},
111
- "-c \"${1}\"",
112
- ]
112
+ {"-I\"$\"" => 'COLLECTION_PATHS_SOURCE_AND_INCLUDE'}.freeze,
113
+ {"-I\"$\"" => 'COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE'}.freeze,
114
+ {"-D$" => 'COLLECTION_DEFINES_RELEASE_AND_VENDOR'}.freeze,
115
+ {"-D$" => 'DEFINES_RELEASE_PREPROCESS'}.freeze,
116
+ "-DGNU_PREPROCESSOR".freeze,
117
+ "-MT \"${3}\"".freeze,
118
+ '-MM'.freeze,
119
+ '-MD'.freeze,
120
+ '-MG'.freeze,
121
+ "-MF \"${2}\"".freeze,
122
+ "-c \"${1}\"".freeze,
123
+ ].freeze
113
124
  }
114
125
 
115
126
 
116
127
  DEFAULT_RELEASE_COMPILER_TOOL = {
117
- :executable => FilePathUtils.os_executable_ext('gcc'),
118
- :name => 'default_release_compiler',
119
- :stderr_redirect => StdErrRedirect::NONE,
128
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
129
+ :name => 'default_release_compiler'.freeze,
130
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
131
+ :background_exec => BackgroundExec::NONE.freeze,
132
+ :optional => false.freeze,
120
133
  :arguments => [
121
- {"-I\"$\"" => 'COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR'},
122
- {"-I\"$\"" => 'COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE'},
123
- {"-D$" => 'COLLECTION_DEFINES_RELEASE_AND_VENDOR'},
124
- "-DGNU_COMPILER",
125
- {"$" => 'RELEASE_COMPILER_ARGUMENTS'},
126
- "-c \"${1}\"",
127
- "-o \"${2}\"",
128
- ]
134
+ {"-I\"$\"" => 'COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR'}.freeze,
135
+ {"-I\"$\"" => 'COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE'}.freeze,
136
+ {"-D$" => 'COLLECTION_DEFINES_RELEASE_AND_VENDOR'}.freeze,
137
+ "-DGNU_COMPILER".freeze,
138
+ "-c \"${1}\"".freeze,
139
+ "-o \"${2}\"".freeze,
140
+ ].freeze
129
141
  }
130
142
 
131
143
  DEFAULT_RELEASE_ASSEMBLER_TOOL = {
132
- :executable => FilePathUtils.os_executable_ext('as'),
133
- :name => 'default_release_assembler',
134
- :stderr_redirect => StdErrRedirect::NONE,
144
+ :executable => FilePathUtils.os_executable_ext('as').freeze,
145
+ :name => 'default_release_assembler'.freeze,
146
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
147
+ :background_exec => BackgroundExec::NONE.freeze,
148
+ :optional => false.freeze,
135
149
  :arguments => [
136
- {"-I\"$\"" => 'COLLECTION_PATHS_SOURCE_AND_INCLUDE'},
137
- {"$" => 'RELEASE_ASSEMBLER_ARGUMENTS'},
138
- "\"${1}\"",
139
- "-o \"${2}\"",
140
- ]
150
+ {"-I\"$\"" => 'COLLECTION_PATHS_SOURCE_AND_INCLUDE'}.freeze,
151
+ "\"${1}\"".freeze,
152
+ "-o \"${2}\"".freeze,
153
+ ].freeze
141
154
  }
142
155
 
143
156
  DEFAULT_RELEASE_LINKER_TOOL = {
144
- :executable => FilePathUtils.os_executable_ext('gcc'),
145
- :name => 'default_release_linker',
146
- :stderr_redirect => StdErrRedirect::NONE,
157
+ :executable => FilePathUtils.os_executable_ext('gcc').freeze,
158
+ :name => 'default_release_linker'.freeze,
159
+ :stderr_redirect => StdErrRedirect::NONE.freeze,
160
+ :background_exec => BackgroundExec::NONE.freeze,
161
+ :optional => false.freeze,
147
162
  :arguments => [
148
- {"$" => 'RELEASE_LINKER_ARGUMENTS'},
149
- "\"${1}\"",
150
- "-o \"${2}\"",
151
- ]
163
+ "\"${1}\"".freeze,
164
+ "-o \"${2}\"".freeze,
165
+ ].freeze
152
166
  }
153
167
 
154
168
 
@@ -240,7 +254,7 @@ DEFAULT_CEEDLING_CONFIG = {
240
254
  :source => '.c',
241
255
  :assembly => '.s',
242
256
  :object => '.o',
243
- :executable => ( SystemWrapper.is_windows? ? '.exe' : '.out' ),
257
+ :executable => ( SystemWrapper.windows? ? '.exe' : '.out' ),
244
258
  :testpass => '.pass',
245
259
  :testfail => '.fail',
246
260
  :dependencies => '.d',
@@ -286,7 +300,7 @@ DEFAULT_CEEDLING_CONFIG = {
286
300
  :load_paths => [],
287
301
  :enabled => [],
288
302
  }
289
- }
303
+ }.freeze
290
304
 
291
305
 
292
306
  DEFAULT_TESTS_RESULTS_REPORT_TEMPLATE = %q{
@@ -29,7 +29,7 @@ class FilePathUtils
29
29
  end
30
30
 
31
31
  def self.os_executable_ext(executable)
32
- return executable.ext('.exe') if SystemWrapper.is_windows?
32
+ return executable.ext('.exe') if SystemWrapper.windows?
33
33
  return executable
34
34
  end
35
35
 
@@ -18,14 +18,14 @@ class Generator
18
18
  def generate_dependencies_file(tool, context, source, object, dependencies)
19
19
  @streaminator.stdout_puts("Generating dependencies for #{File.basename(source)}...", Verbosity::NORMAL)
20
20
 
21
- command_line =
21
+ command =
22
22
  @tool_executor.build_command_line(
23
23
  tool,
24
24
  source,
25
25
  dependencies,
26
26
  object)
27
27
 
28
- @tool_executor.exec(command_line)
28
+ @tool_executor.exec( command[:line], command[:options] )
29
29
  end
30
30
 
31
31
  def generate_mock(context, header_filepath)
@@ -67,7 +67,8 @@ class Generator
67
67
  @plugin_manager.pre_compile_execute(arg_hash)
68
68
 
69
69
  @streaminator.stdout_puts("Compiling #{File.basename(arg_hash[:source])}...", Verbosity::NORMAL)
70
- shell_result = @tool_executor.exec( @tool_executor.build_command_line(arg_hash[:tool], arg_hash[:source], arg_hash[:object]) )
70
+ command = @tool_executor.build_command_line(arg_hash[:tool], arg_hash[:source], arg_hash[:object])
71
+ shell_result = @tool_executor.exec( command[:line], command[:options] )
71
72
 
72
73
  arg_hash[:shell_result] = shell_result
73
74
  @plugin_manager.post_compile_execute(arg_hash)
@@ -81,7 +82,8 @@ class Generator
81
82
  @streaminator.stdout_puts("Linking #{File.basename(arg_hash[:executable])}...", Verbosity::NORMAL)
82
83
 
83
84
  begin
84
- shell_result = @tool_executor.exec( @tool_executor.build_command_line(arg_hash[:tool], arg_hash[:objects], arg_hash[:executable]) )
85
+ command = @tool_executor.build_command_line(arg_hash[:tool], arg_hash[:objects], arg_hash[:executable])
86
+ shell_result = @tool_executor.exec( command[:line], command[:options] )
85
87
  rescue
86
88
  notice = "\n" +
87
89
  "NOTICE: If the linker reports missing symbols, the following may be to blame:\n" +
@@ -110,10 +112,16 @@ class Generator
110
112
 
111
113
  # Unity's exit code is equivalent to the number of failed tests, so we tell @tool_executor not to fail out if there are failures
112
114
  # so that we can run all tests and collect all results
113
- shell_result = @tool_executor.exec( @tool_executor.build_command_line(arg_hash[:tool], arg_hash[:executable]), [], {:boom => false} )
115
+ command = @tool_executor.build_command_line(arg_hash[:tool], arg_hash[:executable])
116
+ command[:options][:boom] = false
117
+ shell_result = @tool_executor.exec( command[:line], command[:options] )
114
118
 
115
119
  if (shell_result[:output].nil? or shell_result[:output].strip.empty?)
116
- @streaminator.stderr_puts("ERROR: Test executable \"#{File.basename(executable)}\" did not produce any results.", Verbosity::ERRORS)
120
+ notice = "\n" +
121
+ "ERROR: Test executable \"#{File.basename(executable)}\" did not produce any results.\n" +
122
+ "This is most often a symptom of bad memory accesses in source or test code.\n\n"
123
+
124
+ @streaminator.stderr_puts(notice, Verbosity::COMPLAIN)
117
125
  raise
118
126
  end
119
127
 
@@ -17,6 +17,10 @@ rake_utils:
17
17
  compose:
18
18
  - rake_wrapper
19
19
 
20
+ system_utils:
21
+ compose:
22
+ - system_wrapper
23
+
20
24
  file_path_utils:
21
25
  compose:
22
26
  - configurator
@@ -59,6 +63,7 @@ tool_executor:
59
63
  tool_executor_helper:
60
64
  compose:
61
65
  - streaminator
66
+ - system_utils
62
67
  - system_wrapper
63
68
 
64
69
  configurator:
@@ -29,9 +29,10 @@ class String
29
29
  end
30
30
 
31
31
  class Plugin
32
- attr_reader :name
32
+ attr_reader :name, :environment
33
33
 
34
34
  def initialize(system_objects, name)
35
+ @environment = []
35
36
  @ceedling = system_objects
36
37
  @name = name
37
38
  self.setup
@@ -11,16 +11,21 @@ class PluginManager
11
11
  end
12
12
 
13
13
  def load_plugin_scripts(script_plugins, system_objects)
14
+ environment = []
15
+
14
16
  script_plugins.each do |plugin|
15
- # protect against instantiating object multiple times due to processing config multiple times (options, etc)
17
+ # protect against instantiating object multiple times due to processing config multiple times (option files, etc)
16
18
  next if (@plugin_manager_helper.include?(@plugin_objects, plugin))
17
19
  @system_wrapper.require_file( "#{plugin}.rb" )
18
20
  object = @plugin_manager_helper.instantiate_plugin_script( camelize(plugin), system_objects, plugin )
19
21
  @plugin_objects << object
22
+ environment += object.environment
20
23
 
21
24
  # add plugins to hash of all system objects
22
25
  system_objects[plugin.downcase.to_sym] = object
23
26
  end
27
+
28
+ yield( { :environment => environment } ) if (environment.size > 0)
24
29
  end
25
30
 
26
31
  def plugins_failed?