ceedling 0.0.3 → 0.0.4
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.
- data/Rakefile +55 -6
- data/examples/temp_sensor/project.yml +2 -2
- data/lib/ceedling/version.rb +3 -3
- data/lib/ceedling/version.rb.erb +1 -1
- data/new_project_template/project.yml +1 -1
- data/new_project_template/vendor/ceedling/{vendor/c_exception/docs → docs}/CExceptionSummary.pdf +0 -0
- 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
- 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
- data/new_project_template/vendor/ceedling/lib/configurator.rb +65 -16
- data/new_project_template/vendor/ceedling/lib/configurator_builder.rb +1 -8
- data/new_project_template/vendor/ceedling/lib/configurator_plugins.rb +8 -1
- data/new_project_template/vendor/ceedling/lib/configurator_setup.rb +30 -34
- data/new_project_template/vendor/ceedling/lib/configurator_validator.rb +32 -5
- data/new_project_template/vendor/ceedling/lib/constants.rb +17 -4
- data/new_project_template/vendor/ceedling/lib/defaults.rb +120 -106
- data/new_project_template/vendor/ceedling/lib/file_path_utils.rb +1 -1
- data/new_project_template/vendor/ceedling/lib/generator.rb +14 -6
- data/new_project_template/vendor/ceedling/lib/objects.yml +5 -0
- data/new_project_template/vendor/ceedling/lib/plugin.rb +2 -1
- data/new_project_template/vendor/ceedling/lib/plugin_manager.rb +6 -1
- data/new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb +2 -2
- data/new_project_template/vendor/ceedling/lib/preprocessinator_includes_handler.rb +2 -2
- data/new_project_template/vendor/ceedling/lib/rules_cmock.rake +1 -1
- data/new_project_template/vendor/ceedling/lib/rules_preprocess.rake +2 -2
- data/new_project_template/vendor/ceedling/lib/rules_release.rake +4 -4
- data/new_project_template/vendor/ceedling/lib/rules_release_aux_dependencies.rake +1 -1
- data/new_project_template/vendor/ceedling/lib/rules_tests.rake +5 -5
- data/new_project_template/vendor/ceedling/lib/rules_tests_aux_dependencies.rake +1 -1
- data/new_project_template/vendor/ceedling/lib/setupinator.rb +10 -3
- data/new_project_template/vendor/ceedling/lib/system_utils.rb +32 -0
- data/new_project_template/vendor/ceedling/lib/system_wrapper.rb +13 -5
- data/new_project_template/vendor/ceedling/lib/tasks_base.rake +2 -2
- data/new_project_template/vendor/ceedling/lib/tasks_release.rake +1 -1
- data/new_project_template/vendor/ceedling/lib/tasks_tests.rake +1 -1
- data/new_project_template/vendor/ceedling/lib/tool_executor.rb +38 -10
- data/new_project_template/vendor/ceedling/lib/tool_executor_helper.rb +68 -10
- data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rake +142 -0
- data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rb +145 -0
- data/new_project_template/vendor/ceedling/plugins/bullseye/defaults.yml +49 -0
- data/new_project_template/vendor/ceedling/plugins/bullseye/template.erb +15 -0
- data/new_project_template/vendor/ceedling/plugins/gcov/defaults.yml +34 -0
- data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rake +136 -0
- data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rb +115 -0
- data/new_project_template/vendor/ceedling/plugins/gcov/template.erb +15 -0
- data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.rb +1 -1
- data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb +3 -63
- data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/template.erb +59 -0
- data/new_project_template/vendor/ceedling/plugins/warnings_report/warnings_report.rb +71 -0
- data/new_project_template/vendor/ceedling/release/build.info +1 -1
- data/new_project_template/vendor/ceedling/vendor/c_exception/release/version.info +1 -1
- data/new_project_template/vendor/ceedling/vendor/unity/src/unity.c +30 -21
- metadata +18 -27
- data/new_project_template/vendor/ceedling/docs/Ceedling Packet.odt +0 -0
- data/new_project_template/vendor/ceedling/docs/CeedlingLogo.png +0 -0
- data/new_project_template/vendor/ceedling/rakefile.rb +0 -59
- data/new_project_template/vendor/ceedling/rakefile_helper.rb +0 -23
- data/new_project_template/vendor/ceedling/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/new_project_template/vendor/ceedling/vendor/c_exception/docs/license.txt +0 -30
- data/new_project_template/vendor/ceedling/vendor/c_exception/docs/readme.txt +0 -236
- data/new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -217
- data/new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.odt +0 -0
- data/new_project_template/vendor/ceedling/vendor/cmock/docs/license.txt +0 -31
- data/new_project_template/vendor/ceedling/vendor/deep_merge/MIT-LICENSE +0 -20
- data/new_project_template/vendor/ceedling/vendor/deep_merge/README +0 -94
- data/new_project_template/vendor/ceedling/vendor/deep_merge/Rakefile +0 -28
- data/new_project_template/vendor/ceedling/vendor/deep_merge/test/test_deep_merge.rb +0 -553
- data/new_project_template/vendor/ceedling/vendor/diy/History.txt +0 -28
- data/new_project_template/vendor/ceedling/vendor/diy/README.rdoc +0 -233
- data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.odt +0 -0
- data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.txt +0 -217
- data/new_project_template/vendor/ceedling/vendor/unity/docs/license.txt +0 -31
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
require 'plugin'
|
|
2
|
+
require 'constants'
|
|
3
|
+
|
|
4
|
+
GCOV_ROOT_NAME = 'gcov'
|
|
5
|
+
GCOV_TASK_ROOT = GCOV_ROOT_NAME + ':'
|
|
6
|
+
GCOV_CONTEXT = GCOV_ROOT_NAME.to_sym
|
|
7
|
+
|
|
8
|
+
GCOV_BUILD_PATH = "#{PROJECT_BUILD_ROOT}/#{GCOV_ROOT_NAME}"
|
|
9
|
+
GCOV_BUILD_OUTPUT_PATH = "#{GCOV_BUILD_PATH}/out"
|
|
10
|
+
GCOV_RESULTS_PATH = "#{GCOV_BUILD_PATH}/results"
|
|
11
|
+
GCOV_DEPENDENCIES_PATH = "#{GCOV_BUILD_PATH}/dependencies"
|
|
12
|
+
GCOV_ARTIFACTS_PATH = "#{PROJECT_BUILD_ARTIFACTS_ROOT}/#{GCOV_ROOT_NAME}"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Gcov < Plugin
|
|
16
|
+
|
|
17
|
+
attr_reader :config
|
|
18
|
+
|
|
19
|
+
def setup
|
|
20
|
+
@result_list = []
|
|
21
|
+
|
|
22
|
+
@config = {
|
|
23
|
+
:project_test_build_output_path => GCOV_BUILD_OUTPUT_PATH,
|
|
24
|
+
:project_test_results_path => GCOV_RESULTS_PATH,
|
|
25
|
+
:project_test_dependencies_path => GCOV_DEPENDENCIES_PATH,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@coverage_template_all = @ceedling[:file_wrapper].read( File.join( PLUGINS_GCOV_PATH, 'template.erb') )
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def generate_coverage_object_file(source, object)
|
|
32
|
+
compile_command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_COMPILER, source, object)
|
|
33
|
+
@ceedling[:streaminator].stdout_puts("Compiling #{File.basename(source)} with coverage...")
|
|
34
|
+
@ceedling[:tool_executor].exec( compile_command[:line], compile_command[:options] )
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def post_test_execute(arg_hash)
|
|
38
|
+
result_file = arg_hash[:result_file]
|
|
39
|
+
|
|
40
|
+
if ((result_file =~ /#{GCOV_RESULTS_PATH}/) and (not @result_list.include?(result_file)))
|
|
41
|
+
@result_list << arg_hash[:result_file]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def post_build
|
|
46
|
+
return if (not @ceedling[:task_invoker].invoked?(/^#{GCOV_TASK_ROOT}/))
|
|
47
|
+
|
|
48
|
+
# test results
|
|
49
|
+
results = @ceedling[:plugin_reportinator].assemble_test_results(@result_list)
|
|
50
|
+
hash = {
|
|
51
|
+
:header => GCOV_ROOT_NAME.upcase,
|
|
52
|
+
:results => results
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@ceedling[:plugin_reportinator].run_test_results_report(hash) do
|
|
56
|
+
message = ''
|
|
57
|
+
message = 'Unit test failures.' if (results[:counts][:failed] > 0)
|
|
58
|
+
message
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
if (@ceedling[:task_invoker].invoked?(/^#{GCOV_TASK_ROOT}(all|delta)/))
|
|
62
|
+
report_coverage_results_summary(@ceedling[:test_invoker].sources)
|
|
63
|
+
else
|
|
64
|
+
report_per_file_coverage_results(@ceedling[:test_invoker].sources)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def summary
|
|
69
|
+
result_list = @ceedling[:file_path_utils].form_pass_results_filelist( GCOV_RESULTS_PATH, COLLECTION_ALL_TESTS )
|
|
70
|
+
|
|
71
|
+
# test results
|
|
72
|
+
# get test results for only those tests in our configuration and of those only tests with results on disk
|
|
73
|
+
hash = {
|
|
74
|
+
:header => GCOV_ROOT_NAME.upcase,
|
|
75
|
+
:results => @ceedling[:plugin_reportinator].assemble_test_results(result_list, {:boom => false})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@ceedling[:plugin_reportinator].run_test_results_report(hash)
|
|
79
|
+
|
|
80
|
+
# coverage results
|
|
81
|
+
# command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT_COVSRC)
|
|
82
|
+
# shell_result = @ceedling[:tool_executor].exec(command[:line], command[:options])
|
|
83
|
+
# report_coverage_results_all(shell_result[:output])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
private ###################################
|
|
87
|
+
|
|
88
|
+
def report_coverage_results_summary(sources)
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def report_per_file_coverage_results(sources)
|
|
93
|
+
banner = @ceedling[:plugin_reportinator].generate_banner "#{GCOV_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY"
|
|
94
|
+
@ceedling[:streaminator].stdout_puts "\n" + banner
|
|
95
|
+
|
|
96
|
+
sources.each do |source|
|
|
97
|
+
basename = File.basename(source)
|
|
98
|
+
command = @ceedling[:tool_executor].build_command_line(TOOLS_GCOV_REPORT, basename)
|
|
99
|
+
shell_results = @ceedling[:tool_executor].exec(command[:line], command[:options])
|
|
100
|
+
coverage_results = shell_results[:output]
|
|
101
|
+
|
|
102
|
+
if (coverage_results.strip =~ /(File\s+'#{Regexp.escape(source)}'.+$)/m)
|
|
103
|
+
report = ((($1.lines.to_a)[1..-1])).map{|line| basename + ' ' + line}.join('')
|
|
104
|
+
@ceedling[:streaminator].stdout_puts (report + "\n\n")
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# end blocks always executed following rake run
|
|
112
|
+
END {
|
|
113
|
+
# cache our input configurations to use in comparison upon next execution
|
|
114
|
+
@ceedling[:cacheinator].cache_test_config( @ceedling[:setupinator].config_hash ) if (@ceedling[:task_invoker].invoked?(/^#{GCOV_TASK_ROOT}/))
|
|
115
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
% function_string = hash[:coverage][:functions].to_s
|
|
2
|
+
% branch_string = hash[:coverage][:branches].to_s
|
|
3
|
+
% format_string = "%#{[function_string.length, branch_string.length].max}i"
|
|
4
|
+
<%=@ceedling[:plugin_reportinator].generate_banner("#{BULLSEYE_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY")%>
|
|
5
|
+
% if (!hash[:coverage][:functions].nil?)
|
|
6
|
+
FUNCTIONS: <%=sprintf(format_string, hash[:coverage][:functions])%>%
|
|
7
|
+
% else
|
|
8
|
+
FUNCTIONS: none
|
|
9
|
+
% end
|
|
10
|
+
% if (!hash[:coverage][:branches].nil?)
|
|
11
|
+
BRANCHES: <%=sprintf(format_string, hash[:coverage][:branches])%>%
|
|
12
|
+
% else
|
|
13
|
+
BRANCHES: none
|
|
14
|
+
% end
|
|
15
|
+
|
|
@@ -6,73 +6,13 @@ class StdoutPrettyTestsReport < Plugin
|
|
|
6
6
|
def setup
|
|
7
7
|
@result_list = []
|
|
8
8
|
|
|
9
|
-
template =
|
|
10
|
-
% ignored = hash[:results][:counts][:ignored]
|
|
11
|
-
% failed = hash[:results][:counts][:failed]
|
|
12
|
-
% stdout_count = hash[:results][:counts][:stdout]
|
|
13
|
-
% header_prepend = ((hash[:header].length > 0) ? "#{hash[:header]}: " : '')
|
|
14
|
-
% banner_width = 25 + header_prepend.length # widest message
|
|
9
|
+
template = @ceedling[:file_wrapper].read( File.join( PLUGINS_STDOUT_PRETTY_TESTS_REPORT_PATH, 'template.erb' ) )
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'IGNORED UNIT TEST SUMMARY')%>
|
|
18
|
-
% hash[:results][:ignores].each do |ignore|
|
|
19
|
-
[<%=ignore[:source][:file]%>]
|
|
20
|
-
% ignore[:collection].each do |item|
|
|
21
|
-
Test: <%=item[:test]%>
|
|
22
|
-
% if (not item[:message].empty?)
|
|
23
|
-
At line (<%=item[:line]%>): "<%=item[:message]%>"
|
|
24
|
-
% else
|
|
25
|
-
At line (<%=item[:line]%>)
|
|
26
|
-
% end
|
|
27
|
-
|
|
28
|
-
% end
|
|
29
|
-
% end
|
|
30
|
-
% end
|
|
31
|
-
% if (failed > 0)
|
|
32
|
-
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'FAILED UNIT TEST SUMMARY')%>
|
|
33
|
-
% hash[:results][:failures].each do |failure|
|
|
34
|
-
[<%=failure[:source][:file]%>]
|
|
35
|
-
% failure[:collection].each do |item|
|
|
36
|
-
Test: <%=item[:test]%>
|
|
37
|
-
% if (not item[:message].empty?)
|
|
38
|
-
At line (<%=item[:line]%>): "<%=item[:message]%>"
|
|
39
|
-
% else
|
|
40
|
-
At line (<%=item[:line]%>)
|
|
41
|
-
% end
|
|
42
|
-
|
|
43
|
-
% end
|
|
44
|
-
% end
|
|
45
|
-
% end
|
|
46
|
-
% if (stdout_count > 0)
|
|
47
|
-
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'UNIT TEST OTHER OUTPUT')%>
|
|
48
|
-
% hash[:results][:stdout].each do |string|
|
|
49
|
-
[<%=string[:source][:file]%>]
|
|
50
|
-
% string[:collection].each do |item|
|
|
51
|
-
- "<%=item%>"
|
|
52
|
-
% end
|
|
53
|
-
|
|
54
|
-
% end
|
|
55
|
-
% end
|
|
56
|
-
% total_string = hash[:results][:counts][:total].to_s
|
|
57
|
-
% format_string = "%#{total_string.length}i"
|
|
58
|
-
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'OVERALL UNIT TEST SUMMARY')%>
|
|
59
|
-
% if (hash[:results][:counts][:total] > 0)
|
|
60
|
-
TESTED: <%=hash[:results][:counts][:total].to_s%>
|
|
61
|
-
PASSED: <%=sprintf(format_string, hash[:results][:counts][:passed])%>
|
|
62
|
-
FAILED: <%=sprintf(format_string, failed)%>
|
|
63
|
-
IGNORED: <%=sprintf(format_string, ignored)%>
|
|
64
|
-
% else
|
|
65
|
-
|
|
66
|
-
No tests executed.
|
|
67
|
-
% end
|
|
68
|
-
|
|
69
|
-
}.left_margin
|
|
70
|
-
|
|
71
|
-
@ceedling[:plugin_reportinator].register_test_results_template( template )
|
|
11
|
+
@ceedling[:plugin_reportinator].register_test_results_template( template )
|
|
72
12
|
end
|
|
73
13
|
|
|
74
14
|
def post_test_execute(arg_hash)
|
|
75
|
-
return if not (arg_hash[:context] ==
|
|
15
|
+
return if not (arg_hash[:context] == TEST_SYM)
|
|
76
16
|
|
|
77
17
|
@result_list << arg_hash[:result_file]
|
|
78
18
|
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
% ignored = hash[:results][:counts][:ignored]
|
|
2
|
+
% failed = hash[:results][:counts][:failed]
|
|
3
|
+
% stdout_count = hash[:results][:counts][:stdout]
|
|
4
|
+
% header_prepend = ((hash[:header].length > 0) ? "#{hash[:header]}: " : '')
|
|
5
|
+
% banner_width = 25 + header_prepend.length # widest message
|
|
6
|
+
|
|
7
|
+
% if (ignored > 0)
|
|
8
|
+
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'IGNORED UNIT TEST SUMMARY')%>
|
|
9
|
+
% hash[:results][:ignores].each do |ignore|
|
|
10
|
+
[<%=ignore[:source][:file]%>]
|
|
11
|
+
% ignore[:collection].each do |item|
|
|
12
|
+
Test: <%=item[:test]%>
|
|
13
|
+
% if (not item[:message].empty?)
|
|
14
|
+
At line (<%=item[:line]%>): "<%=item[:message]%>"
|
|
15
|
+
% else
|
|
16
|
+
At line (<%=item[:line]%>)
|
|
17
|
+
% end
|
|
18
|
+
|
|
19
|
+
% end
|
|
20
|
+
% end
|
|
21
|
+
% end
|
|
22
|
+
% if (failed > 0)
|
|
23
|
+
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'FAILED UNIT TEST SUMMARY')%>
|
|
24
|
+
% hash[:results][:failures].each do |failure|
|
|
25
|
+
[<%=failure[:source][:file]%>]
|
|
26
|
+
% failure[:collection].each do |item|
|
|
27
|
+
Test: <%=item[:test]%>
|
|
28
|
+
% if (not item[:message].empty?)
|
|
29
|
+
At line (<%=item[:line]%>): "<%=item[:message]%>"
|
|
30
|
+
% else
|
|
31
|
+
At line (<%=item[:line]%>)
|
|
32
|
+
% end
|
|
33
|
+
|
|
34
|
+
% end
|
|
35
|
+
% end
|
|
36
|
+
% end
|
|
37
|
+
% if (stdout_count > 0)
|
|
38
|
+
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'UNIT TEST OTHER OUTPUT')%>
|
|
39
|
+
% hash[:results][:stdout].each do |string|
|
|
40
|
+
[<%=string[:source][:file]%>]
|
|
41
|
+
% string[:collection].each do |item|
|
|
42
|
+
- "<%=item%>"
|
|
43
|
+
% end
|
|
44
|
+
|
|
45
|
+
% end
|
|
46
|
+
% end
|
|
47
|
+
% total_string = hash[:results][:counts][:total].to_s
|
|
48
|
+
% format_string = "%#{total_string.length}i"
|
|
49
|
+
<%=@ceedling[:plugin_reportinator].generate_banner(header_prepend + 'OVERALL UNIT TEST SUMMARY')%>
|
|
50
|
+
% if (hash[:results][:counts][:total] > 0)
|
|
51
|
+
TESTED: <%=hash[:results][:counts][:total].to_s%>
|
|
52
|
+
PASSED: <%=sprintf(format_string, hash[:results][:counts][:passed])%>
|
|
53
|
+
FAILED: <%=sprintf(format_string, failed)%>
|
|
54
|
+
IGNORED: <%=sprintf(format_string, ignored)%>
|
|
55
|
+
% else
|
|
56
|
+
|
|
57
|
+
No tests executed.
|
|
58
|
+
% end
|
|
59
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
require 'plugin'
|
|
2
|
+
require 'constants'
|
|
3
|
+
|
|
4
|
+
class WarningsReport < Plugin
|
|
5
|
+
|
|
6
|
+
def setup
|
|
7
|
+
@stderr_redirect = nil
|
|
8
|
+
@log_paths = {}
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def pre_compile_execute( arg_hash )
|
|
12
|
+
# at beginning of compile, override tool's stderr_redirect so we can parse $stderr + $stdout
|
|
13
|
+
set_stderr_redirect( arg_hash )
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def post_compile_execute( arg_hash )
|
|
17
|
+
# after compilation, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
|
|
18
|
+
output = arg_hash[:shell_result][:output]
|
|
19
|
+
restore_stderr_redirect( arg_hash )
|
|
20
|
+
write_warning_log( arg_hash[:context], output )
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def pre_link_execute( arg_hash )
|
|
24
|
+
# at beginning of link, override tool's stderr_redirect so we can parse $stderr + $stdout
|
|
25
|
+
set_stderr_redirect( arg_hash )
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def post_link_execute( arg_hash )
|
|
29
|
+
# after linking, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
|
|
30
|
+
output = arg_hash[:shell_result][:output]
|
|
31
|
+
restore_stderr_redirect( arg_hash )
|
|
32
|
+
write_warning_log( arg_hash[:context], output )
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def set_stderr_redirect( hash )
|
|
38
|
+
@stderr_redirect = hash[:tool][:stderr_redirect]
|
|
39
|
+
hash[:tool][:stderr_redirect] = StdErrRedirect::AUTO
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def restore_stderr_redirect( hash )
|
|
43
|
+
hash[:tool][:stderr_redirect] = @stderr_redirect
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def write_warning_log( context, output )
|
|
47
|
+
# if $stderr/$stdout contain "warning", log it
|
|
48
|
+
if (output =~ /warning/i)
|
|
49
|
+
# generate a log path & file io write flags
|
|
50
|
+
logging = generate_log_path( context )
|
|
51
|
+
@ceedling[:file_wrapper].write( logging[:path], output + "\n", logging[:flags] ) if (not logging.nil?)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def generate_log_path( context )
|
|
56
|
+
# if path has already been generated, return it & 'append' file io flags (append to log)
|
|
57
|
+
return { :path => @log_paths[context], :flags => 'a' } if (not @log_paths[context].nil?)
|
|
58
|
+
|
|
59
|
+
# first time through, generate path & 'write' file io flags (create new log)
|
|
60
|
+
base_path = File.join( PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s )
|
|
61
|
+
file_path = File.join( base_path, 'warnings.log' )
|
|
62
|
+
|
|
63
|
+
if (@ceedling[:file_wrapper].exist?( base_path ))
|
|
64
|
+
@log_paths[context] = file_path
|
|
65
|
+
return { :path => file_path, :flags => 'w' }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
return nil
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
172
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
1.2
|
|
1
|
+
1.2
|
|
2
2
|
|
|
@@ -22,7 +22,8 @@ const char* UnityStrExpected = " Expected ";
|
|
|
22
22
|
const char* UnityStrWas = " Was ";
|
|
23
23
|
const char* UnityStrTo = " To ";
|
|
24
24
|
const char* UnityStrElement = " Element ";
|
|
25
|
-
const char*
|
|
25
|
+
const char* UnityStrByte = " Byte ";
|
|
26
|
+
const char* UnityStrMemory = " Memory Mismatch.";
|
|
26
27
|
const char* UnityStrDelta = " Values Not Within Delta ";
|
|
27
28
|
const char* UnityStrPointless= " You Asked Me To Compare Nothing, Which Was Pointless.";
|
|
28
29
|
const char* UnityStrNullPointerForExpected= " Expected pointer to be NULL";
|
|
@@ -725,9 +726,10 @@ void UnityAssertEqualMemory( const void* expected,
|
|
|
725
726
|
const char* msg,
|
|
726
727
|
const UNITY_LINE_TYPE lineNumber)
|
|
727
728
|
{
|
|
728
|
-
unsigned char*
|
|
729
|
-
unsigned char*
|
|
729
|
+
unsigned char* ptr_exp = (unsigned char*)expected;
|
|
730
|
+
unsigned char* ptr_act = (unsigned char*)actual;
|
|
730
731
|
_UU32 elements = num_elements;
|
|
732
|
+
_UU32 bytes;
|
|
731
733
|
|
|
732
734
|
UNITY_SKIP_EXECUTION;
|
|
733
735
|
|
|
@@ -744,26 +746,33 @@ void UnityAssertEqualMemory( const void* expected,
|
|
|
744
746
|
|
|
745
747
|
while (elements--)
|
|
746
748
|
{
|
|
747
|
-
|
|
749
|
+
/////////////////////////////////////
|
|
750
|
+
bytes = length;
|
|
751
|
+
while (bytes--)
|
|
748
752
|
{
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
753
|
+
if (*ptr_exp != *ptr_act)
|
|
754
|
+
{
|
|
755
|
+
UnityTestResultsFailBegin(lineNumber);
|
|
756
|
+
UnityPrint(UnityStrMemory);
|
|
757
|
+
if (num_elements > 1)
|
|
758
|
+
{
|
|
759
|
+
UnityPrint(UnityStrElement);
|
|
760
|
+
UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
|
|
761
|
+
}
|
|
762
|
+
UnityPrint(UnityStrByte);
|
|
763
|
+
UnityPrintNumberByStyle((length - bytes - 1), UNITY_DISPLAY_STYLE_UINT);
|
|
764
|
+
UnityPrint(UnityStrExpected);
|
|
765
|
+
UnityPrintNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8);
|
|
766
|
+
UnityPrint(UnityStrWas);
|
|
767
|
+
UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
|
|
768
|
+
UnityAddMsgIfSpecified(msg);
|
|
769
|
+
UNITY_FAIL_AND_BAIL;
|
|
770
|
+
}
|
|
771
|
+
ptr_exp += 1;
|
|
772
|
+
ptr_act += 1;
|
|
763
773
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
UNITY_FAIL_AND_BAIL;
|
|
774
|
+
/////////////////////////////////////
|
|
775
|
+
|
|
767
776
|
}
|
|
768
777
|
}
|
|
769
778
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ceedling
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.0.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Mike Karlesky, Mark VanderVoord
|
|
@@ -17,7 +17,7 @@ autorequire:
|
|
|
17
17
|
bindir: bin
|
|
18
18
|
cert_chain: []
|
|
19
19
|
|
|
20
|
-
date: 2011-04-
|
|
20
|
+
date: 2011-04-05 00:00:00 -04:00
|
|
21
21
|
default_executable:
|
|
22
22
|
dependencies:
|
|
23
23
|
- !ruby/object:Gem::Dependency
|
|
@@ -165,9 +165,10 @@ files:
|
|
|
165
165
|
- new_project_template/src/.gitkeep
|
|
166
166
|
- new_project_template/test/.gitkeep
|
|
167
167
|
- new_project_template/test/support/.gitkeep
|
|
168
|
-
- new_project_template/vendor/ceedling/docs/
|
|
168
|
+
- new_project_template/vendor/ceedling/docs/CExceptionSummary.pdf
|
|
169
|
+
- new_project_template/vendor/ceedling/docs/CMock Summary.pdf
|
|
169
170
|
- new_project_template/vendor/ceedling/docs/Ceedling Packet.pdf
|
|
170
|
-
- new_project_template/vendor/ceedling/docs/
|
|
171
|
+
- new_project_template/vendor/ceedling/docs/Unity Summary.pdf
|
|
171
172
|
- new_project_template/vendor/ceedling/lib/cacheinator.rb
|
|
172
173
|
- new_project_template/vendor/ceedling/lib/cacheinator_helper.rb
|
|
173
174
|
- new_project_template/vendor/ceedling/lib/cmock_builder.rb
|
|
@@ -219,6 +220,7 @@ files:
|
|
|
219
220
|
- new_project_template/vendor/ceedling/lib/stream_wrapper.rb
|
|
220
221
|
- new_project_template/vendor/ceedling/lib/streaminator.rb
|
|
221
222
|
- new_project_template/vendor/ceedling/lib/streaminator_helper.rb
|
|
223
|
+
- new_project_template/vendor/ceedling/lib/system_utils.rb
|
|
222
224
|
- new_project_template/vendor/ceedling/lib/system_wrapper.rb
|
|
223
225
|
- new_project_template/vendor/ceedling/lib/task_invoker.rb
|
|
224
226
|
- new_project_template/vendor/ceedling/lib/tasks_base.rake
|
|
@@ -233,30 +235,29 @@ files:
|
|
|
233
235
|
- new_project_template/vendor/ceedling/lib/tool_executor_helper.rb
|
|
234
236
|
- new_project_template/vendor/ceedling/lib/verbosinator.rb
|
|
235
237
|
- new_project_template/vendor/ceedling/lib/yaml_wrapper.rb
|
|
238
|
+
- new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rake
|
|
239
|
+
- new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rb
|
|
240
|
+
- new_project_template/vendor/ceedling/plugins/bullseye/defaults.yml
|
|
241
|
+
- new_project_template/vendor/ceedling/plugins/bullseye/template.erb
|
|
242
|
+
- new_project_template/vendor/ceedling/plugins/gcov/defaults.yml
|
|
243
|
+
- new_project_template/vendor/ceedling/plugins/gcov/gcov.rake
|
|
244
|
+
- new_project_template/vendor/ceedling/plugins/gcov/gcov.rb
|
|
245
|
+
- new_project_template/vendor/ceedling/plugins/gcov/template.erb
|
|
236
246
|
- new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.rb
|
|
237
247
|
- new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.yml
|
|
238
248
|
- new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
|
|
239
249
|
- new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.yml
|
|
250
|
+
- new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/template.erb
|
|
251
|
+
- new_project_template/vendor/ceedling/plugins/warnings_report/warnings_report.rb
|
|
240
252
|
- new_project_template/vendor/ceedling/plugins/xml_tests_report/xml_tests_report.rb
|
|
241
|
-
- new_project_template/vendor/ceedling/rakefile.rb
|
|
242
|
-
- new_project_template/vendor/ceedling/rakefile_helper.rb
|
|
243
253
|
- new_project_template/vendor/ceedling/release/build.info
|
|
244
254
|
- new_project_template/vendor/ceedling/release/version.info
|
|
245
|
-
- new_project_template/vendor/ceedling/vendor/c_exception/docs/CExceptionSummary.odt
|
|
246
|
-
- new_project_template/vendor/ceedling/vendor/c_exception/docs/CExceptionSummary.pdf
|
|
247
|
-
- new_project_template/vendor/ceedling/vendor/c_exception/docs/license.txt
|
|
248
|
-
- new_project_template/vendor/ceedling/vendor/c_exception/docs/readme.txt
|
|
249
255
|
- new_project_template/vendor/ceedling/vendor/c_exception/lib/CException.c
|
|
250
256
|
- new_project_template/vendor/ceedling/vendor/c_exception/lib/CException.h
|
|
251
257
|
- new_project_template/vendor/ceedling/vendor/c_exception/release/build.info
|
|
252
258
|
- new_project_template/vendor/ceedling/vendor/c_exception/release/version.info
|
|
253
|
-
- new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf
|
|
254
|
-
- new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.txt
|
|
255
259
|
- new_project_template/vendor/ceedling/vendor/cmock/config/production_environment.rb
|
|
256
260
|
- new_project_template/vendor/ceedling/vendor/cmock/config/test_environment.rb
|
|
257
|
-
- new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.odt
|
|
258
|
-
- new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.pdf
|
|
259
|
-
- new_project_template/vendor/ceedling/vendor/cmock/docs/license.txt
|
|
260
261
|
- new_project_template/vendor/ceedling/vendor/cmock/lib/cmock.rb
|
|
261
262
|
- new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_config.rb
|
|
262
263
|
- new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_file_writer.rb
|
|
@@ -276,19 +277,9 @@ files:
|
|
|
276
277
|
- new_project_template/vendor/ceedling/vendor/cmock/src/cmock.h
|
|
277
278
|
- new_project_template/vendor/ceedling/vendor/constructor/lib/constructor.rb
|
|
278
279
|
- new_project_template/vendor/ceedling/vendor/constructor/lib/constructor_struct.rb
|
|
279
|
-
- new_project_template/vendor/ceedling/vendor/deep_merge/MIT-LICENSE
|
|
280
|
-
- new_project_template/vendor/ceedling/vendor/deep_merge/README
|
|
281
|
-
- new_project_template/vendor/ceedling/vendor/deep_merge/Rakefile
|
|
282
280
|
- new_project_template/vendor/ceedling/vendor/deep_merge/lib/deep_merge.rb
|
|
283
|
-
- new_project_template/vendor/ceedling/vendor/deep_merge/test/test_deep_merge.rb
|
|
284
|
-
- new_project_template/vendor/ceedling/vendor/diy/History.txt
|
|
285
|
-
- new_project_template/vendor/ceedling/vendor/diy/README.rdoc
|
|
286
281
|
- new_project_template/vendor/ceedling/vendor/diy/lib/diy.rb
|
|
287
282
|
- new_project_template/vendor/ceedling/vendor/diy/lib/diy/factory.rb
|
|
288
|
-
- new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.odt
|
|
289
|
-
- new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.pdf
|
|
290
|
-
- new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.txt
|
|
291
|
-
- new_project_template/vendor/ceedling/vendor/unity/docs/license.txt
|
|
292
283
|
- new_project_template/vendor/ceedling/vendor/unity/release/build.info
|
|
293
284
|
- new_project_template/vendor/ceedling/vendor/unity/release/version.info
|
|
294
285
|
- new_project_template/vendor/ceedling/vendor/unity/src/unity.c
|