diff --git a/examples/example_1/makefile b/examples/example_1/makefile index 6608842..1d7957b 100644 --- a/examples/example_1/makefile +++ b/examples/example_1/makefile @@ -43,7 +43,6 @@ CLFAGS += -Wno-misleading-indentation CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef CFLAGS += -Wold-style-definition -#CFLAGS += -Wno-misleading-indentation TARGET_BASE1=test1 TARGET_BASE2=test2 diff --git a/examples/example_2/makefile b/examples/example_2/makefile index 98501c0..6aedda0 100644 --- a/examples/example_2/makefile +++ b/examples/example_2/makefile @@ -43,7 +43,6 @@ CLFAGS += -Wno-misleading-indentation CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef CFLAGS += -Wold-style-definition -#CFLAGS += -Wno-misleading-indentation TARGET_BASE1=all_tests TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION) diff --git a/examples/example_5/makefile b/examples/example_5/makefile index 82d39ad..07e841d 100644 --- a/examples/example_5/makefile +++ b/examples/example_5/makefile @@ -42,7 +42,7 @@ CFLAGS += -Wno-unknown-pragmas CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef CFLAGS += -Wold-style-definition -#CFLAGS += -Wno-misleading-indentation +CFLAGS += -Wno-misleading-indentation TARGET_BASE1=test1 diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index 80e0486..13955af 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -419,24 +419,26 @@ module RakefileHelpers end def run_examples() - report "\nRunning Unity Examples" total_tests = total_ignored = 0 # If we're set up to use gcc, the makefiles should work too. otherwise, just run example 3 examples = if $cfg_file_base.nil? || ($cfg_file_base =~ /gcc/) - [ - "cd ../examples/example_1 && make -s ci", - "cd ../examples/example_2 && make -s ci" - ] + { + :example_1 => "cd ../examples/example_1 && make -s ci", + :example_2 => "cd ../examples/example_2 && make -s ci" + } else - [] - end + if $unity_test_config_file_in_targets - ["cd ../examples/example_3 && rake config[#{$cfg_file_base}] default"] - else - ["cd ../examples/example_3 && rake config[\"../#{$unity_test_config_file}\"] default"] + {} end - examples.each do |cmd| + if $unity_test_config_file_in_targets + examples[:example_3] = "cd ../examples/example_3 && rake config[#{$cfg_file_base}] default" + else + examples[:example_3] = "cd ../examples/example_3 && rake config[\"../#{$unity_test_config_file}\"] default" + end + + examples.each_pair do |key, cmd| + report "\nRunning Unity Example: #{key.to_s}" execute(cmd, false).each_line do |line| if line =~ /(\d+) Tests \d+ Failures (\d+) Ignored/ total_tests += Regexp.last_match(1).to_i