Skip to content

Commit 92b8426

Browse files
committed
Fix improper overrides of unittest compilers YAML section
1 parent 63a241c commit 92b8426

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2929
- OSX splash screen re-disabled
3030
- ArduinoCITable didn't initialize its size on `clear()`
3131
- CPP file aggregation now ignores dotfiles
32+
- Unit test `compilers` section of YAML configuration is now properly inherited from parent configuration files
3233

3334
### Security
3435

SampleProjects/DoSomething/.arduino-ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ unittest:
1111
- uno
1212
- due
1313
- leonardo
14-
compilers:
15-
- g++

SampleProjects/TestSomething/.arduino-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ unittest:
22
platforms:
33
- uno
44
- due
5-
compilers:
6-
- g++

lib/arduino_ci/ci_config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ def load_yaml(path)
126126

127127
if yml.include?("compile")
128128
valid_data = validate_data("compile", yml["compile"], COMPILE_SCHEMA)
129-
@compile_info = valid_data
129+
valid_data.each { |k, v| @compile_info[k] = v }
130130
end
131131

132132
if yml.include?("unittest")
133133
valid_data = validate_data("unittest", yml["unittest"], UNITTEST_SCHEMA)
134-
@unittest_info = valid_data
134+
valid_data.each { |k, v| @unittest_info[k] = v }
135135
end
136136

137137
self

lib/arduino_ci/cpp_library.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ def vendor_bundle?(path)
6060
# This requires compilation of a sample program, and will be cached
6161
# @param gcc_binary
6262
def libasan?(gcc_binary)
63-
if @has_libasan_cache.nil?
63+
unless @has_libasan_cache.key?(gcc_binary)
6464
file = Tempfile.new('arduino_ci_libasan_check')
6565
begin
6666
file.write "int main(){}"
6767
file.close
68-
@has_libasan_cache = run_gcc(gcc_binary, "-o", "/dev/null", "-fsanitize=address", file.path)
68+
@has_libasan_cache[gcc_binary] = run_gcc(gcc_binary, "-o", "/dev/null", "-fsanitize=address", file.path)
6969
ensure
7070
file.delete
7171
end
7272
end
73-
@has_libasan_cache
73+
@has_libasan_cache[gcc_binary]
7474
end
7575

7676
# Get a list of all CPP source files in a directory and its subdirectories

0 commit comments

Comments
 (0)