From bb7f889f03d0148b847d4a0d85e29eeb1d561943 Mon Sep 17 00:00:00 2001 From: jsalling Date: Wed, 18 Jan 2017 08:18:37 -0600 Subject: [PATCH] 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 --- .gitignore | 7 +++---- .travis.yml | 4 ++++ examples/example_3/rakefile_helper.rb | 4 +++- examples/example_3/readme.txt | 14 ++++---------- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index f0c7c3e..a383c3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,9 @@ build/ test/sandbox .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/test2.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 diff --git a/.travis.yml b/.travis.yml index c9af107..b90fd42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,10 @@ install: gem install rspec script: - cd test && rake ci - make -s + - make -s DEBUG=-m32 - cd ../extras/fixture/test && rake ci - make -s default noStdlibMalloc - make -s C89 + - cd ../../../examples/example_1 && make -s + - cd ../example_2 && make -s + - cd ../example_3 && rake \ No newline at end of file diff --git a/examples/example_3/rakefile_helper.rb b/examples/example_3/rakefile_helper.rb index 6702145..ed41d80 100644 --- a/examples/example_3/rakefile_helper.rb +++ b/examples/example_3/rakefile_helper.rb @@ -251,6 +251,8 @@ module RakefileHelpers def fail_out(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 diff --git a/examples/example_3/readme.txt b/examples/example_3/readme.txt index df6fb18..7371fea 100644 --- a/examples/example_3/readme.txt +++ b/examples/example_3/readme.txt @@ -4,16 +4,10 @@ Example 3 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. -You can build and test using the makefile if you have gcc installed (you may need to tweak -the locations of some tools in the makefile). Otherwise, the rake version will let you -test with gcc or a couple versions of IAR. You can tweak the yaml files to get those versions -running. +You can build and test using rake. The rake version will let you 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 Unity's advanced features (automatically creating test runners, fancy summaries, etc.) - -The makefile version doesn't require anything outside of your normal build tools, but won't do the -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. \ No newline at end of file +Without ruby, you have to maintain your own test runners. Do that for a while and you'll learn +why you really want to start using the Ruby tools.