Compile examples in continuous integration, update example_3 readme

Altered the rake build so that it passes. The example_3 shows off
some failing tests, so the rake build has to ignore those.
Update .gitignore file with executables from examples
This commit is contained in:
jsalling
2017-01-18 08:18:37 -06:00
parent 185fb49380
commit bb7f889f03
4 changed files with 14 additions and 15 deletions

7
.gitignore vendored
View File

@ -1,10 +1,9 @@
build/ build/
test/sandbox test/sandbox
.DS_Store .DS_Store
examples/example_1/test1.exe
examples/example_1/test2.exe
examples/example_2/all_tests.exe
examples/example_1/test1.out examples/example_1/test1.out
examples/example_1/test2.out examples/example_1/test2.out
examples/example_2/all_tests.out examples/example_2/all_tests.out
examples/example_3/test1.out
examples/example_3/test2.out
test/testparameterized.c.results
test/testunity.c.results

View File

@ -15,6 +15,10 @@ install: gem install rspec
script: script:
- cd test && rake ci - cd test && rake ci
- make -s - make -s
- make -s DEBUG=-m32
- cd ../extras/fixture/test && rake ci - cd ../extras/fixture/test && rake ci
- make -s default noStdlibMalloc - make -s default noStdlibMalloc
- make -s C89 - make -s C89
- cd ../../../examples/example_1 && make -s
- cd ../example_2 && make -s
- cd ../example_3 && rake

View File

@ -251,6 +251,8 @@ module RakefileHelpers
def fail_out(msg) def fail_out(msg)
puts msg puts msg
exit(-1) puts "Not returning exit code so continuous integration can pass"
# exit(-1) # Only removed to pass example_3, which has failing tests on purpose.
# Still fail if the build fails for any other reason.
end end
end end

View File

@ -4,16 +4,10 @@ Example 3
This example project gives an example of some passing, ignored, and failing tests. This example project gives an example of some passing, ignored, and failing tests.
It's simple and meant for you to look over and get an idea for what all of this stuff does. It's simple and meant for you to look over and get an idea for what all of this stuff does.
You can build and test using the makefile if you have gcc installed (you may need to tweak You can build and test using rake. The rake version will let you test with gcc or a couple
the locations of some tools in the makefile). Otherwise, the rake version will let you versions of IAR. You can tweak the yaml files to get those versions running.
test with gcc or a couple versions of IAR. You can tweak the yaml files to get those versions
running.
Ruby is required if you're using the rake version (obviously). This version shows off most of Ruby is required if you're using the rake version (obviously). This version shows off most of
Unity's advanced features (automatically creating test runners, fancy summaries, etc.) Unity's advanced features (automatically creating test runners, fancy summaries, etc.)
Without ruby, you have to maintain your own test runners. Do that for a while and you'll learn
The makefile version doesn't require anything outside of your normal build tools, but won't do the why you really want to start using the Ruby tools.
extras for you. So that you can test right away, we've written the test runners for you and
put them in the test\no_ruby subdirectory. If you make changes to the tests or source, you might
need to update these (like when you add or remove tests). Do that for a while and you'll learn
why you really want to start using the Ruby tools.