ceedling 0.15.5 → 0.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +13 -9
- data/README.md +4 -0
- data/bin/ceedling +1 -1
- data/ceedling-0.15.5.gem +0 -0
- data/ceedling.gemspec +1 -1
- data/lib/ceedling/configurator_builder.rb +63 -70
- data/lib/ceedling/defaults.rb +12 -9
- data/lib/ceedling/dependinator.rb +4 -12
- data/lib/ceedling/generator.rb +3 -2
- data/lib/ceedling/generator_test_runner.rb +2 -2
- data/lib/ceedling/tasks_base.rake +9 -16
- data/lib/ceedling/version.rb +1 -1
- data/lib/ceedling/version.rb.erb +1 -1
- data/spec/ceedling_spec.rb +27 -27
- data/spec/par_map_spec.rb +8 -8
- data/spec/preprocessinator_extractor_spec.rb +2 -2
- data/spec/preprocessinator_includes_handler_spec.rb +24 -24
- data/spec/spec_helper.rb +3 -3
- data/spec/spec_system_helper.rb +14 -14
- data/spec/system/deployment_spec.rb +9 -9
- data/test_graveyard/unit/busted/configurator_builder_test.rb +68 -70
- data/vendor/unity/auto/generate_test_runner.rb +2 -3
- data/vendor/unity/auto/unity_test_summary.rb +16 -16
- data/vendor/unity/src/unity.c +5 -2
- data/vendor/unity/src/unity_internals.h +10 -7
- data/vendor/unity/test/rakefile_helper.rb +2 -2
- metadata +5 -6
- data/release/build.info +0 -2
- data/release/version.info +0 -1
@@ -78,7 +78,7 @@ class UnityTestRunnerGenerator
|
|
78
78
|
|
79
79
|
lines.each_with_index do |line, index|
|
80
80
|
#find tests
|
81
|
-
if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+(test
|
81
|
+
if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+((?:test.*)|(?:spec.*))\s*\(\s*(.*)\s*\)/
|
82
82
|
arguments = $1
|
83
83
|
name = $2
|
84
84
|
call = $3
|
@@ -266,8 +266,7 @@ class UnityTestRunnerGenerator
|
|
266
266
|
output.puts("int main(void)")
|
267
267
|
output.puts("{")
|
268
268
|
output.puts(" suite_setup();") unless @options[:suite_setup].nil?
|
269
|
-
output.puts(" UnityBegin();")
|
270
|
-
output.puts(" Unity.TestFile = \"#{filename}\";")
|
269
|
+
output.puts(" UnityBegin(\"#{filename}\");")
|
271
270
|
if (@options[:use_param_tests])
|
272
271
|
tests.each do |test|
|
273
272
|
if ((test[:args].nil?) or (test[:args].empty?))
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Unity Project - A Test Framework for C
|
3
3
|
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
4
|
# [Released under MIT License. Please refer to license.txt for details]
|
5
|
-
# ==========================================
|
5
|
+
# ==========================================
|
6
6
|
|
7
7
|
#!/usr/bin/ruby
|
8
8
|
#
|
@@ -15,22 +15,22 @@ class UnityTestSummary
|
|
15
15
|
include FileUtils::Verbose
|
16
16
|
|
17
17
|
attr_reader :report, :total_tests, :failures, :ignored
|
18
|
-
|
18
|
+
|
19
19
|
def initialize
|
20
20
|
@report = ''
|
21
21
|
@total_tests = 0
|
22
22
|
@failures = 0
|
23
23
|
@ignored = 0
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def run
|
27
27
|
# Clean up result file names
|
28
28
|
results = @targets.map {|target| target.gsub(/\\/,'/')}
|
29
|
-
|
30
|
-
# Dig through each result file, looking for details on pass/fail:
|
29
|
+
|
30
|
+
# Dig through each result file, looking for details on pass/fail:
|
31
31
|
failure_output = []
|
32
32
|
ignore_output = []
|
33
|
-
|
33
|
+
|
34
34
|
results.each do |result_file|
|
35
35
|
lines = File.readlines(result_file).map { |line| line.chomp }
|
36
36
|
if lines.length == 0
|
@@ -45,7 +45,7 @@ class UnityTestSummary
|
|
45
45
|
@ignored += ignored
|
46
46
|
end
|
47
47
|
end
|
48
|
-
|
48
|
+
|
49
49
|
if @ignored > 0
|
50
50
|
@report += "\n"
|
51
51
|
@report += "--------------------------\n"
|
@@ -53,7 +53,7 @@ class UnityTestSummary
|
|
53
53
|
@report += "--------------------------\n"
|
54
54
|
@report += ignore_output.flatten.join("\n")
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
if @failures > 0
|
58
58
|
@report += "\n"
|
59
59
|
@report += "--------------------------\n"
|
@@ -61,7 +61,7 @@ class UnityTestSummary
|
|
61
61
|
@report += "--------------------------\n"
|
62
62
|
@report += failure_output.flatten.join("\n")
|
63
63
|
end
|
64
|
-
|
64
|
+
|
65
65
|
@report += "\n"
|
66
66
|
@report += "--------------------------\n"
|
67
67
|
@report += "OVERALL UNITY TEST SUMMARY\n"
|
@@ -69,11 +69,11 @@ class UnityTestSummary
|
|
69
69
|
@report += "#{@total_tests} TOTAL TESTS #{@failures} TOTAL FAILURES #{@ignored} IGNORED\n"
|
70
70
|
@report += "\n"
|
71
71
|
end
|
72
|
-
|
72
|
+
|
73
73
|
def set_targets(target_array)
|
74
74
|
@targets = target_array
|
75
75
|
end
|
76
|
-
|
76
|
+
|
77
77
|
def set_root_path(path)
|
78
78
|
@root = path
|
79
79
|
end
|
@@ -88,7 +88,7 @@ class UnityTestSummary
|
|
88
88
|
puts " root_path - Helpful for producing more verbose output if using relative paths."
|
89
89
|
exit 1
|
90
90
|
end
|
91
|
-
|
91
|
+
|
92
92
|
protected
|
93
93
|
|
94
94
|
def get_details(result_file, lines)
|
@@ -104,7 +104,7 @@ class UnityTestSummary
|
|
104
104
|
end
|
105
105
|
return results
|
106
106
|
end
|
107
|
-
|
107
|
+
|
108
108
|
def parse_test_summary(summary)
|
109
109
|
if summary.find { |v| v =~ /(\d+) Tests (\d+) Failures (\d+) Ignored/ }
|
110
110
|
[$1.to_i,$2.to_i,$3.to_i]
|
@@ -114,7 +114,7 @@ class UnityTestSummary
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def here; File.expand_path(File.dirname(__FILE__)); end
|
117
|
-
|
117
|
+
|
118
118
|
end
|
119
119
|
|
120
120
|
if $0 == __FILE__
|
@@ -126,11 +126,11 @@ if $0 == __FILE__
|
|
126
126
|
results = Dir[targets]
|
127
127
|
raise "No *.testpass or *.testfail files found in '#{targets}'" if results.empty?
|
128
128
|
uts.set_targets(results)
|
129
|
-
|
129
|
+
|
130
130
|
#set the root path
|
131
131
|
ARGV[1] ||= File.expand_path(File.dirname(__FILE__)) + '/'
|
132
132
|
uts.set_root_path(ARGV[1])
|
133
|
-
|
133
|
+
|
134
134
|
#run the summarizer
|
135
135
|
puts uts.run
|
136
136
|
rescue Exception => e
|
data/vendor/unity/src/unity.c
CHANGED
@@ -1102,9 +1102,9 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
|
|
1102
1102
|
}
|
1103
1103
|
|
1104
1104
|
//-----------------------------------------------
|
1105
|
-
void UnityBegin(
|
1105
|
+
void UnityBegin(const char* filename)
|
1106
1106
|
{
|
1107
|
-
Unity.TestFile =
|
1107
|
+
Unity.TestFile = filename;
|
1108
1108
|
Unity.CurrentTestName = NULL;
|
1109
1109
|
Unity.CurrentTestLineNumber = 0;
|
1110
1110
|
Unity.NumberOfTests = 0;
|
@@ -1112,6 +1112,8 @@ void UnityBegin(void)
|
|
1112
1112
|
Unity.TestIgnores = 0;
|
1113
1113
|
Unity.CurrentTestFailed = 0;
|
1114
1114
|
Unity.CurrentTestIgnored = 0;
|
1115
|
+
|
1116
|
+
UNITY_OUTPUT_START();
|
1115
1117
|
}
|
1116
1118
|
|
1117
1119
|
//-----------------------------------------------
|
@@ -1136,6 +1138,7 @@ int UnityEnd(void)
|
|
1136
1138
|
UnityPrintFail();
|
1137
1139
|
}
|
1138
1140
|
UNITY_PRINT_EOL;
|
1141
|
+
UNITY_OUTPUT_COMPLETE();
|
1139
1142
|
return (int)(Unity.TestFailures);
|
1140
1143
|
}
|
1141
1144
|
|
@@ -258,20 +258,23 @@ typedef UNITY_DOUBLE_TYPE _UD;
|
|
258
258
|
#endif
|
259
259
|
|
260
260
|
//-------------------------------------------------------
|
261
|
-
// Output Method
|
261
|
+
// Output Method: stdout (DEFAULT)
|
262
262
|
//-------------------------------------------------------
|
263
|
-
|
264
263
|
#ifndef UNITY_OUTPUT_CHAR
|
265
|
-
|
266
264
|
//Default to using putchar, which is defined in stdio.h
|
267
265
|
#include <stdio.h>
|
268
266
|
#define UNITY_OUTPUT_CHAR(a) putchar(a)
|
269
|
-
|
270
267
|
#else
|
271
|
-
|
272
268
|
//If defined as something else, make sure we declare it here so it's ready for use
|
273
269
|
extern int UNITY_OUTPUT_CHAR(int);
|
270
|
+
#endif
|
271
|
+
|
272
|
+
#ifndef UNITY_OUTPUT_START
|
273
|
+
#define UNITY_OUTPUT_START()
|
274
|
+
#endif
|
274
275
|
|
276
|
+
#ifndef UNITY_OUTPUT_COMPLETE
|
277
|
+
#define UNITY_OUTPUT_COMPLETE()
|
275
278
|
#endif
|
276
279
|
|
277
280
|
//-------------------------------------------------------
|
@@ -388,7 +391,7 @@ extern struct _Unity Unity;
|
|
388
391
|
// Test Suite Management
|
389
392
|
//-------------------------------------------------------
|
390
393
|
|
391
|
-
void UnityBegin(
|
394
|
+
void UnityBegin(const char* filename);
|
392
395
|
int UnityEnd(void);
|
393
396
|
void UnityConcludeTest(void);
|
394
397
|
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
|
@@ -544,7 +547,7 @@ extern const char* UnityStrErr64;
|
|
544
547
|
#define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
|
545
548
|
|
546
549
|
#ifndef UNITY_BEGIN
|
547
|
-
#define UNITY_BEGIN()
|
550
|
+
#define UNITY_BEGIN() UnityBegin(__FILE__)
|
548
551
|
#endif
|
549
552
|
|
550
553
|
#ifndef UNITY_END
|
@@ -172,12 +172,12 @@ module RakefileHelpers
|
|
172
172
|
|
173
173
|
def report_summary
|
174
174
|
summary = UnityTestSummary.new
|
175
|
-
summary.set_root_path(UNITY_ROOT
|
175
|
+
summary.set_root_path(UNITY_ROOT)
|
176
176
|
results_glob = "#{$cfg['compiler']['build_path']}*.test*"
|
177
177
|
results_glob.gsub!(/\\/, '/')
|
178
178
|
results = Dir[results_glob]
|
179
179
|
summary.set_targets(results)
|
180
|
-
summary.run
|
180
|
+
report summary.run
|
181
181
|
end
|
182
182
|
|
183
183
|
def run_tests(test_files)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ceedling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Karlesky, Mark VanderVoord
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-08-
|
13
|
+
date: 2014-08-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
@@ -53,6 +53,8 @@ files:
|
|
53
53
|
- vendor/cmock/docs/CMock Summary.pdf
|
54
54
|
- vendor/unity/docs/Unity Summary.pdf
|
55
55
|
- docs/CeedlingPacket.pdf
|
56
|
+
- vendor/cmock/docs/CMock_Summary.md
|
57
|
+
- docs/CeedlingPacket.md
|
56
58
|
- vendor/cmock/lib/cmock.rb
|
57
59
|
- vendor/cmock/lib/cmock_config.rb
|
58
60
|
- vendor/cmock/lib/cmock_file_writer.rb
|
@@ -100,10 +102,10 @@ files:
|
|
100
102
|
- assets/rakefile_with_guts.rb
|
101
103
|
- assets/test_example_file.c
|
102
104
|
- bin/ceedling
|
105
|
+
- ceedling-0.15.5.gem
|
103
106
|
- ceedling.gemspec
|
104
107
|
- config/test_environment.rb
|
105
108
|
- docs/CeedlingLogo.png
|
106
|
-
- docs/CeedlingPacket.md
|
107
109
|
- docs/CeedlingPacket.odt
|
108
110
|
- examples/blinky/project.yml
|
109
111
|
- examples/blinky/rakefile.rb
|
@@ -298,8 +300,6 @@ files:
|
|
298
300
|
- plugins/xml_tests_report/xml_tests_report.rb
|
299
301
|
- Rakefile
|
300
302
|
- README.md
|
301
|
-
- release/build.info
|
302
|
-
- release/version.info
|
303
303
|
- spec/ceedling_spec.rb
|
304
304
|
- spec/configurator_builder_spec.rb
|
305
305
|
- spec/configurator_helper_spec.rb
|
@@ -400,7 +400,6 @@ files:
|
|
400
400
|
- vendor/c_exception/test/TestException.c
|
401
401
|
- vendor/c_exception/test/TestException_Runner.c
|
402
402
|
- vendor/cmock/docs/CMock Summary.odt
|
403
|
-
- vendor/cmock/docs/CMock_Summary.md
|
404
403
|
- vendor/cmock/docs/license.txt
|
405
404
|
- vendor/cmock/examples/gcc.yml
|
406
405
|
- vendor/cmock/examples/iar_v4.yml
|
data/release/build.info
DELETED
data/release/version.info
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.15.1
|