File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
4141- Properly report error in building shared library
4242- A missing ` examples ` directory no longer causes a crash in ` cpp_library.rb `
4343- Referring to an undefined platform no longer causes a crash; it's now a helpful error message
44+ - A copy/paste error that prevented compiler warning flags from being supplied has been fixed, via jgfoster
4445
4546### Security
4647
Original file line number Diff line number Diff line change @@ -75,6 +75,32 @@ def verified_install(backend, path)
7575RSpec . describe ArduinoCI ::CppLibrary do
7676 next if skip_ruby_tests
7777
78+ context "compiler flags" do
79+ config = ArduinoCI ::CIConfig . new
80+ config . load_yaml ( File . join ( File . dirname ( __FILE__ ) , "yaml" , "o1.yaml" ) )
81+ bogo_config = config . gcc_config ( "bogo" )
82+ fld = FakeLibDir . new
83+ backend = fld . backend
84+ cpp_lib_path = sampleproj_path + "DoSomething"
85+ cpp_library = verified_install ( backend , cpp_lib_path )
86+
87+ # the keys are the methods of cpp_library to call
88+ # the results are what we expect to see based on the config we loaded
89+ methods_and_results = {
90+ feature_args : [ "-fa" , "-fb" ] ,
91+ warning_args : [ "-We" , "-Wf" ] ,
92+ define_args : [ "-Dc" , "-Dd" ] ,
93+ flag_args : [ "g" , "h" ]
94+ }
95+
96+ methods_and_results . each do |m , expected |
97+ it "Creates #{ m } from config" do
98+ expect ( expected ) . to eq ( cpp_library . send ( m , bogo_config ) )
99+ end
100+ end
101+
102+ end
103+
78104 context "arduino-library-specification detection" do
79105
80106 answers = {
You can’t perform that action at this time.
0 commit comments