diff --git a/test/rakefile b/test/rakefile index f6cd95c..98b165e 100644 --- a/test/rakefile +++ b/test/rakefile @@ -29,31 +29,31 @@ include RakefileHelpers DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml' 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 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 # Shorthand for many common tasks @@ -86,7 +86,7 @@ namespace :style do namespace :check do Dir['../**/*.rb'].each do |f| filename = File.basename(f, '.rb') - desc "Check Style of #{filename}" + #desc "Check Style of #{filename}" task filename.to_sym => ['style:clean'] do report execute("rubocop #{f} --color --config .rubocop.yml", true) report "Style Checked for #{f}" @@ -102,7 +102,7 @@ namespace :style do namespace :c do Dir['../{src,extras/**}/*.{c,h}'].each do |f| filename = File.basename(f)[0..-3] - desc "Check Style of #{filename}" + #desc "Check Style of #{filename}" task filename.to_sym do run_astyle f end diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index 56f6dcc..ff8fc92 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -22,7 +22,7 @@ module RakefileHelpers end def configure_clean - CLEAN.include($cfg['compiler']['build_path'] + '*.*') unless $cfg['compiler']['build_path'].nil? + CLEAN.include('build/*.*') end def configure_toolchain(config_file = DEFAULT_CONFIG_FILE) @@ -33,13 +33,16 @@ module RakefileHelpers end def unit_test_files - path = $cfg['compiler']['unit_tests_path'] + 'test*' + C_EXTENSION + path = 'tests/test*' + C_EXTENSION path.tr!('\\', '/') FileList.new(path) end 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 end @@ -86,75 +89,71 @@ module RakefileHelpers end end - def build_compiler_fields(inject_defines) - 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) + def build_command_string(hash, values, defines = nil) - { :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 def compile(file, defines = []) - compiler = build_compiler_fields(defines) - cmd_str = "#{compiler[:command]}#{compiler[:defines]}#{compiler[:options]}#{compiler[:includes]} #{file} " \ - "#{$cfg['compiler']['object_files']['prefix']}#{$cfg['compiler']['object_files']['destination']}" - obj_file = "#{File.basename(file, C_EXTENSION)}#{$cfg['compiler']['object_files']['extension']}" - 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 } + out_file = File.basename(file, C_EXTENSION) + $cfg[:extension][:object] + cmd_str = build_command_string( $cfg[:tools][:test_compiler], [ file, out_file ], defines ) + execute(cmd_str) + out_file end def link_it(exe_name, obj_list) - linker = build_linker_fields - 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'] + cmd_str = build_command_string( $cfg[:tools][:test_linker], [ obj_list, exe_name ] ) execute(cmd_str) end - def build_simulator_fields - return nil if $cfg['simulator'].nil? - command = if $cfg['simulator']['path'].nil? - '' - else - (tackit($cfg['simulator']['path']) + ' ') - end - pre_support = if $cfg['simulator']['pre_support'].nil? - '' - 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 } + def runtest(bin_name, ok_to_fail = false, extra_args = nil) + extra_args = extra_args.nil? ? "" : " " + extra_args + if $cfg[:tools][:test_fixture] + cmd_str = build_command_string( $cfg[:tools][:test_fixture], [ bin_name, extra_args ] ) + else + cmd_str = bin_name + extra_args + end + execute(cmd_str, ok_to_fail) end def run_astyle(style_what) @@ -180,7 +179,7 @@ module RakefileHelpers def report_summary summary = UnityTestSummary.new summary.root = __dir__ - results_glob = "#{$cfg['compiler']['build_path']}*.test*" + results_glob = "build/*.test*" results_glob.tr!('\\', '/') results = Dir[results_glob] summary.targets = results @@ -190,16 +189,11 @@ module RakefileHelpers def run_tests(test_files) 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 # Build and execute each unit test test_files.each do |test| + puts "DEBUG: " + test # Drop Out if we're skipping this type of test if $cfg[:skip_tests] @@ -210,12 +204,7 @@ module RakefileHelpers end obj_list = [] - - unless $cfg['compiler']['aux_sources'].nil? - $cfg['compiler']['aux_sources'].each do |aux| - obj_list << compile(aux, test_defines) - end - end + test_defines = [] # Detect dependencies and build required modules extract_headers(test).each do |header| @@ -227,14 +216,8 @@ module RakefileHelpers # Build the test runner (generate if configured to do so) test_base = File.basename(test, C_EXTENSION) - runner_name = test_base + '_Runner.c' - - runner_path = if $cfg['compiler']['runner_path'].nil? - $cfg['compiler']['build_path'] + runner_name - else - $cfg['compiler']['runner_path'] + runner_name - end + runner_path = 'build/' + runner_name options = $cfg[:unity] options[:use_param_tests] = test =~ /parameterized/ ? true : false @@ -248,15 +231,8 @@ module RakefileHelpers link_it(test_base, obj_list) # Execute unit test and generate results file - simulator = build_simulator_fields - executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension'] - 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 + output = runtest(test_base) + test_results = 'build/' + test_base if output.match(/OK$/m).nil? test_results += '.testfail' else diff --git a/test/targets/ansi.yml b/test/targets/ansi.yml index 182071a..81af4c7 100644 --- a/test/targets/ansi.yml +++ b/test/targets/ansi.yml @@ -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 :unity: :plugins: [] :skip_tests: - - :parameterized \ No newline at end of file +- :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 diff --git a/test/targets/clang_file.yml b/test/targets/clang_file.yml index df1bd24..964e814 100644 --- a/test/targets/clang_file.yml +++ b/test/targets/clang_file.yml @@ -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 :unity: :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 diff --git a/test/targets/clang_strict.yml b/test/targets/clang_strict.yml index ee05b2a..04d5680 100644 --- a/test/targets/clang_strict.yml +++ b/test/targets/clang_strict.yml @@ -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 :unity: :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 diff --git a/test/targets/gcc_32.yml b/test/targets/gcc_32.yml index ec1165d..ba388cf 100644 --- a/test/targets/gcc_32.yml +++ b/test/targets/gcc_32.yml @@ -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 :unity: :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 diff --git a/test/targets/gcc_64.yml b/test/targets/gcc_64.yml index 0e273de..ed9eb4a 100644 --- a/test/targets/gcc_64.yml +++ b/test/targets/gcc_64.yml @@ -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 :unity: :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 diff --git a/test/targets/gcc_auto_limits.yml b/test/targets/gcc_auto_limits.yml index 40088ac..9cfda8d 100644 --- a/test/targets/gcc_auto_limits.yml +++ b/test/targets/gcc_auto_limits.yml @@ -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 :unity: :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 diff --git a/test/targets/gcc_auto_stdint.yml b/test/targets/gcc_auto_stdint.yml index f12165c..66602ef 100644 --- a/test/targets/gcc_auto_stdint.yml +++ b/test/targets/gcc_auto_stdint.yml @@ -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 :unity: :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 diff --git a/test/targets/gcc_manual_math.yml b/test/targets/gcc_manual_math.yml index b379e3f..b1b5b82 100644 --- a/test/targets/gcc_manual_math.yml +++ b/test/targets/gcc_manual_math.yml @@ -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 :unity: :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 diff --git a/test/targets/hitech_picc18.yml b/test/targets/hitech_picc18.yml index 2fd4aa3..b984edb 100644 --- a/test/targets/hitech_picc18.yml +++ b/test/targets/hitech_picc18.yml @@ -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: :plugins: [] :includes: - - Types.h + - Types.h :suite_teardown: | if (num_failures) _FAILED_TEST(); else _PASSED_TESTS(); return 0; - 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 diff --git a/test/targets/iar_arm_v4.yml b/test/targets/iar_arm_v4.yml index 2f9f881..9a1a276 100644 --- a/test/targets/iar_arm_v4.yml +++ b/test/targets/iar_arm_v4.yml @@ -1,90 +1,98 @@ -tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 4.0 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: - - --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 +--- +tools_root: C:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\ colour: true :unity: :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 diff --git a/test/targets/iar_arm_v5.yml b/test/targets/iar_arm_v5.yml index 223f1a6..d4b115f 100644 --- a/test/targets/iar_arm_v5.yml +++ b/test/targets/iar_arm_v5.yml @@ -1,80 +1,92 @@ -tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\' -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=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 +--- +tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3\ colour: true :unity: :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 diff --git a/test/targets/iar_arm_v5_3.yml b/test/targets/iar_arm_v5_3.yml index 223f1a6..d4b115f 100644 --- a/test/targets/iar_arm_v5_3.yml +++ b/test/targets/iar_arm_v5_3.yml @@ -1,80 +1,92 @@ -tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\' -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=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 +--- +tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3\ colour: true :unity: :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 diff --git a/test/targets/iar_armcortex_LM3S9B92_v5_4.yml b/test/targets/iar_armcortex_LM3S9B92_v5_4.yml index c79bacf..1703fe2 100644 --- a/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +++ b/test/targets/iar_armcortex_LM3S9B92_v5_4.yml @@ -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\' -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 +--- +tools_root: C:\Program Files (x86)\IAR Systems\Embedded Workbench 5.4 Kickstart\ colour: true :unity: :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 diff --git a/test/targets/iar_cortexm3_v5.yml b/test/targets/iar_cortexm3_v5.yml index 973de94..8b0978f 100644 --- a/test/targets/iar_cortexm3_v5.yml +++ b/test/targets/iar_cortexm3_v5.yml @@ -1,84 +1,94 @@ -# unit testing under iar compiler / simulator for STM32 Cortex-M3 - -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 +--- +tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.4\ colour: true :unity: :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 diff --git a/test/targets/iar_msp430.yml b/test/targets/iar_msp430.yml index 4563af9..6587253 100644 --- a/test/targets/iar_msp430.yml +++ b/test/targets/iar_msp430.yml @@ -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\'] -core_bin: &core_bin [*core_root, 'bin\'] -core_config: &core_config [*core_root, 'config\'] -core_lib: &core_lib [*core_root, 'lib\'] -core_inc: &core_inc [*core_root, 'inc\'] -core_config: &core_config [*core_root, 'config\'] - -compiler: - path: [*core_bin, 'icc430.exe'] - source_path: '..\src\' - unit_tests_path: &unit_tests_path 'tests\' - build_path: &build_path 'build\' - options: - - --dlib_config - - [*core_lib, '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 - 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 +--- +tools_root: C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\ +core_root: &1 +- C:\Program Files\IAR Systems\Embedded Workbench 5.3 MSP430\ +- 430\ +core_bin: &2 +- *1 +- bin\ +core_config: &4 +- *1 +- config\ +core_lib: &3 +- *1 +- lib\ +core_inc: &5 +- *1 +- inc\ colour: true :unity: :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 diff --git a/test/targets/iar_sh2a_v6.yml b/test/targets/iar_sh2a_v6.yml index 27e6bee..b4371cd 100644 --- a/test/targets/iar_sh2a_v6.yml +++ b/test/targets/iar_sh2a_v6.yml @@ -1,86 +1,99 @@ -tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 6.0\' -compiler: - 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 +--- +tools_root: C:\Program Files\IAR Systems\Embedded Workbench 6.0\ colour: true :unity: :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 diff --git a/test/tests/test_generate_test_runner.rb b/test/tests/test_generate_test_runner.rb index ebf011d..809b449 100644 --- a/test/tests/test_generate_test_runner.rb +++ b/test/tests/test_generate_test_runner.rb @@ -786,7 +786,7 @@ RUNNER_TESTS = [ :options => { :cmdline_args => true, }, - :cmdline_args => "-n testRunnerGeneratorSma*", + :cmdline_args => "-n=testRunnerGeneratorSma*", :expected => { :to_pass => [ 'test_ThisTestAlwaysPasses', 'spec_ThisTestPassesWhenNormalSetupRan', @@ -1183,15 +1183,7 @@ def runner_test(test, runner, expected, test_defines, cmdline_args, features) link_it(test_base, obj_list) # Execute unit test and generate results file - simulator = build_simulator_fields - 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) + output = runtest(test_base, true, cmdline_args) #compare to the expected pass/fail allgood = expected[:to_pass].inject(true) {|s,v| s && verify_match(/#{v}:PASS/, output) } diff --git a/test/tests/testunity.c b/test/tests/testunity.c index 13b6c25..0875446 100644 --- a/test/tests/testunity.c +++ b/test/tests/testunity.c @@ -6029,6 +6029,8 @@ void putcharSpy(int c) putcharSpyBuffer[indexSpyBuffer++] = (char)c; } else putchar((char)c); +#else + (void)c; #endif } @@ -6047,6 +6049,9 @@ void flushSpy(void) void testFailureCountIncrementsAndIsReturnedAtEnd(void) { +#ifndef USING_OUTPUT_SPY + TEST_IGNORE(); +#else UNITY_UINT savedFailures = Unity.TestFailures; Unity.CurrentTestFailed = 1; startPutcharSpy(); /* Suppress output */ @@ -6067,6 +6072,7 @@ void testFailureCountIncrementsAndIsReturnedAtEnd(void) Unity.TestFailures--; endPutcharSpy(); TEST_ASSERT_EQUAL(savedFailures + 1, failures); +#endif } void testCstringsEscapeSequence(void)