mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-29 05:27:25 +00:00
Further cleanup based on server results
This commit is contained in:
@@ -6,3 +6,4 @@ Gemfile.lock
|
||||
.DS_Store
|
||||
*.swp
|
||||
examples/make_example/build
|
||||
examples/temp_sensor/build
|
||||
|
||||
@@ -26,11 +26,3 @@ install:
|
||||
|
||||
script:
|
||||
- cd test && rake ci
|
||||
- cd ..
|
||||
- cd examples && cd make_example
|
||||
- make clean
|
||||
- make setup
|
||||
- make test
|
||||
- cd ..
|
||||
- cd temp_sensor
|
||||
- rake ci
|
||||
|
||||
@@ -27,7 +27,7 @@ module RakefileHelpers
|
||||
|
||||
def unit_test_files
|
||||
path = $cfg['compiler']['unit_tests_path'] + 'Test*' + C_EXTENSION
|
||||
path.gsub!(/\\/, '/')
|
||||
path.tr!('\\', '/')
|
||||
FileList.new(path)
|
||||
end
|
||||
|
||||
@@ -162,7 +162,7 @@ module RakefileHelpers
|
||||
summary = UnityTestSummary.new
|
||||
summary.root = HERE
|
||||
results_glob = "#{$cfg['compiler']['build_path']}*.test*"
|
||||
results_glob.gsub!(/\\/, '/')
|
||||
results_glob.tr!('\\', '/')
|
||||
results = Dir[results_glob]
|
||||
summary.targets = results
|
||||
report summary.run
|
||||
|
||||
@@ -37,7 +37,7 @@ class CMockUnityHelperParser
|
||||
@config.treat_as.each_pair do |ctype, expecttype|
|
||||
c_type = ctype.gsub(/\s+/, '_')
|
||||
if expecttype =~ /\*/
|
||||
c_types[c_type] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype.gsub(/\*/, '')}_ARRAY"
|
||||
c_types[c_type] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype.delete('*')}_ARRAY"
|
||||
else
|
||||
c_types[c_type] = "UNITY_TEST_ASSERT_EQUAL_#{expecttype}"
|
||||
c_types[c_type + '*'] ||= "UNITY_TEST_ASSERT_EQUAL_#{expecttype}_ARRAY"
|
||||
|
||||
@@ -28,7 +28,7 @@ end
|
||||
|
||||
all_headers_to_mock = []
|
||||
|
||||
suppress_error = !ARGV.nil? && !ARGV.empty? && (ARGV[0].upcase == '--SILENT')
|
||||
suppress_error = !ARGV.nil? && !ARGV.empty? && (ARGV[0].casecmp('--SILENT') == 0)
|
||||
|
||||
File.open(TEST_MAKEFILE, 'w') do |mkfile|
|
||||
# Define make variables
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
suppress_error = !ARGV.nil? && !ARGV.empty? && (ARGV[0].upcase == '--SILENT')
|
||||
suppress_error = !ARGV.nil? && !ARGV.empty? && (ARGV[0].casecmp('--SILENT') == 0)
|
||||
|
||||
begin
|
||||
require "#{ENV['UNITY_DIR']}/auto/unity_test_summary.rb"
|
||||
|
||||
+6
-1
@@ -32,7 +32,7 @@ configure_clean
|
||||
configure_toolchain(DEFAULT_CONFIG_FILE)
|
||||
|
||||
task :default => [:test]
|
||||
task :ci => [:no_color, :default, 'style:check', 'style:c']
|
||||
task :ci => [:no_color, :default, 'test:examples', 'style:check', 'style:c']
|
||||
task :cruise => :ci
|
||||
|
||||
desc "Load configuration"
|
||||
@@ -89,6 +89,11 @@ namespace :test do
|
||||
run_system_test_compilations(compile_tests_to_run)
|
||||
end
|
||||
|
||||
desc "Test cmock examples"
|
||||
task :examples => [:prep_system_tests] do
|
||||
run_examples()
|
||||
end
|
||||
|
||||
#individual system tests
|
||||
FileList['system/test_interactions/*.yml'].each do |test|
|
||||
basename = File.basename(test,'.*')
|
||||
|
||||
@@ -386,6 +386,15 @@ module RakefileHelpers
|
||||
end
|
||||
end
|
||||
|
||||
def run_examples()
|
||||
[ "cd #{File.join("..","examples","make_example")} && make clean && make setup && make test",
|
||||
"cd #{File.join("..","examples","temp_sensor")} && rake ci"
|
||||
].each do |cmd|
|
||||
report "Testing '#{cmd}'"
|
||||
execute(cmd, false)
|
||||
end
|
||||
end
|
||||
|
||||
def fail_out(msg)
|
||||
puts msg
|
||||
exit(-1)
|
||||
|
||||
Reference in New Issue
Block a user