1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Refactor all yaml files for self-tests to fit Ceedling format for wider reuse.

Fix mistake in unity selftest without output spy running.
Namespace self-tests for consistency across ThrowTheSwitch projects (like being able to test:all)
Reduce clutter of NAMED self-tests in task list.
This commit is contained in:
mvandervoord
2019-12-13 20:38:42 -05:00
parent e3132cdddd
commit 3f71d10b2e
20 changed files with 1229 additions and 1235 deletions

View File

@@ -29,31 +29,31 @@ include RakefileHelpers
DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml' DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'
configure_toolchain(DEFAULT_CONFIG_FILE) configure_toolchain(DEFAULT_CONFIG_FILE)
desc "Test unity with its own unit tests"
task :unit => [:prepare_for_tests] do
run_tests unit_test_files
end
desc "Test unity's helper scripts"
task :scripts => [:prepare_for_tests] do
Dir['tests/test_*.rb'].each do |scriptfile|
require "./"+scriptfile
end
end
desc "Run all rspecs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/**/*_spec.rb'
end
desc "Generate test summary"
task :summary do
report_summary
end
namespace :test do namespace :test do
desc "Build and test Unity" desc "Build and test Unity"
task :all => [:clean, :prepare_for_tests, :scripts, :unit, :style, :summary] task :all => [:clean, :prepare_for_tests, 'test:scripts', 'test:unit', :style, 'test:summary']
desc "Test unity with its own unit tests"
task :unit => [:prepare_for_tests] do
run_tests unit_test_files
end
desc "Test unity's helper scripts"
task :scripts => [:prepare_for_tests] do
Dir['tests/test_*.rb'].each do |scriptfile|
require "./"+scriptfile
end
end
desc "Run all rspecs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/**/*_spec.rb'
end
desc "Generate test summary"
task :summary do
report_summary
end
end end
# Shorthand for many common tasks # Shorthand for many common tasks
@@ -86,7 +86,7 @@ namespace :style do
namespace :check do namespace :check do
Dir['../**/*.rb'].each do |f| Dir['../**/*.rb'].each do |f|
filename = File.basename(f, '.rb') filename = File.basename(f, '.rb')
desc "Check Style of #{filename}" #desc "Check Style of #{filename}"
task filename.to_sym => ['style:clean'] do task filename.to_sym => ['style:clean'] do
report execute("rubocop #{f} --color --config .rubocop.yml", true) report execute("rubocop #{f} --color --config .rubocop.yml", true)
report "Style Checked for #{f}" report "Style Checked for #{f}"
@@ -102,7 +102,7 @@ namespace :style do
namespace :c do namespace :c do
Dir['../{src,extras/**}/*.{c,h}'].each do |f| Dir['../{src,extras/**}/*.{c,h}'].each do |f|
filename = File.basename(f)[0..-3] filename = File.basename(f)[0..-3]
desc "Check Style of #{filename}" #desc "Check Style of #{filename}"
task filename.to_sym do task filename.to_sym do
run_astyle f run_astyle f
end end

View File

@@ -22,7 +22,7 @@ module RakefileHelpers
end end
def configure_clean def configure_clean
CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil? CLEAN.include('build/*.*')
end end
def configure_toolchain(config_file = DEFAULT_CONFIG_FILE) def configure_toolchain(config_file = DEFAULT_CONFIG_FILE)
@@ -33,13 +33,16 @@ module RakefileHelpers
end end
def unit_test_files def unit_test_files
path = $cfg['compiler']['unit_tests_path'] + 'test*' + C_EXTENSION path = 'tests/test*' + C_EXTENSION
path.tr!('\\', '/') path.tr!('\\', '/')
FileList.new(path) FileList.new(path)
end end
def local_include_dirs def local_include_dirs
include_dirs = $cfg['compiler']['includes']['items'].dup include_dirs = $cfg[:paths][:includes].dup || []
include_dirs += $cfg[:paths][:source].dup || []
include_dirs += $cfg[:paths][:test].dup || []
include_dirs += $cfg[:paths][:support].dup || []
include_dirs.delete_if { |dir| dir.is_a?(Array) } include_dirs.delete_if { |dir| dir.is_a?(Array) }
include_dirs include_dirs
end end
@@ -86,75 +89,71 @@ module RakefileHelpers
end end
end end
def build_compiler_fields(inject_defines) def build_command_string(hash, values, defines = nil)
command = tackit($cfg['compiler']['path'])
defines = if $cfg['compiler']['defines']['items'].nil?
''
else
squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=putcharSpy'] + ['UNITY_OUTPUT_CHAR_HEADER_DECLARATION="putcharSpy(int)"'] + inject_defines)
end
options = squash('', $cfg['compiler']['options'])
includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items'])
includes = includes.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
{ :command => command, :defines => defines, :options => options, :includes => includes } # Replace named and numbered slots
args = []
hash[:arguments].each do |arg|
if arg.include? '$'
if arg.include? ': COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
pattern = arg.gsub(': COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE','')
[ File.join('..','src') ].each do |f|
args << pattern.gsub(/\$/,f)
end
elsif arg.include? ': COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
pattern = arg.gsub(': COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR','')
[ 'src', File.join('tests'), File.join('testdata'), $cfg[:paths][:support] ].flatten.uniq.compact.each do |f|
args << pattern.gsub(/\$/,f)
end
elsif arg.include? ': COLLECTION_DEFINES_TEST_AND_VENDOR'
pattern = arg.gsub(': COLLECTION_DEFINES_TEST_AND_VENDOR','')
[ 'TEST', $cfg[:defines][:test], defines ].flatten.uniq.compact.each do |f|
args << pattern.gsub(/\$/,f)
end
elsif arg =~ /\$\{(\d+)\}/
i = $1.to_i - 1
if (values[i].is_a?(Array))
values[i].each {|v| args << arg.gsub(/\$\{\d+\}/, v)}
else
args << arg.gsub(/\$\{(\d)+\}/, values[i] || '')
end
else
args << arg
end
else
args << arg
end
end
# Build Command
return tackit(hash[:executable]) + squash('', args)
end end
def compile(file, defines = []) def compile(file, defines = [])
compiler = build_compiler_fields(defines) out_file = File.basename(file, C_EXTENSION) + $cfg[:extension][:object]
cmd_str = "#{compiler[:command]}#{compiler[:defines]}#{compiler[:options]}#{compiler[:includes]} #{file} " \ cmd_str = build_command_string( $cfg[:tools][:test_compiler], [ file, out_file ], defines )
"#{$cfg['compiler']['object_files']['prefix']}#{$cfg['compiler']['object_files']['destination']}" execute(cmd_str)
obj_file = "#{File.basename(file, C_EXTENSION)}#{$cfg['compiler']['object_files']['extension']}" out_file
execute(cmd_str + obj_file)
obj_file
end
def build_linker_fields
command = tackit($cfg['linker']['path'])
options = if $cfg['linker']['options'].nil?
''
else
squash('', $cfg['linker']['options'])
end
includes = if $cfg['linker']['includes'].nil? || $cfg['linker']['includes']['items'].nil?
''
else
squash($cfg['linker']['includes']['prefix'], $cfg['linker']['includes']['items'])
end.gsub(/\\ /, ' ').gsub(/\\\"/, '"').gsub(/\\$/, '') # Remove trailing slashes (for IAR)
{ :command => command, :options => options, :includes => includes }
end end
def link_it(exe_name, obj_list) def link_it(exe_name, obj_list)
linker = build_linker_fields cmd_str = build_command_string( $cfg[:tools][:test_linker], [ obj_list, exe_name ] )
cmd_str = "#{linker[:command]}#{linker[:options]}#{linker[:includes]} " +
(obj_list.map { |obj| "#{$cfg['linker']['object_files']['path']}#{obj} " }).join +
$cfg['linker']['bin_files']['prefix'] + ' ' +
$cfg['linker']['bin_files']['destination'] +
exe_name + $cfg['linker']['bin_files']['extension']
execute(cmd_str) execute(cmd_str)
end end
def build_simulator_fields def runtest(bin_name, ok_to_fail = false, extra_args = nil)
return nil if $cfg['simulator'].nil? extra_args = extra_args.nil? ? "" : " " + extra_args
command = if $cfg['simulator']['path'].nil? if $cfg[:tools][:test_fixture]
'' cmd_str = build_command_string( $cfg[:tools][:test_fixture], [ bin_name, extra_args ] )
else else
(tackit($cfg['simulator']['path']) + ' ') cmd_str = bin_name + extra_args
end end
pre_support = if $cfg['simulator']['pre_support'].nil? execute(cmd_str, ok_to_fail)
''
else
squash('', $cfg['simulator']['pre_support'])
end
post_support = if $cfg['simulator']['post_support'].nil?
''
else
squash('', $cfg['simulator']['post_support'])
end
{ :command => command, :pre_support => pre_support, :post_support => post_support }
end end
def run_astyle(style_what) def run_astyle(style_what)
@@ -180,7 +179,7 @@ module RakefileHelpers
def report_summary def report_summary
summary = UnityTestSummary.new summary = UnityTestSummary.new
summary.root = __dir__ summary.root = __dir__
results_glob = "#{$cfg['compiler']['build_path']}*.test*" results_glob = "build/*.test*"
results_glob.tr!('\\', '/') results_glob.tr!('\\', '/')
results = Dir[results_glob] results = Dir[results_glob]
summary.targets = results summary.targets = results
@@ -190,16 +189,11 @@ module RakefileHelpers
def run_tests(test_files) def run_tests(test_files)
report 'Running Unity system tests...' report 'Running Unity system tests...'
# Tack on TEST define for compiling unit tests
load_configuration($cfg_file)
test_defines = ['TEST']
$cfg['compiler']['defines']['items'] ||= []
$cfg['compiler']['defines']['items'] << 'TEST'
include_dirs = local_include_dirs include_dirs = local_include_dirs
# Build and execute each unit test # Build and execute each unit test
test_files.each do |test| test_files.each do |test|
puts "DEBUG: " + test
# Drop Out if we're skipping this type of test # Drop Out if we're skipping this type of test
if $cfg[:skip_tests] if $cfg[:skip_tests]
@@ -210,12 +204,7 @@ module RakefileHelpers
end end
obj_list = [] obj_list = []
test_defines = []
unless $cfg['compiler']['aux_sources'].nil?
$cfg['compiler']['aux_sources'].each do |aux|
obj_list << compile(aux, test_defines)
end
end
# Detect dependencies and build required modules # Detect dependencies and build required modules
extract_headers(test).each do |header| extract_headers(test).each do |header|
@@ -227,14 +216,8 @@ module RakefileHelpers
# Build the test runner (generate if configured to do so) # Build the test runner (generate if configured to do so)
test_base = File.basename(test, C_EXTENSION) test_base = File.basename(test, C_EXTENSION)
runner_name = test_base + '_Runner.c' runner_name = test_base + '_Runner.c'
runner_path = 'build/' + runner_name
runner_path = if $cfg['compiler']['runner_path'].nil?
$cfg['compiler']['build_path'] + runner_name
else
$cfg['compiler']['runner_path'] + runner_name
end
options = $cfg[:unity] options = $cfg[:unity]
options[:use_param_tests] = test =~ /parameterized/ ? true : false options[:use_param_tests] = test =~ /parameterized/ ? true : false
@@ -248,15 +231,8 @@ module RakefileHelpers
link_it(test_base, obj_list) link_it(test_base, obj_list)
# Execute unit test and generate results file # Execute unit test and generate results file
simulator = build_simulator_fields output = runtest(test_base)
executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension'] test_results = 'build/' + test_base
cmd_str = if simulator.nil?
executable
else
"#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
end
output = execute(cmd_str)
test_results = $cfg['compiler']['build_path'] + test_base
if output.match(/OK$/m).nil? if output.match(/OK$/m).nil?
test_results += '.testfail' test_results += '.testfail'
else else

View File

@@ -1,49 +1,44 @@
compiler: ---
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-ansi'
#- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_EXCLUDE_TESTING_NEW_COMMENTS
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:skip_tests: :skip_tests:
- :parameterized - :parameterized
:tools:
:test_compiler:
:name: compiler
:executable: gcc
:arguments:
- "-c"
- "-m64"
- "-Wall"
- "-Wno-address"
- "-ansi"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: gcc
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_EXCLUDE_TESTING_NEW_COMMENTS
- UNITY_SUPPORT_64

View File

@@ -1,78 +1,72 @@
--- ---
compiler:
path: clang
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-Wall'
- '-Wextra'
- '-Werror'
- '-Wcast-qual'
- '-Wconversion'
- '-Wdisabled-optimization'
- '-Wformat=2'
- '-Winit-self'
- '-Winline'
- '-Winvalid-pch'
- '-Wmissing-include-dirs'
- '-Wnonnull'
- '-Wpacked'
- '-Wpointer-arith'
- '-Wswitch-default'
- '-Wstrict-aliasing'
- '-Wstrict-overflow=5'
- '-Wuninitialized'
- '-Wunused'
# - '-Wunreachable-code'
- '-Wreturn-type'
- '-Wshadow'
- '-Wundef'
- '-Wwrite-strings'
- '-Wno-nested-externs'
- '-Wno-unused-parameter'
- '-Wno-variadic-macros'
- '-Wbad-function-cast'
- '-fms-extensions'
- '-fno-omit-frame-pointer'
- '-ffloat-store'
- '-fno-common'
- '-fstrict-aliasing'
- '-std=gnu99'
- '-pedantic'
- '-O0'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_64
- UNITY_OUTPUT_RESULTS_FILE
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: clang
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: clang
:arguments:
- "-c"
- "-Wall"
- "-Wextra"
- "-Werror"
- "-Wcast-qual"
- "-Wconversion"
- "-Wdisabled-optimization"
- "-Wformat=2"
- "-Winit-self"
- "-Winline"
- "-Winvalid-pch"
- "-Wmissing-include-dirs"
- "-Wnonnull"
- "-Wpacked"
- "-Wpointer-arith"
- "-Wswitch-default"
- "-Wstrict-aliasing"
- "-Wstrict-overflow=5"
- "-Wuninitialized"
- "-Wunused"
- "-Wreturn-type"
- "-Wshadow"
- "-Wundef"
- "-Wwrite-strings"
- "-Wno-nested-externs"
- "-Wno-unused-parameter"
- "-Wno-variadic-macros"
- "-Wbad-function-cast"
- "-fms-extensions"
- "-fno-omit-frame-pointer"
- "-ffloat-store"
- "-fno-common"
- "-fstrict-aliasing"
- "-std=gnu99"
- "-pedantic"
- "-O0"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: clang
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_64
- UNITY_OUTPUT_RESULTS_FILE

View File

@@ -1,78 +1,71 @@
--- ---
compiler:
path: clang
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-Wall'
- '-Wextra'
- '-Werror'
- '-Wcast-qual'
- '-Wconversion'
- '-Wdisabled-optimization'
- '-Wformat=2'
- '-Winit-self'
- '-Winline'
- '-Winvalid-pch'
- '-Wmissing-include-dirs'
- '-Wnonnull'
- '-Wpacked'
- '-Wpointer-arith'
- '-Wswitch-default'
- '-Wstrict-aliasing'
- '-Wstrict-overflow=5'
- '-Wuninitialized'
- '-Wunused'
# - '-Wunreachable-code'
- '-Wreturn-type'
- '-Wshadow'
- '-Wundef'
- '-Wwrite-strings'
- '-Wno-nested-externs'
- '-Wno-unused-parameter'
- '-Wno-variadic-macros'
- '-Wbad-function-cast'
- '-fms-extensions'
- '-fno-omit-frame-pointer'
#- '-ffloat-store'
- '-fno-common'
- '-fstrict-aliasing'
- '-std=gnu99'
- '-pedantic'
- '-O0'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: clang
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: clang
:arguments:
- "-c"
- "-Wall"
- "-Wextra"
- "-Werror"
- "-Wcast-qual"
- "-Wconversion"
- "-Wdisabled-optimization"
- "-Wformat=2"
- "-Winit-self"
- "-Winline"
- "-Winvalid-pch"
- "-Wmissing-include-dirs"
- "-Wnonnull"
- "-Wpacked"
- "-Wpointer-arith"
- "-Wswitch-default"
- "-Wstrict-aliasing"
- "-Wstrict-overflow=5"
- "-Wuninitialized"
- "-Wunused"
- "-Wreturn-type"
- "-Wshadow"
- "-Wundef"
- "-Wwrite-strings"
- "-Wno-nested-externs"
- "-Wno-unused-parameter"
- "-Wno-variadic-macros"
- "-Wbad-function-cast"
- "-fms-extensions"
- "-fno-omit-frame-pointer"
- "-fno-common"
- "-fstrict-aliasing"
- "-std=gnu99"
- "-pedantic"
- "-O0"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: clang
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64

View File

@@ -1,49 +1,45 @@
compiler: ---
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m32'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=32
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m32'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: gcc
:arguments:
- "-c"
- "-m32"
- "-Wall"
- "-Wno-address"
- "-std=c99"
- "-pedantic"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: gcc
:arguments:
- "${1}"
- "-lm"
- "-m32"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=32

View File

@@ -1,50 +1,46 @@
compiler: ---
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: gcc
:arguments:
- "-c"
- "-m64"
- "-Wall"
- "-Wno-address"
- "-std=c99"
- "-pedantic"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: gcc
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_EXCLUDE_STDINT_H
- UNITY_EXCLUDE_LIMITS_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
- UNITY_INT_WIDTH=32
- UNITY_LONG_WIDTH=64

View File

@@ -1,47 +1,43 @@
compiler: ---
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_EXCLUDE_STDINT_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: gcc
:arguments:
- "-c"
- "-m64"
- "-Wall"
- "-Wno-address"
- "-std=c99"
- "-pedantic"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: gcc
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_EXCLUDE_STDINT_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64

View File

@@ -1,59 +1,55 @@
compiler: ---
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
- '-Wextra'
- '-Werror'
- '-Wpointer-arith'
- '-Wcast-align'
- '-Wwrite-strings'
- '-Wswitch-default'
- '-Wunreachable-code'
- '-Winit-self'
- '-Wmissing-field-initializers'
- '-Wno-unknown-pragmas'
- '-Wstrict-prototypes'
- '-Wundef'
- '-Wold-style-definition'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: gcc
:arguments:
- "-c"
- "-m64"
- "-Wall"
- "-Wno-address"
- "-std=c99"
- "-pedantic"
- "-Wextra"
- "-Werror"
- "-Wpointer-arith"
- "-Wcast-align"
- "-Wwrite-strings"
- "-Wswitch-default"
- "-Wunreachable-code"
- "-Winit-self"
- "-Wmissing-field-initializers"
- "-Wno-unknown-pragmas"
- "-Wstrict-prototypes"
- "-Wundef"
- "-Wold-style-definition"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: gcc
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64

View File

@@ -1,47 +1,43 @@
compiler: ---
path: gcc
source_path: '../src/'
unit_tests_path: &unit_tests_path 'tests/'
build_path: &build_path 'build/'
options:
- '-c'
- '-m64'
- '-Wall'
- '-Wno-address'
- '-std=c99'
- '-pedantic'
includes:
prefix: '-I'
items:
- 'src/'
- '../src/'
- 'testdata/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_EXCLUDE_MATH_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: gcc
options:
- -lm
- '-m64'
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.exe'
destination: *build_path
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable: gcc
:arguments:
- "-c"
- "-m64"
- "-Wall"
- "-Wno-address"
- "-std=c99"
- "-pedantic"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable: gcc
:arguments:
- "${1}"
- "-lm"
- "-m64"
- "-o ${2}"
:extension:
:object: ".o"
:executable: ".exe"
:paths:
:test:
- src/
- "../src/"
- testdata/
- tests/
:defines:
:test:
- UNITY_EXCLUDE_MATH_H
- UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64

View File

@@ -1,101 +1,91 @@
# rumor has it that this yaml file works for the standard edition of the ---
# hitech PICC18 compiler, but not the pro version.
#
compiler:
path: cd build && picc18
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --chip=18F87J10
- --ide=hitide
- --q #quiet please
- --asmlist
- --codeoffset=0
- --emi=wordwrite # External memory interface protocol
- --warn=0 # allow all normal warning messages
- --errors=10 # Number of errors before aborting compile
- --char=unsigned
- -Bl # Large memory model
- -G # generate symbol file
- --cp=16 # 16-bit pointers
- --double=24
- -N255 # 255-char symbol names
- --opt=none # Do not use any compiler optimziations
- -c # compile only
- -M
includes:
prefix: '-I'
items:
- 'c:/Projects/NexGen/Prototypes/CMockTest/src/'
- 'c:/Projects/NexGen/Prototypes/CMockTest/mocks/'
- 'c:/CMock/src/'
- 'c:/CMock/examples/src/'
- 'c:/CMock/vendor/unity/src/'
- 'c:/CMock/vendor/unity/examples/helper/'
- *unit_tests_path
defines:
prefix: '-D'
items:
- UNITY_INT_WIDTH=16
- UNITY_POINTER_WIDTH=16
- CMOCK_MEM_STATIC
- CMOCK_MEM_SIZE=3000
- UNITY_SUPPORT_TEST_CASES
- _PICC18
object_files:
# prefix: '-O' # Hi-Tech doesn't want a prefix. They key off of filename .extensions, instead
extension: '.obj'
destination: *build_path
linker:
path: cd build && picc18
options:
- --chip=18F87J10
- --ide=hitide
- --cp=24 # 24-bit pointers. Is this needed for linker??
- --double=24 # Is this needed for linker??
- -Lw # Scan the pic87*w.lib in the lib/ of the compiler installation directory
- --summary=mem,file # info listing
- --summary=+psect
- --summary=+hex
- --output=+intel
- --output=+mcof
- --runtime=+init # Directs startup code to copy idata, ibigdata and ifardata psects from ROM to RAM.
- --runtime=+clear # Directs startup code to clear bss, bigbss, rbss and farbss psects
- --runtime=+clib # link in the c-runtime
- --runtime=+keep # Keep the generated startup src after its obj is linked
- -G # Generate src-level symbol file
- -MIWasTheLastToBuild.map
- --warn=0 # allow all normal warning messages
- -Bl # Large memory model (probably not needed for linking)
includes:
prefix: '-I'
object_files:
path: *build_path
extension: '.obj'
bin_files:
prefix: '-O'
extension: '.hex'
destination: *build_path
simulator:
path:
pre_support:
- 'java -client -jar ' # note space
- ['C:\Program Files\HI-TECH Software\HI-TIDE\3.15\lib\', 'simpic18.jar']
- 18F87J10
post_support:
:cmock: :cmock:
:plugins: [] :plugins: []
:includes: :includes:
- Types.h - Types.h
:suite_teardown: | :suite_teardown: |
if (num_failures) if (num_failures)
_FAILED_TEST(); _FAILED_TEST();
else else
_PASSED_TESTS(); _PASSED_TESTS();
return 0; return 0;
colour: true colour: true
:tools:
:test_compiler:
:name: compiler
:executable: cd build && picc18
:arguments:
- "--chip=18F87J10"
- "--ide=hitide"
- "--q"
- "--asmlist"
- "--codeoffset=0"
- "--emi=wordwrite"
- "--warn=0"
- "--errors=10"
- "--char=unsigned"
- "-Bl"
- "-G"
- "--cp=16"
- "--double=24"
- "-N255"
- "--opt=none"
- "-c"
- "-M"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- " ${2}"
:test_linker:
:name: linker
:executable: cd build && picc18
:arguments:
- "${1}"
- "--chip=18F87J10"
- "--ide=hitide"
- "--cp=24"
- "--double=24"
- "-Lw"
- "--summary=mem,file"
- "--summary=+psect"
- "--summary=+hex"
- "--output=+intel"
- "--output=+mcof"
- "--runtime=+init"
- "--runtime=+clear"
- "--runtime=+clib"
- "--runtime=+keep"
- "-G"
- "-MIWasTheLastToBuild.map"
- "--warn=0"
- "-Bl"
- "-O ${2}"
:test_fixture:
:name: simulator
:executable: 'java -client -jar '
:arguments:
- - C:\Program Files\HI-TECH Software\HI-TIDE\3.15\lib\
- simpic18.jar
- 18F87J10
- "${1}"
:extension:
:object: ".obj"
:executable: ".hex"
:paths:
:test:
- c:/Projects/NexGen/Prototypes/CMockTest/src/
- c:/Projects/NexGen/Prototypes/CMockTest/mocks/
- c:/CMock/src/
- c:/CMock/examples/src/
- c:/CMock/vendor/unity/src/
- c:/CMock/vendor/unity/examples/helper/
- tests\
:defines:
:test:
- UNITY_INT_WIDTH=16
- UNITY_POINTER_WIDTH=16
- CMOCK_MEM_STATIC
- CMOCK_MEM_SIZE=3000
- UNITY_SUPPORT_TEST_CASES
- _PICC18

View File

@@ -1,90 +1,98 @@
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\' ---
compiler: tools_root: C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\lib\dl4tptinl8n.h']
- -z3
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian little
- --cpu ARM7TDMI
- --stack_align 4
- --interwork
- -e
- --silent
- --warnings_are_errors
- --fpu None
- --diag_suppress Pa050
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'common\bin\xlink.exe']
options:
- -rt
- [*tools_root, 'arm\lib\dl4tptinl8n.r79']
- -D_L_EXTMEM_START=0
- -D_L_EXTMEM_SIZE=0
- -D_L_HEAP_SIZE=120
- -D_L_STACK_SIZE=32
- -e_small_write=_formatted_write
- -s
- __program_start
- -f
- [*tools_root, '\arm\config\lnkarm.xcl']
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\config\']
- [*tools_root, 'arm\lib\']
object_files:
path: *build_path
extension: '.r79'
bin_files:
prefix: '-o'
extension: '.d79'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\ioat91sam7X256.ddf']
- -d
- sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\bin\iccarm.exe
:arguments:
- "--dlib_config"
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\lib\dl4tptinl8n.h
- "-z3"
- "--no_cse"
- "--no_unroll"
- "--no_inline"
- "--no_code_motion"
- "--no_tbaa"
- "--no_clustering"
- "--no_scheduling"
- "--debug"
- "--cpu_mode thumb"
- "--endian little"
- "--cpu ARM7TDMI"
- "--stack_align 4"
- "--interwork"
- "-e"
- "--silent"
- "--warnings_are_errors"
- "--fpu None"
- "--diag_suppress Pa050"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- common\bin\xlink.exe
:arguments:
- "${1}"
- "-rt"
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\lib\dl4tptinl8n.r79
- "-D_L_EXTMEM_START=0"
- "-D_L_EXTMEM_SIZE=0"
- "-D_L_HEAP_SIZE=120"
- "-D_L_STACK_SIZE=32"
- "-e_small_write=_formatted_write"
- "-s"
- __program_start
- "-f"
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- "\\arm\\config\\lnkarm.xcl"
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- common\bin\CSpyBat.exe
:arguments:
- "--silent"
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\bin\armproc.dll
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\bin\armsim.dll
- "${1}"
- "--plugin"
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\bin\armbat.dll
- "--backend"
- "-B"
- "-p"
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\config\ioat91sam7X256.ddf
- "-d"
- sim
:extension:
:object: ".r79"
:executable: ".d79"
:paths:
:test:
- - C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\
- arm\inc\
- src\
- "..\\src\\"
- testdata/
- tests\
- vendor\unity\src\
:defines:
:test:
- UNITY_SUPPORT_64
- UNITY_SUPPORT_TEST_CASES

View File

@@ -1,80 +1,92 @@
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\' ---
compiler: tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3\
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=ARM7TDMI
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\atmel\ioat91sam7X256.ddf']
- -d
- sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\iccarm.exe
:arguments:
- "--dlib_config"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\inc\DLib_Config_Normal.h
- "--no_cse"
- "--no_unroll"
- "--no_inline"
- "--no_code_motion"
- "--no_tbaa"
- "--no_clustering"
- "--no_scheduling"
- "--debug"
- "--cpu_mode thumb"
- "--endian=little"
- "--cpu=ARM7TDMI"
- "--interwork"
- "--warnings_are_errors"
- "--fpu=None"
- "--diag_suppress=Pa050"
- "--diag_suppress=Pe111"
- "-e"
- "-On"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\ilinkarm.exe
:arguments:
- "${1}"
- "--redirect _Printf=_PrintfLarge"
- "--redirect _Scanf=_ScanfSmall"
- "--semihosting"
- "--entry __iar_program_start"
- "--config"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\config\generic.icf
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- common\bin\CSpyBat.exe
:arguments:
- "--silent"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\armproc.dll
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\armsim.dll
- "${1}"
- "--plugin"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\armbat.dll
- "--backend"
- "-B"
- "-p"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\config\debugger\atmel\ioat91sam7X256.ddf
- "-d"
- sim
:extension:
:object: ".r79"
:executable: ".out"
:paths:
:test:
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\inc\
- src\
- "..\\src\\"
- testdata/
- tests\
- vendor\unity\src\
- iar\iar_v5\incIAR\
:defines:
:test:
- UNITY_SUPPORT_64
- UNITY_SUPPORT_TEST_CASES

View File

@@ -1,80 +1,92 @@
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\' ---
compiler: tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3\
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=ARM7TDMI
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\atmel\ioat91sam7X256.ddf']
- -d
- sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\iccarm.exe
:arguments:
- "--dlib_config"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\inc\DLib_Config_Normal.h
- "--no_cse"
- "--no_unroll"
- "--no_inline"
- "--no_code_motion"
- "--no_tbaa"
- "--no_clustering"
- "--no_scheduling"
- "--debug"
- "--cpu_mode thumb"
- "--endian=little"
- "--cpu=ARM7TDMI"
- "--interwork"
- "--warnings_are_errors"
- "--fpu=None"
- "--diag_suppress=Pa050"
- "--diag_suppress=Pe111"
- "-e"
- "-On"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\ilinkarm.exe
:arguments:
- "${1}"
- "--redirect _Printf=_PrintfLarge"
- "--redirect _Scanf=_ScanfSmall"
- "--semihosting"
- "--entry __iar_program_start"
- "--config"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\config\generic.icf
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- common\bin\CSpyBat.exe
:arguments:
- "--silent"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\armproc.dll
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\armsim.dll
- "${1}"
- "--plugin"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\bin\armbat.dll
- "--backend"
- "-B"
- "-p"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\config\debugger\atmel\ioat91sam7X256.ddf
- "-d"
- sim
:extension:
:object: ".r79"
:executable: ".out"
:paths:
:test:
- - C:\Program Files\IAR Systems\Embedded Workbench 5.3\
- arm\inc\
- src\
- "..\\src\\"
- testdata/
- tests\
- vendor\unity\src\
- iar\iar_v5\incIAR\
:defines:
:test:
- UNITY_SUPPORT_64
- UNITY_SUPPORT_TEST_CASES

View File

@@ -1,94 +1,90 @@
#Default tool path for IAR 5.4 on Windows XP 64bit ---
tools_root: &tools_root 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\' tools_root: C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --diag_suppress=Pa050
#- --diag_suppress=Pe111
- --debug
- --endian=little
- --cpu=Cortex-M3
- --no_path_in_file_macros
- -e
- --fpu=None
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
#- --preinclude --preinclude C:\Vss\T2 Working\common\system.h
- --interwork
- --warnings_are_errors
# - Ohz
- -Oh
# - --no_cse
# - --no_unroll
# - --no_inline
# - --no_code_motion
# - --no_tbaa
# - --no_clustering
# - --no_scheduling
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- ewarm
- PART_LM3S9B92
- TARGET_IS_TEMPEST_RB1
- USE_ROM_DRIVERS
- UART_BUFFERED
- UNITY_SUPPORT_64
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic.icf']
# - ['C:\Temp\lm3s9b92.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
#- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim2.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- --endian=little
- --cpu=Cortex-M3
- --fpu=None
- -p
- [*tools_root, 'arm\config\debugger\TexasInstruments\iolm3sxxxx.ddf']
- --semihosting
- --device=LM3SxBxx
#- -d
#- sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\bin\iccarm.exe
:arguments:
- "--diag_suppress=Pa050"
- "--debug"
- "--endian=little"
- "--cpu=Cortex-M3"
- "--no_path_in_file_macros"
- "-e"
- "--fpu=None"
- "--dlib_config"
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\inc\DLib_Config_Normal.h
- "--interwork"
- "--warnings_are_errors"
- "-Oh"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\bin\ilinkarm.exe
:arguments:
- "${1}"
- "--redirect _Printf=_PrintfLarge"
- "--redirect _Scanf=_ScanfSmall"
- "--semihosting"
- "--entry __iar_program_start"
- "--config"
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\config\generic.icf
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- common\bin\CSpyBat.exe
:arguments:
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\bin\armproc.dll
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\bin\armsim2.dll
- "${1}"
- "--plugin"
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\bin\armbat.dll
- "--backend"
- "-B"
- "--endian=little"
- "--cpu=Cortex-M3"
- "--fpu=None"
- "-p"
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\config\debugger\TexasInstruments\iolm3sxxxx.ddf
- "--semihosting"
- "--device=LM3SxBxx"
:extension:
:object: ".r79"
:executable: ".out"
:paths:
:test:
- - C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\
- arm\inc\
- src\
- "..\\src\\"
- testdata/
- tests\
- vendor\unity\src\
- iar\iar_v5\incIAR\
:defines:
:test:
- ewarm
- PART_LM3S9B92
- TARGET_IS_TEMPEST_RB1
- USE_ROM_DRIVERS
- UART_BUFFERED
- UNITY_SUPPORT_64

View File

@@ -1,84 +1,94 @@
# unit testing under iar compiler / simulator for STM32 Cortex-M3 ---
tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.4\
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.4\'
compiler:
path: [*tools_root, 'arm\bin\iccarm.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- --dlib_config
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=Cortex-M3
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
includes:
prefix: '-I'
items:
- [*tools_root, 'arm\inc\']
- 'src\'
- '..\src\'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src\'
- 'iar\iar_v5\incIAR\'
defines:
prefix: '-D'
items:
- 'IAR'
- 'UNITY_SUPPORT_64'
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r79'
destination: *build_path
linker:
path: [*tools_root, 'arm\bin\ilinkarm.exe']
options:
- --redirect _Printf=_PrintfLarge
- --redirect _Scanf=_ScanfSmall
- --semihosting
- --entry __iar_program_start
- --config
- [*tools_root, 'arm\config\generic_cortex.icf']
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'arm\bin\armproc.dll']
- [*tools_root, 'arm\bin\armsim.dll']
post_support:
- --plugin
- [*tools_root, 'arm\bin\armbat.dll']
- --backend
- -B
- -p
- [*tools_root, 'arm\config\debugger\ST\iostm32f107xx.ddf']
- --cpu=Cortex-M3
- -d
- sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\bin\iccarm.exe
:arguments:
- "--dlib_config"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\inc\DLib_Config_Normal.h
- "--no_cse"
- "--no_unroll"
- "--no_inline"
- "--no_code_motion"
- "--no_tbaa"
- "--no_clustering"
- "--no_scheduling"
- "--debug"
- "--cpu_mode thumb"
- "--endian=little"
- "--cpu=Cortex-M3"
- "--interwork"
- "--warnings_are_errors"
- "--fpu=None"
- "--diag_suppress=Pa050"
- "--diag_suppress=Pe111"
- "-e"
- "-On"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\bin\ilinkarm.exe
:arguments:
- "${1}"
- "--redirect _Printf=_PrintfLarge"
- "--redirect _Scanf=_ScanfSmall"
- "--semihosting"
- "--entry __iar_program_start"
- "--config"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\config\generic_cortex.icf
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- common\bin\CSpyBat.exe
:arguments:
- "--silent"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\bin\armproc.dll
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\bin\armsim.dll
- "${1}"
- "--plugin"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\bin\armbat.dll
- "--backend"
- "-B"
- "-p"
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\config\debugger\ST\iostm32f107xx.ddf
- "--cpu=Cortex-M3"
- "-d"
- sim
:extension:
:object: ".r79"
:executable: ".out"
:paths:
:test:
- - C:\Program Files\IAR Systems\Embedded Workbench 5.4\
- arm\inc\
- src\
- "..\\src\\"
- testdata/
- tests\
- vendor\unity\src\
- iar\iar_v5\incIAR\
:defines:
:test:
- IAR
- UNITY_SUPPORT_64
- UNITY_SUPPORT_TEST_CASES

View File

@@ -1,95 +1,112 @@
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\' ---
core_root: &core_root [*tools_root, '430\'] tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\
core_bin: &core_bin [*core_root, 'bin\'] core_root: &1
core_config: &core_config [*core_root, 'config\'] - C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\
core_lib: &core_lib [*core_root, 'lib\'] - 430\
core_inc: &core_inc [*core_root, 'inc\'] core_bin: &2
core_config: &core_config [*core_root, 'config\'] - *1
- bin\
compiler: core_config: &4
path: [*core_bin, 'icc430.exe'] - *1
source_path: '..\src\' - config\
unit_tests_path: &unit_tests_path 'tests\' core_lib: &3
build_path: &build_path 'build\' - *1
options: - lib\
- --dlib_config core_inc: &5
- [*core_lib, 'dlib\dl430fn.h'] - *1
- --no_cse - inc\
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --debug
- -e
- -Ol
- --multiplier=16
- --double=32
- --diag_suppress Pa050
- --diag_suppress Pe111
includes:
prefix: '-I'
items:
- *core_inc
- [*core_inc, 'dlib']
- [*core_lib, 'dlib']
- 'src\'
- '../src/'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src'
defines:
prefix: '-D'
items:
- '__MSP430F149__'
- 'INT_WIDTH=16'
- 'UNITY_EXCLUDE_FLOAT'
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.r43'
destination: *build_path
linker:
path: [*core_bin, 'xlink.exe']
options:
- -rt
- [*core_lib, 'dlib\dl430fn.r43']
- -e_PrintfTiny=_Printf
- -e_ScanfSmall=_Scanf
- -s __program_start
- -D_STACK_SIZE=50
- -D_DATA16_HEAP_SIZE=50
- -D_DATA20_HEAP_SIZE=50
- -f
- [*core_config, 'lnk430f5438.xcl']
- -f
- [*core_config, 'multiplier.xcl']
includes:
prefix: '-I'
items:
- *core_config
- *core_lib
- [*core_lib, 'dlib']
object_files:
path: *build_path
extension: '.r79'
bin_files:
prefix: '-o'
extension: '.d79'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*core_bin, '430proc.dll']
- [*core_bin, '430sim.dll']
post_support:
- --plugin
- [*core_bin, '430bat.dll']
- --backend -B
- --cpu MSP430F5438
- -p
- [*core_config, 'MSP430F5438.ddf']
- -d sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- *2
- icc430.exe
:arguments:
- "--dlib_config"
- - *3
- dlib\dl430fn.h
- "--no_cse"
- "--no_unroll"
- "--no_inline"
- "--no_code_motion"
- "--no_tbaa"
- "--debug"
- "-e"
- "-Ol"
- "--multiplier=16"
- "--double=32"
- "--diag_suppress Pa050"
- "--diag_suppress Pe111"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- *2
- xlink.exe
:arguments:
- "${1}"
- "-rt"
- - *3
- dlib\dl430fn.r43
- "-e_PrintfTiny=_Printf"
- "-e_ScanfSmall=_Scanf"
- "-s __program_start"
- "-D_STACK_SIZE=50"
- "-D_DATA16_HEAP_SIZE=50"
- "-D_DATA20_HEAP_SIZE=50"
- "-f"
- - *4
- lnk430f5438.xcl
- "-f"
- - *4
- multiplier.xcl
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\
- common\bin\CSpyBat.exe
:arguments:
- "--silent"
- - *2
- 430proc.dll
- - *2
- 430sim.dll
- "${1}"
- "--plugin"
- - *2
- 430bat.dll
- "--backend -B"
- "--cpu MSP430F5438"
- "-p"
- - *4
- MSP430F5438.ddf
- "-d sim"
:extension:
:object: ".r43"
:executable: ".d79"
:paths:
:test:
- *5
- - *5
- dlib
- - *3
- dlib
- src\
- "../src/"
- testdata/
- tests\
- vendor\unity\src
:defines:
:test:
- __MSP430F149__
- INT_WIDTH=16
- UNITY_EXCLUDE_FLOAT
- UNITY_SUPPORT_TEST_CASES

View File

@@ -1,86 +1,99 @@
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 6.0\' ---
compiler: tools_root: C:\Program Files\IAR Systems\Embedded Workbench 6.0\
path: [*tools_root, 'sh\bin\iccsh.exe']
source_path: '..\src\'
unit_tests_path: &unit_tests_path 'tests\'
build_path: &build_path 'build\'
options:
- -e
- --char_is_signed
- -Ol
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_scheduling
- --no_clustering
- --debug
- --dlib_config
- [*tools_root, 'sh\inc\DLib_Product.h']
- --double=32
- --code_model=huge
- --data_model=huge
- --core=sh2afpu
- --warnings_affect_exit_code
- --warnings_are_errors
- --mfc
- --use_unix_directory_separators
- --diag_suppress=Pe161
includes:
prefix: '-I'
items:
- [*tools_root, 'sh\inc\']
- [*tools_root, 'sh\inc\c']
- 'src\'
- '..\src\'
- 'testdata/'
- *unit_tests_path
- 'vendor\unity\src\'
defines:
prefix: '-D'
items:
- UNITY_SUPPORT_64
- 'UNITY_SUPPORT_TEST_CASES'
object_files:
prefix: '-o'
extension: '.o'
destination: *build_path
linker:
path: [*tools_root, 'sh\bin\ilinksh.exe']
options:
- --redirect __Printf=__PrintfSmall
- --redirect __Scanf=__ScanfSmall
- --config
- [*tools_root, 'sh\config\generic.icf']
- --config_def _CSTACK_SIZE=0x800
- --config_def _HEAP_SIZE=0x800
- --config_def _INT_TABLE=0x10
- --entry __iar_program_start
- --debug_lib
object_files:
path: *build_path
extension: '.o'
bin_files:
prefix: '-o'
extension: '.out'
destination: *build_path
simulator:
path: [*tools_root, 'common\bin\CSpyBat.exe']
pre_support:
- --silent
- [*tools_root, 'sh\bin\shproc.dll']
- [*tools_root, 'sh\bin\shsim.dll']
post_support:
- --plugin
- [*tools_root, 'sh\bin\shbat.dll']
- --backend
- -B
- --core sh2afpu
- -p
- [*tools_root, 'sh\config\debugger\io7264.ddf']
- -d
- sim
colour: true colour: true
:unity: :unity:
:plugins: [] :plugins: []
:tools:
:test_compiler:
:name: compiler
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\bin\iccsh.exe
:arguments:
- "-e"
- "--char_is_signed"
- "-Ol"
- "--no_cse"
- "--no_unroll"
- "--no_inline"
- "--no_code_motion"
- "--no_tbaa"
- "--no_scheduling"
- "--no_clustering"
- "--debug"
- "--dlib_config"
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\inc\DLib_Product.h
- "--double=32"
- "--code_model=huge"
- "--data_model=huge"
- "--core=sh2afpu"
- "--warnings_affect_exit_code"
- "--warnings_are_errors"
- "--mfc"
- "--use_unix_directory_separators"
- "--diag_suppress=Pe161"
- '-I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE'
- '-I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR'
- "-D$: COLLECTION_DEFINES_TEST_AND_VENDOR"
- "${1}"
- "-o ${2}"
:test_linker:
:name: linker
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\bin\ilinksh.exe
:arguments:
- "${1}"
- "--redirect __Printf=__PrintfSmall"
- "--redirect __Scanf=__ScanfSmall"
- "--config"
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\config\generic.icf
- "--config_def _CSTACK_SIZE=0x800"
- "--config_def _HEAP_SIZE=0x800"
- "--config_def _INT_TABLE=0x10"
- "--entry __iar_program_start"
- "--debug_lib"
- "-o ${2}"
:test_fixture:
:name: simulator
:executable:
- C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- common\bin\CSpyBat.exe
:arguments:
- "--silent"
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\bin\shproc.dll
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\bin\shsim.dll
- "${1}"
- "--plugin"
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\bin\shbat.dll
- "--backend"
- "-B"
- "--core sh2afpu"
- "-p"
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\config\debugger\io7264.ddf
- "-d"
- sim
:extension:
:object: ".o"
:executable: ".out"
:paths:
:test:
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\inc\
- - C:\Program Files\IAR Systems\Embedded Workbench 6.0\
- sh\inc\c
- src\
- "..\\src\\"
- testdata/
- tests\
- vendor\unity\src\
:defines:
:test:
- UNITY_SUPPORT_64
- UNITY_SUPPORT_TEST_CASES

View File

@@ -786,7 +786,7 @@ RUNNER_TESTS = [
:options => { :options => {
:cmdline_args => true, :cmdline_args => true,
}, },
:cmdline_args => "-n testRunnerGeneratorSma*", :cmdline_args => "-n=testRunnerGeneratorSma*",
:expected => { :expected => {
:to_pass => [ 'test_ThisTestAlwaysPasses', :to_pass => [ 'test_ThisTestAlwaysPasses',
'spec_ThisTestPassesWhenNormalSetupRan', 'spec_ThisTestPassesWhenNormalSetupRan',
@@ -1183,15 +1183,7 @@ def runner_test(test, runner, expected, test_defines, cmdline_args, features)
link_it(test_base, obj_list) link_it(test_base, obj_list)
# Execute unit test and generate results file # Execute unit test and generate results file
simulator = build_simulator_fields output = runtest(test_base, true, cmdline_args)
cmdline_args ||= ""
executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension'] + " #{cmdline_args}"
cmd_str = if simulator.nil?
executable
else
"#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
end
output = execute(cmd_str, true)
#compare to the expected pass/fail #compare to the expected pass/fail
allgood = expected[:to_pass].inject(true) {|s,v| s && verify_match(/#{v}:PASS/, output) } allgood = expected[:to_pass].inject(true) {|s,v| s && verify_match(/#{v}:PASS/, output) }

View File

@@ -6029,6 +6029,8 @@ void putcharSpy(int c)
putcharSpyBuffer[indexSpyBuffer++] = (char)c; putcharSpyBuffer[indexSpyBuffer++] = (char)c;
} else } else
putchar((char)c); putchar((char)c);
#else
(void)c;
#endif #endif
} }
@@ -6047,6 +6049,9 @@ void flushSpy(void)
void testFailureCountIncrementsAndIsReturnedAtEnd(void) void testFailureCountIncrementsAndIsReturnedAtEnd(void)
{ {
#ifndef USING_OUTPUT_SPY
TEST_IGNORE();
#else
UNITY_UINT savedFailures = Unity.TestFailures; UNITY_UINT savedFailures = Unity.TestFailures;
Unity.CurrentTestFailed = 1; Unity.CurrentTestFailed = 1;
startPutcharSpy(); /* Suppress output */ startPutcharSpy(); /* Suppress output */
@@ -6067,6 +6072,7 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void)
Unity.TestFailures--; Unity.TestFailures--;
endPutcharSpy(); endPutcharSpy();
TEST_ASSERT_EQUAL(savedFailures + 1, failures); TEST_ASSERT_EQUAL(savedFailures + 1, failures);
#endif
} }
void testCstringsEscapeSequence(void) void testCstringsEscapeSequence(void)